;
; EXTENDED REL MODULE WITH DEPENDENCIES, BYTECODE SEGMENT, AND INIT
;
 INCLUDE INC/PLASMA.INC
;
; EXT REL HEADER
;
RESFLAGS EQU 0
 INCLUDE INC/EXTHEADER.INC
;
; ADD MODULE DEPENDENCIES
; (DCI BACKWARDS HI/LO BIT FROM REL FILE)
;
 MSB ON
 ASC "CMDSY"
 MSB OFF
 ASC "S"
;
; EXTERNALS USED FROM CMDSYS
;
 EXTRN PUTS
 EXTRN PUTLN
;
; TERMINATE DEPENDENCY LIST WITH ZERO
;
 DB 0
;
; DATA AND 6502 CODE SEGMENT
;
HIMSG STR "Hello"
HELLO DEF HELLO ; CALLABLE FROM EXTERNAL MODULES
 LDA #>HIMSG
 LDY #<HIMSG
 DEX
 STA ESTKL,X
 STY ESTKH,X
 JSR PUTS
 JMP PUTLN
BYEMSG STR "Goodbye"
GOODBYE DEF GOODBYE ; CALLABLE FROM EXTERNAL MODULES
 LDA #>BYEMSG
 LDY #<BYEMSG
 DEX
 STA ESTKL,X
 STY ESTKH,X
 JSR PUTS
 JMP PUTLN
;
; INITIALIZE MODULE AND RETURN MOD KEEP STATUS
;
INIT JSR HELLO
 LDA #>MODKEEP
 LDY #<MODKEEP
 DEX
 STA ESTKL,X
 STY ESTKH,X
 RTS
;
; EXT REL DEFSEG
;
 INCLUDE INC/EXTDEFSEG.INC
