]> git.sur5r.net Git - cc65/commitdiff
Moved GEOS VLIR assembler sample from 'samples' to 'testcode' because:
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 27 Dec 2011 00:25:17 +0000 (00:25 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 27 Dec 2011 00:25:17 +0000 (00:25 +0000)
- It relies on include files which are not part of the cc65 distribution (but only present in the cc65 source tree).
- An upcoming GEOS VLIR C sample will obsolete it - as sample.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5316 b7a2c559-68d2-44c3-8de9-860c34a00d81

samples/geos/ca65-vlir/Makefile [deleted file]
samples/geos/ca65-vlir/cvthead.grc [deleted file]
samples/geos/ca65-vlir/vlir0.s [deleted file]
samples/geos/ca65-vlir/vlir1.s [deleted file]
samples/geos/ca65-vlir/vlir2.s [deleted file]
testcode/grc/Makefile [new file with mode: 0644]
testcode/grc/vlir.grc [new file with mode: 0644]
testcode/grc/vlir0.s [new file with mode: 0644]
testcode/grc/vlir1.s [new file with mode: 0644]
testcode/grc/vlir2.s [new file with mode: 0644]

diff --git a/samples/geos/ca65-vlir/Makefile b/samples/geos/ca65-vlir/Makefile
deleted file mode 100644 (file)
index 5f6dfcd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-all: vlir0.s vlir1.s vlir2.s cvthead.grc
-       grc cvthead.grc
-       ca65 cvthead.s
-       ca65 vlir0.s
-       ca65 vlir1.s
-       ca65 vlir2.s
-       ld65 -C cvthead.cfg cvthead.o vlir0.o vlir1.o vlir2.o
-       grc -vlir out.cvt vlir-head vlir0 vlir1 vlir2
-
-.PHONY: clean
-
-clean:
-       -$(RM) *.o vlir-head vlir0 vlir1 vlir2 cvthead.s cvthead.cfg out.cvt
-
-love:
-       @echo "Not war, eh?"
diff --git a/samples/geos/ca65-vlir/cvthead.grc b/samples/geos/ca65-vlir/cvthead.grc
deleted file mode 100644 (file)
index a592b3f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-HEADER APPLICATION "test" "TestApp" "V1.0" {
-structure VLIR
-dostype USR
-author "Maciej Witkowiak"
-info "This is just an example."
-}
-
-; output binary file for header will be 'vlir-head'
-; base address for chains >=1 will be $3000
-; output binary file for chain #0 is 'vlir0'
-; output binary file for chain #1 is 'vlir1'
-; output binary file for chain #2 is 'vlir2'
-VLIR vlir-head 0x3000 {
-vlir0
-vlir1
-vlir2
-}
diff --git a/samples/geos/ca65-vlir/vlir0.s b/samples/geos/ca65-vlir/vlir0.s
deleted file mode 100644 (file)
index 90f1b36..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-
-; Maciej 'YTM/Elysium' Witkowiak
-; 06.06.2002
-
-; This is source for main VLIR-structured program part
-
-    ; include some GEOS defines
-
-           .include "../../../libsrc/geos/inc/const.inc"
-           .include "../../../libsrc/geos/inc/jumptab.inc"
-           .include "../../../libsrc/geos/inc/geossym.inc"
-           .include "../../../libsrc/geos/inc/geosmac.ca65.inc"
-
-    ; import load addresses for all VLIR chains
-    ; by default they are all the same, but this is not required
-    ; these labels are defined upon linking with ld65 - each segment has it
-           .import __VLIR1_LOAD__
-           .import __VLIR2_LOAD__
-
-    ; import names of functions defined (and exported) in each VLIR part
-    ; of your application
-    ; here I used VLIRx_ prefix to prevent name clash
-
-           .import VLIR1_Function1
-           .import VLIR2_Function2
-
-    ; segments "CODE", "DATA", "RODATA" and "BSS" all go to VLIR0 chain
-
-           .segment "CODE"
-           ; code segment for VLIR 0 chain
-ProgExec:
-               LoadW r0, paramString           ; show something
-               jsr DoDlgBox
-
-               MoveW dirEntryBuf+OFF_DE_TR_SC, r1
-               LoadW r4, fileHeader
-               jsr GetBlock                    ; load back VLIR t&s table
-               bnex error
-
-               lda #1
-               jsr PointRecord                 ; we want next module (#1)
-               LoadW r2, $ffff                 ; length - as many bytes as there are
-               LoadW r7, __VLIR1_LOAD__        ; all VLIR segments have the same load address
-               jsr ReadRecord                  ; load it
-               bnex error
-               jsr VLIR1_Function1             ; execute something
-
-               lda #2
-               jsr PointRecord                 ; next module
-               LoadW r2, $ffff
-               LoadW r7, __VLIR2_LOAD__
-               jsr ReadRecord                  ; load it
-               bnex error
-               jsr VLIR2_Function2             ; execute something
-
-error:         jmp EnterDeskTop                ; end of application
-
-           .segment "RODATA"
-           ; read-only data segment
-paramString:
-           .byte DEF_DB_POS | 1
-           .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
-           .word line1
-           .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
-           .word line2
-           .byte OK, DBI_X_0, DBI_Y_2
-           .byte NULL
-
-line1:     .byte BOLDON, "Hello World!",0
-line2:     .byte OUTLINEON,"Hello",PLAINTEXT," world!",0
-
-           .segment "DATA"
-           ; read/write initialized data segment
-counter:    .word 0
-
-           .segment "BSS"
-           ; read/write uninitialized data segment
-           ; this space doesn't go into output file, only its size and
-           ; position is remembered
diff --git a/samples/geos/ca65-vlir/vlir1.s b/samples/geos/ca65-vlir/vlir1.s
deleted file mode 100644 (file)
index c346cc9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-
-; Maciej 'YTM/Elysium' Witkowiak
-; 06.06.2002
-
-; This is source for loadable VLIR-structured program part
-
-    ; include some GEOS defines
-
-           .include "../../../libsrc/geos/inc/const.inc"
-           .include "../../../libsrc/geos/inc/jumptab.inc"
-           .include "../../../libsrc/geos/inc/geossym.inc"
-           .include "../../../libsrc/geos/inc/geosmac.ca65.inc"
-
-    ; export names of functions that will be used in main program
-
-           .export VLIR1_Function1
-           .export VLIR1_Function2
-
-
-    ; go into VLIR1 segment - everything that is here will go into
-    ; VLIR chain #1
-
-               .segment "VLIR1"
-
-VLIR1_Function1:               jmp Function1   ; jump table, not really necessary
-VLIR1_Function2:               jmp Function2
-               ; etc.
-
-    ; rodata - if this is defined in .segment "RODATA"
-    ; it will end in VLIR0 part, you don't want that
-paramString:
-               .byte DEF_DB_POS | 1
-               .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
-               .word line1
-               .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
-               .word line2
-               .byte OK, DBI_X_0, DBI_Y_2
-               .byte NULL
-
-line1:         .byte "This is in module 1",0
-line2:         .byte "This is in module 1",0
-
-    ; code
-Function1:     LoadW r0, paramString
-               jsr DoDlgBox
-Function2:     rts
diff --git a/samples/geos/ca65-vlir/vlir2.s b/samples/geos/ca65-vlir/vlir2.s
deleted file mode 100644 (file)
index 0f63973..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-; Maciej 'YTM/Elysium' Witkowiak
-; 06.06.2002
-
-; This is source for loadable VLIR-structured program part
-
-; similar to vlir1 except the fact that this is chain #2
-
-           .include "../../../libsrc/geos/inc/const.inc"
-           .include "../../../libsrc/geos/inc/jumptab.inc"
-           .include "../../../libsrc/geos/inc/geossym.inc"
-           .include "../../../libsrc/geos/inc/geosmac.ca65.inc"
-
-           .export VLIR2_Function1
-           .export VLIR2_Function2
-
-               .segment "VLIR2"
-
-VLIR2_Function1:               jmp Function1
-VLIR2_Function2:               jmp Function2
-               ; etc.
-
-paramString:
-               .byte DEF_DB_POS | 1
-               .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
-               .word line1
-               .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
-               .word line2
-               .byte OK, DBI_X_0, DBI_Y_2
-               .byte NULL
-
-Function2:     LoadW r0, paramString
-               jsr DoDlgBox
-Function1:     rts
-
-line1:         .byte "This is in module 2",0
-line2:         .byte "This is in module 2",0
-
diff --git a/testcode/grc/Makefile b/testcode/grc/Makefile
new file mode 100644 (file)
index 0000000..401319e
--- /dev/null
@@ -0,0 +1,3 @@
+all:
+       grc65 vlir.grc
+       cl65 -t geos vlir.s vlir0.s vlir1.s vlir2.s
\ No newline at end of file
diff --git a/testcode/grc/vlir.grc b/testcode/grc/vlir.grc
new file mode 100644 (file)
index 0000000..3b8869b
--- /dev/null
@@ -0,0 +1,13 @@
+HEADER APPLICATION "test" "TestApp" "V1.0" {
+structure VLIR
+dostype USR
+author "Maciej Witkowiak"
+info "This is just an example."
+}
+
+; maximum size for chains >=1 will be $1000
+VLIR 0x1000 {
+0
+1
+2
+}
diff --git a/testcode/grc/vlir0.s b/testcode/grc/vlir0.s
new file mode 100644 (file)
index 0000000..302f439
--- /dev/null
@@ -0,0 +1,78 @@
+; Maciej 'YTM/Elysium' Witkowiak
+; 06.06.2002
+
+; This is the source for the main VLIR-structured program part
+
+    ; include some GEOS defines
+
+           .include "../../libsrc/geos/inc/const.inc"
+           .include "../../libsrc/geos/inc/jumptab.inc"
+           .include "../../libsrc/geos/inc/geossym.inc"
+           .include "../../libsrc/geos/inc/geosmac.ca65.inc"
+
+    ; import load addresses for all VLIR chains
+    ; these labels are defined upon linking with ld65
+
+           .import __OVERLAYADDR__
+           .import __OVERLAYSIZE__
+
+    ; import names of functions defined (and exported) in each VLIR part
+    ; of your application
+    ; here I used an OVERLAYx_ prefix to prevent name clashes
+
+           .import OVERLAY1_Function1
+           .import OVERLAY2_Function1
+
+    ; segments "STARTUP", "CODE", "DATA", "RODATA" and "BSS" all go to VLIR0 chain
+
+           .segment "STARTUP"
+           ; code segment for VLIR 0 chain
+ProgExec:
+               LoadW r0, paramString           ; show something
+               jsr DoDlgBox
+
+               MoveW dirEntryBuf+OFF_DE_TR_SC, r1
+               LoadW r4, fileHeader
+               jsr GetBlock                    ; load back VLIR t&s table
+               bnex error
+
+               lda #1
+               jsr PointRecord                 ; we want next module (#1)
+               LoadW r2, __OVERLAYSIZE__       ; length - as many bytes as we have room for
+               LoadW r7, __OVERLAYADDR__       ; all VLIR segments have the same load address
+               jsr ReadRecord                  ; load it
+               bnex error
+               jsr OVERLAY1_Function1          ; execute something
+
+               lda #2
+               jsr PointRecord                 ; next module
+               LoadW r2, __OVERLAYSIZE__
+               LoadW r7, __OVERLAYADDR__
+               jsr ReadRecord                  ; load it
+               bnex error
+               jsr OVERLAY2_Function1          ; execute something
+
+error:         jmp EnterDeskTop                ; end of application
+
+           .segment "RODATA"
+           ; read-only data segment
+paramString:
+           .byte DEF_DB_POS | 1
+           .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
+           .word line1
+           .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
+           .word line2
+           .byte OK, DBI_X_0, DBI_Y_2
+           .byte NULL
+
+line1:     .byte BOLDON, "Hello World!",0
+line2:     .byte OUTLINEON,"Hello",PLAINTEXT," world!",0
+
+           .segment "DATA"
+           ; read/write initialized data segment
+counter:    .word 0
+
+           .segment "BSS"
+           ; read/write uninitialized data segment
+           ; this space doesn't go into output file, only its size and
+           ; position is remembered
diff --git a/testcode/grc/vlir1.s b/testcode/grc/vlir1.s
new file mode 100644 (file)
index 0000000..530de4e
--- /dev/null
@@ -0,0 +1,45 @@
+; Maciej 'YTM/Elysium' Witkowiak
+; 06.06.2002
+
+; This is the source for the loadable VLIR-structured program part
+
+    ; include some GEOS defines
+
+           .include "../../libsrc/geos/inc/const.inc"
+           .include "../../libsrc/geos/inc/jumptab.inc"
+           .include "../../libsrc/geos/inc/geossym.inc"
+           .include "../../libsrc/geos/inc/geosmac.ca65.inc"
+
+    ; export names of functions that will be used in the main program
+
+           .export OVERLAY1_Function1
+           .export OVERLAY1_Function2
+
+
+    ; go into OVERLAY1 segment - everything that is here will go into
+    ; VLIR chain #1
+
+               .segment "OVERLAY1"
+
+OVERLAY1_Function1:            jmp Function1   ; jump table, not really necessary
+OVERLAY1_Function2:            jmp Function2
+               ; etc.
+
+    ; rodata - if this is defined in .segment "RODATA"
+    ; it will end up in the VLIR0 part, you don't want that
+paramString:
+               .byte DEF_DB_POS | 1
+               .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
+               .word line1
+               .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
+               .word line2
+               .byte OK, DBI_X_0, DBI_Y_2
+               .byte NULL
+
+line1:         .byte "This is in module 1",0
+line2:         .byte "This is in module 1",0
+
+    ; code
+Function1:     LoadW r0, paramString
+               jsr DoDlgBox
+Function2:     rts
diff --git a/testcode/grc/vlir2.s b/testcode/grc/vlir2.s
new file mode 100644 (file)
index 0000000..d3fb282
--- /dev/null
@@ -0,0 +1,36 @@
+; Maciej 'YTM/Elysium' Witkowiak
+; 06.06.2002
+
+; This is the source for the loadable VLIR-structured program part
+
+; similar to vlir1.s except the fact that this is chain #2
+
+           .include "../../libsrc/geos/inc/const.inc"
+           .include "../../libsrc/geos/inc/jumptab.inc"
+           .include "../../libsrc/geos/inc/geossym.inc"
+           .include "../../libsrc/geos/inc/geosmac.ca65.inc"
+
+           .export OVERLAY2_Function1
+           .export OVERLAY2_Function2
+
+               .segment "OVERLAY2"
+
+OVERLAY2_Function1:            jmp Function1
+OVERLAY2_Function2:            jmp Function2
+               ; etc.
+
+paramString:
+               .byte DEF_DB_POS | 1
+               .byte DBTXTSTR, TXT_LN_X, TXT_LN_2_Y
+               .word line1
+               .byte DBTXTSTR, TXT_LN_X, TXT_LN_3_Y
+               .word line2
+               .byte OK, DBI_X_0, DBI_Y_2
+               .byte NULL
+
+Function2:     LoadW r0, paramString
+               jsr DoDlgBox
+Function1:     rts
+
+line1:         .byte "This is in module 2",0
+line2:         .byte "This is in module 2",0