]> git.sur5r.net Git - cc65/blob - samples/geos/ca65-vlir/vlir1.s
example for creating VLIR binary using ca65
[cc65] / samples / geos / ca65-vlir / vlir1.s
1
2 ; Maciej 'YTM/Elysium' Witkowiak
3 ; 06.06.2002
4
5 ; This is source for loadable VLIR-structured program part
6
7     ; include some GEOS defines
8
9             .include "../../../libsrc/geos/inc/const.inc"
10             .include "../../../libsrc/geos/inc/jumptab.inc"
11             .include "../../../libsrc/geos/inc/geossym.inc"
12             .include "../../../libsrc/geos/inc/geosmac.ca65.inc"
13
14     ; export names of functions that will be used in main program
15
16             .export VLIR1_Function1
17             .export VLIR1_Function2
18
19
20     ; go into VLIR1 segment - everything that is here will go into
21     ; VLIR chain #1
22
23                 .segment "VLIR1"
24
25 VLIR1_Function1:                jmp Function1   ; jump table, not really necessary
26 VLIR1_Function2:                jmp Function2
27                 ; etc.
28
29     ; rodata - if this is defined in .segment "RODATA"
30     ; it will end in VLIR0 part, you don't want that
31 paramString:
32                 .byte DEF_DB_POS | 1
33                 .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
34                 .word line1
35                 .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
36                 .word line2
37                 .byte OK, DBI_X_0, DBI_Y_2
38                 .byte NULL
39
40 line1:          .byte "This is in module 1",0
41 line2:          .byte "This is in module 1",0
42
43     ; code
44 Function1:      LoadW r0, paramString
45                 jsr DoDlgBox
46 Function2:      rts