mirror of
https://github.com/mnaberez/py65.git
synced 2024-09-12 05:54:47 +00:00
30 lines
744 B
NASM
30 lines
744 B
NASM
; 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
|
|
|
|
.hexfile
|
|
|
|
.cpu T_32_M16
|
|
.assume BIT32=1032, BIT32R=3210
|
|
.include "i6502.a"
|
|
|
|
; I/O is memory-mapped in py65:
|
|
PUTC = $f001
|
|
GETC = $f004
|
|
|
|
; the py65 hexload boot ROM will only load to $0200
|
|
.ORG $200
|
|
|
|
another
|
|
lda GETC
|
|
beq another
|
|
eor #$20 ; swap upper and lower case as a demo
|
|
sta PUTC
|
|
jmp another
|