Reflection/Get source: Difference between revisions
m
→{{header|6502 Assembly}}: better fits the task description now
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: formatting) |
Puppydrum64 (talk | contribs) m (→{{header|6502 Assembly}}: better fits the task description now) |
||
Line 24:
PrintBytecode:
ldy #0
lda $01 ;high byte of starting address of the source
jsr PrintHex
;unimplemented routine that separates the "nibbles" of the accumulator,▼
; adds $30 or $37 to each depending on if it's 0-9 or A-F respectively, which converts hex to ASCII,▼
; then prints the high nibble then the low.▼
lda $00 ;low byte of the starting address of the source
jsr PrintHex
jsr NewLine ;unimplemented new line routine
loop:
lda ($00),y
Line 29 ⟶ 40:
beq Terminated
jsr PrintHex
▲;unimplemented routine that separates the "nibbles" of the accumulator,
▲; adds $30 or $37 to each depending on if it's 0-9 or A-F respectively, which converts hex to ASCII,
▲; then prints the high nibble then the low.
jmp loop
Terminated:
|