;
; EXTENDED REL MODULE WITH DEPENDENCIES, BYTECODE SEGMENT, AND INIT
;
 INCLUDE INC/PLASMA.INC
;
; EXTERNALS USED BY THIS MODULE
;
 EXTRN PUTS
 EXTRN PUTLN
;
; EXT REL HEADER
;
 INCLUDE INC/EXTHEADER.INC
;
; ADD MODULE DEPENDENCIES
; (DCI BACKWARDS HI/LO BIT FROM REL FILE)
;
 MSB ON
 ASC "CMDSY"
 MSB OFF
 ASC "S"
 DB 0 ; TERMINATE LIST WITH ZERO
;
; 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 SUCCESS
;
INIT JSR HELLO
 LDA #$00
 DEX
 STA ESTKL,X
 STA ESTKH,X
 RTS
;
; EXT REL DEFSEG
;
 INCLUDE INC/EXTDEFSEG.INC
