DDA@CMU-CS-C.ARPA (11/02/83)
From: Drew Anderson <DDA@CMU-CS-C.ARPA> In case anyone is interested, the difference is that ABX is unsigned and LEAX B,X is signed. Thus with $1000 in X and $F0 in B, ABX yields $10F0 and LEAX B,X yields $0FF0 (at least according to my TI programmer!) As such, when you are using a table with 129 to 256 items, you must point X at the middle of the table when using the LEAX instruction. I believe that the main reason for this is doing something like a small negative stack pointer move such as: ADJSTK LDA #BYTES # BYTES TO RESERVE NEGA MAKE NEGATIVE OFFSET LEAS A,S RESERVE BYTES. It should be noted that all LEA arguments are 2's complement. Drew Anderson DDA@cmu-cs-c -------