2024-01-07 12:44:01 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65c02
|
|
|
|
|
.OR $2000
|
|
|
|
|
.TF BIN/test
|
|
|
|
|
*--------------------------------------
|
2024-01-09 21:52:03 +00:00
|
|
|
|
.MA DEBUG
|
|
|
|
|
:1 bit $C000
|
|
|
|
|
bpl :1
|
|
|
|
|
sta $C010
|
|
|
|
|
.EM
|
|
|
|
|
*--------------------------------------
|
2024-01-07 12:44:01 +00:00
|
|
|
|
.INB inc/bs.i
|
2024-01-09 21:52:03 +00:00
|
|
|
|
.INB inc/mon.i
|
2024-01-07 12:44:01 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
HEADER cld Allows BRUN at ORG=$2000
|
|
|
|
|
jmp CODE.START for debugging without relocation
|
|
|
|
|
.DA #0 CMDBITS0
|
|
|
|
|
.DA #0 CMDBITS1
|
|
|
|
|
.DA 0 spare
|
|
|
|
|
.DA CODE.END
|
|
|
|
|
.DA DATA.END
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0 spare....16 bytes header
|
|
|
|
|
*--------------------------------------
|
2024-01-17 21:04:13 +00:00
|
|
|
|
R.MSG.HELLO .DA MSG.HELLO
|
|
|
|
|
R.MSG.RELOC .DA MSG.RELOC
|
2024-01-07 12:44:01 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CODE.START ldx #0
|
|
|
|
|
|
2024-01-17 21:04:13 +00:00
|
|
|
|
.1 lda MSG.HELLO,x ABS relocation required
|
2024-01-09 21:52:03 +00:00
|
|
|
|
beq .2
|
2024-01-07 12:44:01 +00:00
|
|
|
|
|
2024-01-09 21:52:03 +00:00
|
|
|
|
jsr MON.COUT
|
2024-01-07 12:44:01 +00:00
|
|
|
|
inx
|
2024-01-09 21:52:03 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2024-01-17 21:04:13 +00:00
|
|
|
|
.2 lda R.MSG.HELLO
|
|
|
|
|
pha
|
|
|
|
|
lda R.MSG.HELLO+1
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
lda HEADER+2
|
|
|
|
|
pha
|
|
|
|
|
lda HEADER+3
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
ldy R.MSG.RELOC
|
|
|
|
|
lda R.MSG.RELOC+1
|
|
|
|
|
ldx #GP.TBOX.PrintF
|
|
|
|
|
jsr GP.TBOX
|
2024-01-07 12:44:01 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CODE.END .EQ *
|
|
|
|
|
*--------------------------------------
|
2024-01-17 21:04:13 +00:00
|
|
|
|
MSG.HELLO .CZ -"\r\rHello from test EXT command.\r\r"
|
|
|
|
|
MSG.RELOC .CS "Code relocated at $%H\r"
|
|
|
|
|
.CZ "Data relocated at $%H\r"
|
|
|
|
|
|
2024-01-07 12:44:01 +00:00
|
|
|
|
DATA.END .EQ *
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/basic.fx/test.s
|
|
|
|
|
ASM
|