DOS Com file debugging

Started by
1 comment, last by Nytegard 22 years ago
Tried searching the web, and found a little info, but can''t seem to put it together (Tired). So I debugged the program using the standard DEBUG.

-r
AX=0000 BX=0000 CX=0C2B DX=0000 SP=FFFE BP = 0000 SI=0000 DI=0000
DS=0B7E ES=0B7E SS=0B7E CS=0B7E IP=0100  NV UP EI PL NZ NA PO NC
0B7E:0100 E99D02      JMP    03A0
Thats all fine and good, but E99D02 are the first 3 bytes starting at offset 0, not offset 100. The info on .com files said to start at offset 100. I basically read that .com files start at 0x100, but I interpretted it as that was where the data started, not what offset to start the data at. Would someone please clarify this for me?
Advertisement
PSP header occupy file offsets 0x00-0xFF,
Actual code starts at offset 0x0100
The file image is loaded as-is in a 64k segment
During execution IP starts at 0x0100

quote:
I basically read that .com files start at 0x100, but I interpretted it as that was where the data started, not what offset to start the data at.


Err.. I don''t quite see what you mean.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Thanks for the quick reply and information.

[edited by - Nytegard on May 12, 2002 10:51:53 PM]

This topic is closed to new replies.

Advertisement