-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathakalabeth.asm
executable file
·74 lines (59 loc) · 1.17 KB
/
akalabeth.asm
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.import source "memlocations.asm"
.import source "16bit.asm"
.import source "playerdata.asm"
.import source "movement.asm"
.import source "mapdata.asm"
.import source "hiresmode.asm"
.import source "charactermode.asm"
.import source "interrupts.asm"
.import source "walls.asm"
.import source "viewhandler.asm"
.import source "input.asm"
.pc = $0801 "Basic loader" // BASIC starts at #2049 = $0801
:BasicUpstart(start) // Generate BASIC loader
.pc = $0810 "Main program"
start:
//clear screen
jsr $e544
lda #00
sta $d020 // black background
sta $d021
sta $d022
jsr SetRasterIRQ
jsr SetHiresmode
jsr ClearTextArea
jsr writeColorRam
jsr WriteText
jsr printFacing
jsr printLocation
jsr clearbitmap
jsr printFood
jsr printHitpoints
jsr printGold
jsr printFacing
jsr printLocation
//jsr plotmap
jsr drawView
jsr askCommand
mainLoop:
// jmp mainLoop
jsr handleInput
// bcs mainLoop
jsr decFood
jsr clearbitmap
jsr printFood
jsr printHitpoints
jsr printGold
jsr printFacing
jsr printLocation
// lda #$0
// sta filval
// jsr setcolour
jsr drawView
// lda #$10
// sta filval
// jsr setcolour
jsr scrollText
jsr askCommand
jmp mainLoop
mainEnd: nop