2020-05-18 23:43:54 +02:00
|
|
|
; 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
|
2020-05-19 18:26:22 +02:00
|
|
|
call print_dx
|
2020-05-18 23:43:54 +02:00
|
|
|
call space
|
|
|
|
pop dx
|
|
|
|
|
|
|
|
sub dx, bx
|
2020-05-19 18:26:22 +02:00
|
|
|
call print_dx
|
2020-05-18 23:43:54 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|