Skip to content

Commit ac9f614

Browse files
committed
Added cia.asm
1 parent 075022a commit ac9f614

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

cia.asm

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#importonce
2+
.segmentdef Cia [start=$1c01]
3+
.segment Cia
4+
5+
c128lib_BasicUpstart128($1c10)
6+
7+
* = $1c10 "Entry"
8+
Entry: {
9+
// Clean screen
10+
jsr c128lib.Kernal.CINT
11+
12+
// Set cursor on (0, 5)
13+
clc
14+
ldx #5
15+
ldy #0
16+
jsr $fff0
17+
18+
// Print string at current cursor position
19+
ldx #0
20+
!:
21+
lda Joy1, x
22+
jsr $FFD2
23+
inx
24+
cpx #$1B
25+
bne !-
26+
27+
// Set cursor on (0, 6)
28+
clc
29+
ldx #6
30+
ldy #0
31+
jsr $fff0
32+
33+
// Print string at current cursor position
34+
ldx #0
35+
!:
36+
lda Joy2, x
37+
jsr $FFD2
38+
inx
39+
cpx #$1B
40+
bne !-
41+
42+
Loop:
43+
c128lib_GetFirePressedPort1()
44+
sta $04E2
45+
beq !Zero+
46+
sta
47+
48+
c128lib_GetFirePressedPort2()
49+
sta $050B
50+
51+
jmp Loop
52+
}
53+
54+
Joy1: .text "JOYSTICK 1 (0 IS PRESSED): "
55+
Joy2: .text "JOYSTICK 2 (0 IS PRESSED): "
56+
57+
#import "./common/lib/common-global.asm"
58+
#import "./common/lib/kernal.asm"
59+
#import "./chipset/lib/cia-global.asm"

0 commit comments

Comments
 (0)