base:8_bit_to_hexadecimal_conversion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
base:8_bit_to_hexadecimal_conversion [2017-08-20 00:17] – tww_ctr | base:8_bit_to_hexadecimal_conversion [2017-08-20 00:30] (current) – tww_ctr | ||
---|---|---|---|
Line 77: | Line 77: | ||
HEX adc #$36 ; Accu >= 10, subtract #$09 to get " | HEX adc #$36 ; Accu >= 10, subtract #$09 to get " | ||
jmp BSOUT ; Print Accu (HEX nibble) and bye | jmp BSOUT ; Print Accu (HEX nibble) and bye | ||
+ | </ | ||
+ | |||
+ | Version not using KERNAL: | ||
+ | |||
+ | < | ||
+ | // Dest. = YREG:XREG | ||
+ | // Value to utput = ACC | ||
+ | OUTHEX: | ||
+ | sty $fb | ||
+ | stx $fc | ||
+ | ldy #$00 | ||
+ | pha | ||
+ | lsr | ||
+ | lsr | ||
+ | lsr | ||
+ | lsr | ||
+ | tax | ||
+ | lda tab,x | ||
+ | sta ($fb),y | ||
+ | iny | ||
+ | pla | ||
+ | and #$0f | ||
+ | tax | ||
+ | lda tab,x | ||
+ | sta ($fb),y | ||
+ | rts | ||
+ | |||
+ | tab: | ||
+ | .text " | ||
</ | </ | ||
base/8_bit_to_hexadecimal_conversion.txt · Last modified: 2017-08-20 00:30 by tww_ctr