1
0
mirror of https://github.com/KarolS/millfork.git synced 2025-01-14 01:29:57 +00:00

6809: Fix nibble-to-hex routines

This commit is contained in:
Karol Stasiak 2020-07-31 13:27:17 +02:00
parent bce48e8e4a
commit 72dcf2342e

View File

@ -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