fixed display bug
This commit is contained in:
parent
1fc621944d
commit
105fdc5b20
@ -23,7 +23,7 @@ in the racket repl (comments for reader comprehension, remove before running):
|
|||||||
will evaluate to:
|
will evaluate to:
|
||||||
|
|
||||||
```
|
```
|
||||||
PC: $16, SP: $00, Flags: %00000000
|
PC: $0161, SP: $0000, Flags: %00000000
|
||||||
BC: $0000, DE: $0000
|
BC: $0000, DE: $0000
|
||||||
HL: $0163, AF: $6000
|
HL: $0163, AF: $6000
|
||||||
(HL): $60
|
(HL): $60
|
||||||
|
6
vm.rkt
6
vm.rkt
@ -192,9 +192,9 @@
|
|||||||
|
|
||||||
(define (print-state m)
|
(define (print-state m)
|
||||||
(displayln (format "PC: $~a, SP: $~a, Flags: %~a"
|
(displayln (format "PC: $~a, SP: $~a, Flags: %~a"
|
||||||
(display-byte-hex (mem-pc m))
|
(display-word-hex (mem-pc m))
|
||||||
(display-byte-hex (mem-sp m))
|
(display-word-hex (mem-sp m))
|
||||||
(display-bin(mem-flags m)))))
|
(display-bin (mem-flags m)))))
|
||||||
|
|
||||||
(define (print-part-bank start count m)
|
(define (print-part-bank start count m)
|
||||||
(define (print-mem v)
|
(define (print-mem v)
|
||||||
|
Loading…
Reference in New Issue
Block a user