rdos/debug/util.asm

36 lines
508 B
NASM

; Utility commands
cmd_h: call eat_whitespace
call eat_hex_word
jc .err
mov bx, dx
call eat_whitespace
call eat_hex_word
jc .err
xchg bx, dx
push dx
add dx, bx
call print16
call space
pop dx
sub dx, bx
call print16
jmp crlf
.err: mov di, eat_hex_word.emsg
jmp parse_error
cmd_?: mov si, .txt
jmp putcs
.txt: db "G Go", 0x0A, 0x0D
db "H w w Add and subtract two values", 0x0A, 0x0D
db "R[r] Print register values", 0x0A, 0x0D
db "T Single-Step", 0x0A, 0x0D
db 0