In article <jlv151$4vf$
1...@speranza.aioe.org>
Agreed -- long live decent assemblers. But I was intrigued and so
decided to mess with those bit encodings to see what happened.
Looking in my Rector & Alexy 8086 book I saw that the 'pop mem/reg'
encoding was 8F (mod 000 r/m) and that 001 to 111 were "not used".
Below is a LST file produced by MASM4 (yes I know...):
-- pop.asm LST file --
0000 code segment public 'code'
assume cs:code, ds:code
0100 org 100h
0100 ???? foo dw ?
0102 start:
0102 8F 06 0100 R pop [foo]
; 8f, 06, 00, 01
; 8f, 00000110b, 0, 1
0106 8F 0E 00 01 db 8Fh, 00001110b, 0, 1
010A 8F 16 00 01 db 8Fh, 00010110b, 0, 1
010E 8F 1E 00 01 db 8Fh, 00011110b, 0, 1
0112 8F 26 00 01 db 8Fh, 00100110b, 0, 1
0116 8F 2E 00 01 db 8Fh, 00101110b, 0, 1
011A 8F 36 00 01 db 8Fh, 00110110b, 0, 1
011E 8F 3E 00 01 db 8Fh, 00111110b, 0, 1
012A code ends
end
-- end LST file --
When this was linked and shown in debug, we see:
C:\ASM>debug
pop.com
-u
0C48:0100 0000 ADD [BX+SI],AL
0C48:0102 8F060001 POP [0100]
0C48:0106 8F0E0001 POP [0100]
0C48:010A 8F160001 POP [0100]
0C48:010E 8F1E0001 POP [0100]
0C48:0112 8F260001 POP [0100]
0C48:0116 8F2E0001 POP [0100]
0C48:011A 8F360001 POP [0100]
0C48:011E 8F3E0001 POP [0100]
-q
C:\ASM>
The code is obviously not executable (so I didn't try!) but it would
appear the DEBUG believes that these instructions are all valid POPs,
though that is probably more a statement about MS DEBUG than 8086
reality.
Comments?