started separating 'printf' as debug-only routine
This commit is contained in:
1 parent
c3cbfcebfb
commit
c173540fac
13 files changed
+86
-74
No files matched your search
@@ -0,0 +1,48 @@
|
||||
|
||||
//
|
||||
// Print the hex value in .A as two digits
|
||||
//
|
||||
|
||||
print_hex_byte:
|
||||
|
||||
#if HAS_BCD_SAFE_INTERRUPTS
|
||||
|
||||
// Idea by Haubitze
|
||||
|
||||
sed
|
||||
pha
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
cmp #$0A
|
||||
adc #$30
|
||||
jsr JCHROUT
|
||||
pla
|
||||
and #$0F
|
||||
cmp #$0A
|
||||
adc #$30
|
||||
cld
|
||||
jmp JCHROUT
|
||||
|
||||
#else
|
||||
|
||||
pha
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
ora #$30
|
||||
cmp #$3A
|
||||
bcc !+
|
||||
adc #6
|
||||
!: jsr JCHROUT
|
||||
pla
|
||||
and #$0f
|
||||
ora #$30
|
||||
cmp #$3A
|
||||
bcc !+
|
||||
adc #6
|
||||
!: jmp JCHROUT
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user