mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-07 15:31:49 +00:00
Add EDASM sample code
This commit is contained in:
parent
9038c7e649
commit
a89b1b9b40
42
src/samplesrc/test.asm
Normal file
42
src/samplesrc/test.asm
Normal file
@ -0,0 +1,42 @@
|
||||
REL
|
||||
ORG $1000
|
||||
;
|
||||
ESTKH EQU $C0
|
||||
ESTKL EQU $D0
|
||||
;
|
||||
EXTRN PUTS
|
||||
EXTRN PUTLN
|
||||
;
|
||||
; EXT HEADER
|
||||
;
|
||||
DW $6502
|
||||
DW 0 ; SYSFLAGS
|
||||
DW DEFSEG ; DEF OFFSET
|
||||
DW 1 ; DEF COUNT (INCLUDING INIT)
|
||||
DW MODINIT ; MOD INIT
|
||||
MSB ON
|
||||
ASC "CMDSY" ; MOD DEPENDENCIES
|
||||
MSB OFF
|
||||
ASC "S"
|
||||
DB 0
|
||||
;
|
||||
; DATA AND 6502 CODE SEGMENT
|
||||
;
|
||||
MSG STR "Hello"
|
||||
MSGADDR DW MSG
|
||||
ASMINIT LDA MSGADDR
|
||||
LDY MSGADDR+1
|
||||
DEX
|
||||
STA ESTKL,X
|
||||
STY ESTKH,X
|
||||
JSR PUTS
|
||||
JMP PUTLN
|
||||
;
|
||||
; BYTECODE DEFS SEGMENT
|
||||
;
|
||||
DEFSEG EQU *
|
||||
MODINIT DB $54 ; CALL ASMINIT
|
||||
DW ASMINIT
|
||||
DB $2C ; CW
|
||||
DW $2000 ; MODKEEP
|
||||
DB $5C ; RET
|
Loading…
Reference in New Issue
Block a user