-
Notifications
You must be signed in to change notification settings - Fork 2
/
functionVectors.asm
203 lines (156 loc) · 2.36 KB
/
functionVectors.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
;this is a vector table made so that externally loaded programs can easily access functions on the rom
;$B000
call VdpPrintChar
ret
;$B004
call VPrintString
ret
;$B008
call VdpInsertEnter
ret
;$B00C
call VdpBackspace
ret
;$B010
call VdpInsertTab
ret
;$B014
call ClearScreen
ret
;$B018
;if you do anything to change the video mode, run this when you're done to put things back to the way they were
call initializeVideo
ret
;$B01C
;d should contain register data
;a should contain register number
call VdpWriteToStandardRegister
ret
;$B020
; a register needs to contain palette register number you want to write to (0-15)
; d register needs to contain first palette byte
; e register needs to contain second palette byte
;note that the pointer value in register 16 auto increments each time you do this
call VdpWriteToPaletteRegister
ret
;$B024
;this function waits for the user to input a key. Once a keyboard key has been pressed, it loads the a register with the respective ascii code
call waitChar
ret
;$B028
call RowsColumnsToCursorPos ;update the cursor position
ret
;$B02C
call RowsColumnsToVram
ret
;$B030
call print16BitDecimal
ret
;$B034
call print2DigitDecimal
ret
;$B038
call print8bitDecimal
ret
;$B03C
call clearMostVram
ret
;$B040
call setupDefaultColors
ret
;$B044
call setupG4Mode
ret
;$B048
call drawLine
ret
;$B04C
call waitVdpCommandFinished
ret
;$B050
call drawRectangle
ret
;$B054
call drawRectangleFilled
ret
;$B058
call putResultInParameter1
ret
;$B05C
call stupidDivisionPre
ret
;$B060
call DEHL_Div_C
ret
;$B064
call stupidDivisionPost
ret
;$B068
call add32BitNumber
ret
;$B06C
call subtract32BitNumber
ret
;$B070
call load16bitvaluesFromRam
ret
;$B074
call mul16
ret
;$B078
call loadmul16IntoRam
ret
;$B07C
call ramTomul32Do
ret
;$B080
call mul32
ret
;$B084
call kbd8042WaitReadReady
ret
;$B088
call softwareSpriteToVramCompressed
ret
;$B08C
call G4PrintChar
ret
;$B090
call G4PrintString
ret
;$B094
call HL_Div_C
ret
;$B098
call b16bitDecimalToHl
ret
;$B09C
call b8bitDecimalToHl
ret
;$B0A0
call b2DigitDecimalToHl
ret
;$B0A4
call fillRangeInRam
ret
;$B0A8
;copies whatever's at the address in hl to whatever address is in de
;modifies a
;preserves hl and de
call addressToOtherAddress
ret
;$B0AC
call DE_Times_A
ret
;$B0B0
call changeSpriteSettings
ret
;$B0B4
call randomNumber
ret
;$B0B8
call sysIdentify
ret
;$B0BC
call aToScreenHex
ret