On Saturday, Dec 13, 2003, at 12:19 US/Pacific, Herbert Graf wrote: >> And of course the famous "sex" instruction. > > Now this peaked my interest, what "sex" instruction? Executing > it would cause the chip to get up and seek a mate? "SEt X" The 1802 had 16 16-bit pointer registers, and several 4-bit registers that selected which of the pointer registers was the PC (P), and which was the data pointer register (X) You could also reference a data pointed to by a register via the instruction itself, or via the designated PC (which gave you immediate data capability.) There were assorted autoincrement and decrement modes. DMA, input, output, and most math all went via memory pointed at by a register. The 1802 was pointer intensive in exactly the way that a PIC isn't. :-) The canonical "call" procedure consisted of designating standard PC and stack registers, and setting the PC pointer to a register that would hold the address of code that would push the normal pc onto the stack, grab data from the old pc (with increment to get beyond it), move that into the standard pc register, and set the pc pointer back to the standard one. Short calls consisted of simply switching which register was the PC (but you couldn't nest those...) It was ... neat. Wish I had gotten around to building one :-( (I DO still have some 1802s in my junk box. But I've sorta lost the love of toggling in programs...) BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads