File: scrcode.s

package info (click to toggle)
cc65 2.19-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,268 kB
  • sloc: ansic: 117,151; asm: 66,339; pascal: 4,248; makefile: 1,009; perl: 607
file content (58 lines) | stat: -rw-r--r-- 1,118 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
; Christian Groessler, 30-Aug-2005
;
; scrcode macro test
;
; compile with
;       ca65 -I../../../asminc -tatari -o scrcode.o scrcode.s
;       ld65 -tatari -o scrcode.com scrcode.o

.import         __CODE_LOAD__, __BSS_LOAD__

.include        "atari.inc"
.macpack        atari

.code

                rts             ; SpartaDOS workaround

; entry point

                lda     #0
                tay
                tax

; display dispdata

disp:           lda     dispdata,x
                sta     (SAVMSC),y
                inx
                iny
                cpx     #disp_len
                bne     disp

; wait for key press

key:            lda     CH
                cmp     #255
                beq     key

                rts

.data

dispdata:       scrcode         "fooBa", 'r', $66, 3+4
disp_len        =       * - dispdata

.segment        "AUTOSTRT"

                .word   $02E0
                .word   $02E1
                .word   __CODE_LOAD__+1

.segment        "EXEHDR"

                .word   $FFFF
                .word   __CODE_LOAD__
                .word   __BSS_LOAD__ - 1

.end