Skip to content

Commit

Permalink
fixed: S cmd position display
Browse files Browse the repository at this point in the history
  • Loading branch information
Baron-von-Riedesel committed Feb 11, 2024
1 parent ade46b3 commit 370bc10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions HISTORY.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,5 @@
- fixed dm cmd: invalid last mcb no longer displayed.
- added a ring0 (PL0) variant for long mode - DebugRL.bin.
- DEBUGR(L): added bp & bc cmds.
2.02 [11.2.2024]
- fixed S cmd: position display was corrupted in v2.00-v2.01.
15 changes: 9 additions & 6 deletions src/DEBUG.ASM
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
; - hide debug's IVT vectors 0,1,3? Alternately, init them only when the
; first G/P/T cmd is run, like MS Debug does for 1 & 3?

VERSION textequ <2.01>
VERSION textequ <2.02>

option casemap:none
option proc:private
Expand Down Expand Up @@ -8374,7 +8374,9 @@ displaypos:
push dx
sizeprfX ;xchg esi, edi
xchg si,di ;render position right after search string
mov cx, di ;save pos in CX
push di ;v2.02 save pos on stack (in v2.0-v2.01, it was saved in CX)
push ds ;v2.02 restore ES; needed for hex(d)word
pop es
mov ax,bx
call hexword
mov al,':'
Expand All @@ -8394,10 +8396,10 @@ endif
s_cont3:
mov ax,( LF shl 8 ) or CR
stosw
mov dx, cx
pop dx ;get pos from stack
mov cx, di
sub cx, dx
call stdout
call stdout ;write cx chars from ds:dx to stdout
pop dx
sizeprfX ;mov edi, esi
mov di,si
Expand Down Expand Up @@ -9021,7 +9023,7 @@ endif
mov [bp+8],ax
or ax,ax
jz @F
call hexnyb ;convert to hex and print
call hexnyb ;convert to hex digit and print
@@:
mov ax,[regs.rCX]
mov [bp+6],ax
Expand Down Expand Up @@ -11860,7 +11862,7 @@ endif
call hexword
jmp fppm
@@:
call hexnyb
call hexnyb ;convert to hex digit and print
fppm:
sizeprfX ;mov eax,edx
mov ax,dx
Expand Down Expand Up @@ -12040,6 +12042,7 @@ endif
;--- copystring - copy non-empty null-terminated string.
;--- SI->string
;--- DI->buffer
;--- modifies SI, DI, AL

copystring proc
lodsb
Expand Down

0 comments on commit 370bc10

Please sign in to comment.