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:
parent
bce48e8e4a
commit
72dcf2342e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user