From 72dcf2342ef205fdf2df79df082c4d47024e5e0f Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Fri, 31 Jul 2020 13:27:17 +0200 Subject: [PATCH] 6809: Fix nibble-to-hex routines --- include/m6809/stdlib_6809.mfk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/m6809/stdlib_6809.mfk b/include/m6809/stdlib_6809.mfk index 52cf6102..3d39b67b 100644 --- a/include/m6809/stdlib_6809.mfk +++ b/include/m6809/stdlib_6809.mfk @@ -30,7 +30,7 @@ macro asm void enable_irq() { ANDCC #$CF } -asm byte hi_nibble_to_hex(byte register(a) value) { +asm byte hi_nibble_to_hex(byte register(b) value) { LSRB LSRB LSRB @@ -38,11 +38,11 @@ asm byte hi_nibble_to_hex(byte register(a) value) { ? JMP lo_nibble_to_hex } -asm byte lo_nibble_to_hex(byte register(a) value) { +asm byte lo_nibble_to_hex(byte register(b) value) { ! ANDB #$F ADDB #$30 CMPB #$3A - BCC _lo_nibble_to_hex_lbl + BCS _lo_nibble_to_hex_lbl ADDB #$7 // carry is set _lo_nibble_to_hex_lbl: ? RTS