1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-11-18 15:06:35 +00:00
py65/examples/swapcase.asm

30 lines
744 B
NASM
Raw Normal View History

; trivial demo program: read input, swap case and write out
; assemble using Anton Treuenfels' HXA assembler
; with I6502.A macro file
; HXA_TW.EXE swapcase.asm
; (runs on Linux if you have WINE installed)
; which will make
; SWAPCASE.HEX
; where the first line should not be input to the hexloader
2014-01-31 23:07:27 +00:00
.hexfile
2014-01-31 23:07:27 +00:00
.cpu T_32_M16
.assume BIT32=1032, BIT32R=3210
.include "i6502.a"
2014-01-31 23:07:27 +00:00
; I/O is memory-mapped in py65:
PUTC = $f001
GETC = $f004
; the py65 hexload boot ROM will only load to $0200
2014-01-31 23:07:27 +00:00
.ORG $200
2014-01-31 23:07:27 +00:00
another
lda GETC
beq another
eor #$20 ; swap upper and lower case as a demo
sta PUTC
jmp another