The program debug has only a simple assembly compiler, and it doesn't recognise the segment prefix here.
In truth I don't know how to do what you want, so I tried to find out how you could do it. I wrote the test program below and assembled it to a COM file.
c:\debug test.com
-g 100
AX=0000 BX=0000 CX=0004 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=1586 ES=1586 SS=1586 CS=1586 IP=0100 NV UP EI PL NZ NA PO NC
1586:0100 36 SS:
1586:0101 A10001 MOV AX,[0100] SS:0100=A136
-q
What I have learned...
1) Program is working, as SS=CS so at 100 is A1 36
2) The actual opcode values:
- SS overide prefix = 36
- MOV AX, moffs16* = A1, then 0001
These can be confirmed by a copy of pentiums opcode listing.
That probably hasn't answered your question though.
My advice to you is to use a different assembler to the in-built one in debug, and use debug only for *debugging*.
Hang on a sec (!)
The code listing from "g 100" gives the game away!
The assembler is expecting the segment overide prefix as a separate opcode, therefore the code should be broken down into the following:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.