Prev: FAQ Topic - How can I see in javascript if a web browser acceptscookies? (2010-06-16)
Next: FAQ Topic - How can I see in javascript if a web browser accepts cookies? (2010-06-16)
From: Evertjan. on 19 Jun 2010 04:31 Tim Streater wrote on 17 jun 2010 in comp.lang.javascript: >> However it ment "swap registers a and b" > > Was it not "swap bytes" on an operand in the PDP-11? So you might say: > > swab R3 or swab (SP) > > for example to swap the bytes in register 3 or the top item on the stack. This could be, tim, as my connection at Philips in that era was a PDP-11 programmer. If so, it was NOT an 2650 opcode. ;-( ============= The problem of storng a word highbyte first or lowbyte first was a mayor headache, so the operand was very useful, methinks. I think Steve Morse of 8086 fame, now a mayor programmer for Ellis Island files and Jewish geneology <http://stevemorse.org/>, wrote about that in one of his books of the late 1970's? No, not this one: <http://stevemorse.com/> -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
From: Andrea Giammarchi on 20 Jun 2010 06:43 just because nobody wrote any example like this one ... var a = 1, b = 2 ; with ({swap:null}) { swap = a; a = b; b = swap; } which can be shortcutted to: with ({swap:a}) { a = b; b = swap; } another missed opportunity via one of the most misunderstood operator Regards, Andrea Giammarchi
From: Dr J R Stockton on 20 Jun 2010 14:35
In comp.lang.javascript message <timstreater-A97D44.21225919062010(a)news. individual.net>, Sat, 19 Jun 2010 21:22:59, Tim Streater <timstreater(a)waitrose.com> posted: >In article <DmRh$GGjw9GMFwoo(a)invalid.uk.co.demon.merlyn.invalid>, > Dr J R Stockton <reply1024(a)merlyn.demon.co.uk> wrote: > >> In comp.lang.javascript message <timstreater-150A94.10555217062010(a)news. >> individual.net>, Thu, 17 Jun 2010 10:55:52, Tim Streater >> <timstreater(a)waitrose.com> posted: >> >> > >> >Was it not "swap bytes" on an operand in the PDP-11? So you might say: >> > >> > swab R3 or swab (SP) >> > >> >for example to swap the bytes in register 3 or the top item on the stack. >> > >> >> Probably, since it is on page 10-13 of my copy of a handbook for the >> LSI-11 series. >> >> Did you ever consider 014747, which is MOV -(PC),-(PC) ? > >Doesn't that cause your code to execute backwards, eating itself as it >goes? Or something? IIRC, it only creates, without eating. Each successive instruction written is freshly written before the previous one. On a PDP-11, hardware may stop it at address 0400 (?), but on an LSI-11 it may overwrite the interrupt despatch area ... -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7) Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7) |