From 105fdc5b2079c8a067f413b04e563b7aa7f1d1b1 Mon Sep 17 00:00:00 2001 From: tA Date: Tue, 9 Jun 2020 16:58:18 +1200 Subject: [PATCH] fixed display bug --- README.md | 2 +- vm.rkt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2165e2c..a8bc1e0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/vm.rkt b/vm.rkt index 56183d7..cf88bc0 100644 --- a/vm.rkt +++ b/vm.rkt @@ -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)