RichCini
Veteran Member
All --
I'm reconstructing a piece of old Microsoft code called 20HAL (project is on my Web site) and I'm getting stuck on one point about displacement sizes. I'm trying to get the code to compile to a binary-exact copy, not just work-alike.
The original code is the following, with a 16-bit displacement:
MASM happily reassembles it, but only uses the 8-bit displacement:
I can't come up with any combination of modifiers that ASM likes to force it to use a 16-bit displacement. If I enter the bytes into DEBUG, it disassembles as "[BX+0001]" but if I enter it in the assembler, it comes out with the byte displacement size. Right now I just have it coded with "db" so that locations line up.
There are other maddening things, like "jmp location" codes with an absolute address rather than the original negative displacement.
Any help with this would be greatly appreciated. Thanks!
Rich
I'm reconstructing a piece of old Microsoft code called 20HAL (project is on my Web site) and I'm getting stuck on one point about displacement sizes. I'm trying to get the code to compile to a binary-exact copy, not just work-alike.
The original code is the following, with a 16-bit displacement:
Code:
9663:04C0 88 AF 0001 mov ds:1[bx],ch ; (9663:0001=0)
MASM happily reassembles it, but only uses the 8-bit displacement:
Code:
04C0 88 6F 01 mov ds:1[bx],ch
I can't come up with any combination of modifiers that ASM likes to force it to use a 16-bit displacement. If I enter the bytes into DEBUG, it disassembles as "[BX+0001]" but if I enter it in the assembler, it comes out with the byte displacement size. Right now I just have it coded with "db" so that locations line up.
There are other maddening things, like "jmp location" codes with an absolute address rather than the original negative displacement.
Any help with this would be greatly appreciated. Thanks!
Rich