fixed display bug

This commit is contained in:
Thorn Avery 2020-06-09 16:58:18 +12:00
parent 1fc621944d
commit 105fdc5b20
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ in the racket repl (comments for reader comprehension, remove before running):
will evaluate to:
```
PC: $16, SP: $00, Flags: %00000000
PC: $0161, SP: $0000, Flags: %00000000
BC: $0000, DE: $0000
HL: $0163, AF: $6000
(HL): $60

6
vm.rkt
View File

@ -192,9 +192,9 @@
(define (print-state m)
(displayln (format "PC: $~a, SP: $~a, Flags: %~a"
(display-byte-hex (mem-pc m))
(display-byte-hex (mem-sp m))
(display-bin(mem-flags m)))))
(display-word-hex (mem-pc m))
(display-word-hex (mem-sp m))
(display-bin (mem-flags m)))))
(define (print-part-bank start count m)
(define (print-mem v)