Skip to content

Commit 370bc10

Browse files
fixed: S cmd position display
1 parent ade46b3 commit 370bc10

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

HISTORY.TXT

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,5 @@
301301
- fixed dm cmd: invalid last mcb no longer displayed.
302302
- added a ring0 (PL0) variant for long mode - DebugRL.bin.
303303
- DEBUGR(L): added bp & bc cmds.
304+
2.02 [11.2.2024]
305+
- fixed S cmd: position display was corrupted in v2.00-v2.01.

src/DEBUG.ASM

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
; - hide debug's IVT vectors 0,1,3? Alternately, init them only when the
5151
; first G/P/T cmd is run, like MS Debug does for 1 & 3?
5252

53-
VERSION textequ <2.01>
53+
VERSION textequ <2.02>
5454

5555
option casemap:none
5656
option proc:private
@@ -8374,7 +8374,9 @@ displaypos:
83748374
push dx
83758375
sizeprfX ;xchg esi, edi
83768376
xchg si,di ;render position right after search string
8377-
mov cx, di ;save pos in CX
8377+
push di ;v2.02 save pos on stack (in v2.0-v2.01, it was saved in CX)
8378+
push ds ;v2.02 restore ES; needed for hex(d)word
8379+
pop es
83788380
mov ax,bx
83798381
call hexword
83808382
mov al,':'
@@ -8394,10 +8396,10 @@ endif
83948396
s_cont3:
83958397
mov ax,( LF shl 8 ) or CR
83968398
stosw
8397-
mov dx, cx
8399+
pop dx ;get pos from stack
83988400
mov cx, di
83998401
sub cx, dx
8400-
call stdout
8402+
call stdout ;write cx chars from ds:dx to stdout
84018403
pop dx
84028404
sizeprfX ;mov edi, esi
84038405
mov di,si
@@ -9021,7 +9023,7 @@ endif
90219023
mov [bp+8],ax
90229024
or ax,ax
90239025
jz @F
9024-
call hexnyb ;convert to hex and print
9026+
call hexnyb ;convert to hex digit and print
90259027
@@:
90269028
mov ax,[regs.rCX]
90279029
mov [bp+6],ax
@@ -11860,7 +11862,7 @@ endif
1186011862
call hexword
1186111863
jmp fppm
1186211864
@@:
11863-
call hexnyb
11865+
call hexnyb ;convert to hex digit and print
1186411866
fppm:
1186511867
sizeprfX ;mov eax,edx
1186611868
mov ax,dx
@@ -12040,6 +12042,7 @@ endif
1204012042
;--- copystring - copy non-empty null-terminated string.
1204112043
;--- SI->string
1204212044
;--- DI->buffer
12045+
;--- modifies SI, DI, AL
1204312046

1204412047
copystring proc
1204512048
lodsb

0 commit comments

Comments
 (0)