For the purpose of getting to grips with debug.exe on MSDOS 6.22 I have the following code example:
.model tiny
.data
msg DB 'test string',0
.code
start:
mov al,msg
end start
When I compile it with tasm /zi t.asm and link it with tlink t I get the following behaviour in debug.exe:
When pressing 'r' to show registers and next command, I get:
mov al,[0008] as the next instruction to execute.
I was expecting the memory location of 'test string' to thus be at ds:0008 but when I do:
d ds:0108
I find 'test string' there instead (and garbage at ds:0008).
Can somebody please explain why 0100h is 'subtracted' from 0108h when I do the 'r' command in debug.exe ?
On Monday, December 26, 2022 at 11:33:44 AM UTC+2, Jean pierneef wrote:
For the purpose of getting to grips with debug.exe on MSDOS 6.22 I have the following code example:
.model tiny
.data
msg DB 'test string',0
.code
start:
mov al,msg
end start
When I compile it with tasm /zi t.asm and link it with tlink t I get the following behaviour in debug.exe:
When pressing 'r' to show registers and next command, I get:
mov al,[0008] as the next instruction to execute.
I was expecting the memory location of 'test string' to thus be at ds:0008 but when I do:
d ds:0108
I find 'test string' there instead (and garbage at ds:0008).
Can somebody please explain why 0100h is 'subtracted' from 0108h when I do the 'r' command in debug.exe ?
I have tried this on an MSDOS 6.22 running in Virtual Box (tasm v2.0, unknown debug.exe version) as well as on Doxbox (tasm 2.51, debug.exe 1.25 which I presume comes from some open source project).
I do not understand why "test string" is at location ds:0108h in memory, but why debug says it wants to mov 0008 into the al register. Why the discrepancy ?
Can somebody please explain why 0100h is 'subtracted' from 0108h
when I do the 'r' command in debug.exe ?
For the purpose of getting to grips with debug.exe on MSDOS 6.22 I have
the following code example:
.model tiny
.data
msg DB 'test string',0
.code
start:
mov al,msg
end start
When I compile it with tasm /zi t.asm and link it with tlink t I get the following behaviour in debug.exe:
When pressing 'r' to show registers and next command, I get:
mov al,[0008] as the next instruction to execute.
I was expecting the memory location of 'test string' to thus be at
ds:0008 but when I do:
d ds:0108
I find 'test string' there instead (and garbage at ds:0008).
Can somebody please explain why 0100h is 'subtracted' from 0108h when I
do the 'r' command in debug.exe ?
On 26/12/2022 12:08, Jean pierneef wrote:
On Monday, December 26, 2022 at 11:33:44 AM UTC+2, Jean pierneef wrote:
For the purpose of getting to grips with debug.exe on MSDOS 6.22 I have the following code example:
.model tiny
.data
msg DB 'test string',0
.code
start:
mov al,msg
end start
When I compile it with tasm /zi t.asm and link it with tlink t I get the following behaviour in debug.exe:
When pressing 'r' to show registers and next command, I get:
mov al,[0008] as the next instruction to execute.
I was expecting the memory location of 'test string' to thus be at ds:0008 but when I do:
d ds:0108
I find 'test string' there instead (and garbage at ds:0008).
Can somebody please explain why 0100h is 'subtracted' from 0108h when I do the 'r' command in debug.exe ?
I have tried this on an MSDOS 6.22 running in Virtual Box (tasm v2.0, unknown debug.exe version) as well as on Doxbox (tasm 2.51, debug.exe 1.25 which I presume comes from some open source project).
I do not understand why "test string" is at location ds:0108h in memory, but why debug says it wants to mov 0008 into the al register. Why the discrepancy ?
MOV AL,msg ;loads the low byte of the ADDRESS 0108 into AL
MOV AL,[msg] ;loads the content of this address
I don't know Tasm, it may need a keyword (ptr?) instead of brackets
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 08:16:16 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
2 files (6,679K bytes) |
| Messages: | 264,942 |