gbdk_playground/move_sprite/move_sprite.lst
2020-07-11 08:41:14 -05:00

444 lines
22 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1 ;--------------------------------------------------------
2 ; File Created by SDCC : FreeWare ANSI-C Compiler
3 ; Version 2.3.1 Wed Jul 8 08:42:08 2020
4
5 ;--------------------------------------------------------
6 .module lcc2241580
7
8 ;--------------------------------------------------------
9 ; Public variables in this module
10 ;--------------------------------------------------------
11 .globl _main
12 .globl _ufo
13 ;--------------------------------------------------------
14 ; special function registers
15 ;--------------------------------------------------------
16 ;--------------------------------------------------------
17 ; special function bits
18 ;--------------------------------------------------------
19 ;--------------------------------------------------------
20 ; internal ram data
21 ;--------------------------------------------------------
22 .area _DATA
0000 23 _ufo::
0000 24 .ds 16
25 ;--------------------------------------------------------
26 ; overlayable items in internal ram
27 ;--------------------------------------------------------
28 .area _OVERLAY
29 ;--------------------------------------------------------
30 ; indirectly addressable internal ram data
31 ;--------------------------------------------------------
32 .area _ISEG
33 ;--------------------------------------------------------
34 ; bit data
35 ;--------------------------------------------------------
36 .area _BSEG
37 ;--------------------------------------------------------
38 ; external ram data
39 ;--------------------------------------------------------
40 .area _XSEG
41 ;--------------------------------------------------------
42 ; global & static initialisations
43 ;--------------------------------------------------------
44 .area _GSINIT
45 .area _GSFINAL
46 .area _GSINIT
47 ; move_sprite.c 1
48 ; move_sprite.c 37
49 ; genArrayInit
50 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0000 21 00 00 51 ld hl,#_ufo
0003 CD 00 00 52 call __initrleblock
0006 10 53 .db 16
0007 5A 3C E3 42 7C 99 54 .db 0x5A, 0x3C, 0xE3, 0x42, 0x7C, 0x99, 0xEB, 0xA5
EB A5
000F FB A5 66 99 E7 42 55 .db 0xFB, 0xA5, 0x66, 0x99, 0xE7, 0x42, 0x5A, 0x3C
5A 3C
0017 00 56 .db 0
57 ;--------------------------------------------------------
58 ; Home
59 ;--------------------------------------------------------
60 .area _HOME
61 .area _CODE
62 ;--------------------------------------------------------
63 ; code
64 ;--------------------------------------------------------
65 .area _CODE
66 ; move_sprite.c 4
67 ; genLabel
68 ; genFunction
69 ; ---------------------------------
70 ; Function main
71 ; ---------------------------------
0000 72 ___main_start:
0000 73 _main:
0000 E8 F9 74 lda sp,-7(sp)
75 ; move_sprite.c 5
76 ; genAssign
77 ; AOP_STK for _main_x_1_1
0002 F8 05 78 lda hl,5(sp)
0004 36 37 79 ld (hl),#0x37
0006 23 80 inc hl
0007 36 00 81 ld (hl),#0x00
82 ; move_sprite.c 6
83 ; genAssign
84 ; AOP_STK for _main_y_1_1
0009 F8 03 85 lda hl,3(sp)
000B 36 4B 86 ld (hl),#0x4B
000D 23 87 inc hl
000E 36 00 88 ld (hl),#0x00
89 ; move_sprite.c 8
90 ; genAssign
0010 01 40 FF 91 ld bc,#0xFF40
92 ; genAssign
93 ; AOP_STK for _main_sloc0_1_0
0013 F8 01 94 lda hl,1(sp)
0015 36 40 95 ld (hl),#0x40
0017 23 96 inc hl
0018 36 FF 97 ld (hl),#0xFF
98 ; genPointerGet
99 ; AOP_STK for _main_sloc0_1_0
100 ; AOP_STK for _main_sloc1_1_0
001A 2B 101 dec hl
001B 5E 102 ld e,(hl)
001C 23 103 inc hl
001D 56 104 ld d,(hl)
001E 1A 105 ld a,(de)
001F 2B 106 dec hl
0020 2B 107 dec hl
108 ; genAnd
109 ; AOP_STK for _main_sloc1_1_0
0021 77 110 ld (hl),a
0022 7F 111 ld a,a
0023 E6 FB 112 and a,#0xFB
113 ; genAssign (pointer)
0025 02 114 ld (bc),a
115 ; move_sprite.c 9
116 ; genIpush
117 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0026 21 00 00 118 ld hl,#_ufo
0029 E5 119 push hl
120 ; genIpush
002A 21 00 00 121 ld hl,#0x0000
002D E5 122 push hl
123 ; genCall
002E CD 00 00 124 call _set_sprite_data
0031 E8 04 125 lda sp,4(sp)
126 ; move_sprite.c 10
127 ; genIpush
128 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0033 21 00 00 129 ld hl,#0x0000
0036 E5 130 push hl
131 ; genCall
0037 CD 00 00 132 call _set_sprite_tile
003A E8 02 133 lda sp,2(sp)
134 ; move_sprite.c 11
135 ; genIpush
136 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
003C 21 37 4B 137 ld hl,#0x4B37
003F E5 138 push hl
139 ; genIpush
0040 3E 00 140 ld a,#0x00
0042 F5 141 push af
0043 33 142 inc sp
143 ; genCall
0044 CD 00 00 144 call _move_sprite
0047 E8 03 145 lda sp,3(sp)
146 ; move_sprite.c 12
147 ; genAssign
0049 01 40 FF 148 ld bc,#0xFF40
149 ; genAssign
150 ; AOP_STK for _main_sloc0_1_0
004C F8 01 151 lda hl,1(sp)
004E 36 40 152 ld (hl),#0x40
0050 23 153 inc hl
0051 36 FF 154 ld (hl),#0xFF
155 ; genPointerGet
156 ; AOP_STK for _main_sloc0_1_0
157 ; AOP_STK for _main_sloc1_1_0
0053 2B 158 dec hl
0054 5E 159 ld e,(hl)
0055 23 160 inc hl
0056 56 161 ld d,(hl)
0057 1A 162 ld a,(de)
0058 2B 163 dec hl
0059 2B 164 dec hl
165 ; genOr
166 ; AOP_STK for _main_sloc1_1_0
005A 77 167 ld (hl),a
005B 7F 168 ld a,a
005C F6 02 169 or a,#0x02
170 ; genAssign (pointer)
005E 02 171 ld (bc),a
172 ; move_sprite.c 14
173 ; genLabel
005F 174 00110$:
175 ; move_sprite.c 15
176 ; genCall
177 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
005F CD 00 00 178 call _joypad
0062 4B 179 ld c,e
180 ; genAnd
0063 79 181 ld a,c
0064 E6 01 182 and a,#0x01
0066 20 03 183 jr nz,00119$
0068 C3 90 00 184 jp 00102$
006B 185 00119$:
186 ; move_sprite.c 16
187 ; genPlus
188 ; AOP_STK for _main_x_1_1
189 ; genPlusIncr
006B F8 05 190 lda hl,5(sp)
006D 34 191 inc (hl)
006E 20 02 192 jr nz,00120$
0070 23 193 inc hl
0071 34 194 inc (hl)
0072 195 00120$:
196 ; move_sprite.c 17
197 ; genCast
198 ; AOP_STK for _main_y_1_1
0072 F8 03 199 lda hl,3(sp)
0074 4E 200 ld c,(hl)
201 ; genCast
202 ; AOP_STK for _main_x_1_1
0075 23 203 inc hl
0076 23 204 inc hl
0077 46 205 ld b,(hl)
206 ; genIpush
207 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0078 79 208 ld a,c
0079 F5 209 push af
007A 33 210 inc sp
211 ; genIpush
007B 78 212 ld a,b
007C F5 213 push af
007D 33 214 inc sp
215 ; genIpush
007E 3E 00 216 ld a,#0x00
0080 F5 217 push af
0081 33 218 inc sp
219 ; genCall
0082 CD 00 00 220 call _move_sprite
0085 E8 03 221 lda sp,3(sp)
222 ; move_sprite.c 18
223 ; genIpush
224 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0087 21 0A 00 225 ld hl,#0x000A
008A E5 226 push hl
227 ; genCall
008B CD 00 00 228 call _delay
008E E8 02 229 lda sp,2(sp)
230 ; genLabel
0090 231 00102$:
232 ; move_sprite.c 20
233 ; genCall
234 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0090 CD 00 00 235 call _joypad
0093 4B 236 ld c,e
237 ; genAnd
0094 79 238 ld a,c
0095 E6 02 239 and a,#0x02
0097 20 03 240 jr nz,00121$
0099 C3 C4 00 241 jp 00104$
009C 242 00121$:
243 ; move_sprite.c 21
244 ; genMinus
245 ; AOP_STK for _main_x_1_1
009C F8 05 246 lda hl,5(sp)
009E 5E 247 ld e,(hl)
009F 23 248 inc hl
00A0 56 249 ld d,(hl)
00A1 1B 250 dec de
00A2 2B 251 dec hl
00A3 73 252 ld (hl),e
00A4 23 253 inc hl
00A5 72 254 ld (hl),d
255 ; move_sprite.c 22
256 ; genCast
257 ; AOP_STK for _main_y_1_1
00A6 F8 03 258 lda hl,3(sp)
00A8 4E 259 ld c,(hl)
260 ; genCast
261 ; AOP_STK for _main_x_1_1
00A9 23 262 inc hl
00AA 23 263 inc hl
00AB 46 264 ld b,(hl)
265 ; genIpush
266 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
00AC 79 267 ld a,c
00AD F5 268 push af
00AE 33 269 inc sp
270 ; genIpush
00AF 78 271 ld a,b
00B0 F5 272 push af
00B1 33 273 inc sp
274 ; genIpush
00B2 3E 00 275 ld a,#0x00
00B4 F5 276 push af
00B5 33 277 inc sp
278 ; genCall
00B6 CD 00 00 279 call _move_sprite
00B9 E8 03 280 lda sp,3(sp)
281 ; move_sprite.c 23
282 ; genIpush
283 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
00BB 21 0A 00 284 ld hl,#0x000A
00BE E5 285 push hl
286 ; genCall
00BF CD 00 00 287 call _delay
00C2 E8 02 288 lda sp,2(sp)
289 ; genLabel
00C4 290 00104$:
291 ; move_sprite.c 25
292 ; genCall
293 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
00C4 CD 00 00 294 call _joypad
00C7 4B 295 ld c,e
296 ; genAnd
00C8 79 297 ld a,c
00C9 E6 04 298 and a,#0x04
00CB 20 03 299 jr nz,00122$
00CD C3 F7 00 300 jp 00106$
00D0 301 00122$:
302 ; move_sprite.c 26
303 ; genMinus
304 ; AOP_STK for _main_y_1_1
00D0 F8 03 305 lda hl,3(sp)
00D2 5E 306 ld e,(hl)
00D3 23 307 inc hl
00D4 56 308 ld d,(hl)
00D5 1B 309 dec de
00D6 2B 310 dec hl
00D7 73 311 ld (hl),e
00D8 23 312 inc hl
00D9 72 313 ld (hl),d
314 ; move_sprite.c 27
315 ; genCast
316 ; AOP_STK for _main_y_1_1
00DA 2B 317 dec hl
00DB 4E 318 ld c,(hl)
319 ; genCast
320 ; AOP_STK for _main_x_1_1
00DC 23 321 inc hl
00DD 23 322 inc hl
00DE 46 323 ld b,(hl)
324 ; genIpush
325 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
00DF 79 326 ld a,c
00E0 F5 327 push af
00E1 33 328 inc sp
329 ; genIpush
00E2 78 330 ld a,b
00E3 F5 331 push af
00E4 33 332 inc sp
333 ; genIpush
00E5 3E 00 334 ld a,#0x00
00E7 F5 335 push af
00E8 33 336 inc sp
337 ; genCall
00E9 CD 00 00 338 call _move_sprite
00EC E8 03 339 lda sp,3(sp)
340 ; move_sprite.c 28
341 ; genIpush
342 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
00EE 21 0A 00 343 ld hl,#0x000A
00F1 E5 344 push hl
345 ; genCall
00F2 CD 00 00 346 call _delay
00F5 E8 02 347 lda sp,2(sp)
348 ; genLabel
00F7 349 00106$:
350 ; move_sprite.c 30
351 ; genCall
352 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
00F7 CD 00 00 353 call _joypad
00FA 4B 354 ld c,e
355 ; genAnd
00FB 79 356 ld a,c
00FC E6 08 357 and a,#0x08
00FE 20 03 358 jr nz,00123$
0100 C3 5F 00 359 jp 00110$
0103 360 00123$:
361 ; move_sprite.c 31
362 ; genPlus
363 ; AOP_STK for _main_y_1_1
364 ; genPlusIncr
0103 F8 03 365 lda hl,3(sp)
0105 34 366 inc (hl)
0106 20 02 367 jr nz,00124$
0108 23 368 inc hl
0109 34 369 inc (hl)
010A 370 00124$:
371 ; move_sprite.c 32
372 ; genCast
373 ; AOP_STK for _main_y_1_1
010A F8 03 374 lda hl,3(sp)
010C 4E 375 ld c,(hl)
376 ; genCast
377 ; AOP_STK for _main_x_1_1
010D 23 378 inc hl
010E 23 379 inc hl
010F 46 380 ld b,(hl)
381 ; genIpush
382 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0110 79 383 ld a,c
0111 F5 384 push af
0112 33 385 inc sp
386 ; genIpush
0113 78 387 ld a,b
0114 F5 388 push af
0115 33 389 inc sp
390 ; genIpush
0116 3E 00 391 ld a,#0x00
0118 F5 392 push af
0119 33 393 inc sp
394 ; genCall
011A CD 00 00 395 call _move_sprite
011D E8 03 396 lda sp,3(sp)
397 ; move_sprite.c 33
398 ; genIpush
399 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
011F 21 0A 00 400 ld hl,#0x000A
0122 E5 401 push hl
402 ; genCall
0123 CD 00 00 403 call _delay
0126 E8 02 404 lda sp,2(sp)
405 ; genGoto
0128 C3 5F 00 406 jp 00110$
407 ; genLabel
012B 408 00112$:
409 ; genEndFunction
012B E8 07 410 lda sp,7(sp)
012D C9 411 ret
012E 412 ___main_end:
413 .area _CODE
ASxxxx Assembler V01.75 (GameBoy Z80-like CPU), page 1.
Symbol Table
0 ___main_end 012E R
0 ___main_start 0000 R
__initrleblock **** GX
_delay **** GX
_joypad **** GX
0 _main 0000 GR
_move_sprite **** GX
_set_sprite_data **** GX
_set_sprite_tile **** GX
1 _ufo 0000 GR
ASxxxx Assembler V01.75 (GameBoy Z80-like CPU), page 2.
Area Table
0 _CODE size 12E flags 0
1 _DATA size 10 flags 0
2 _OVERLAY size 0 flags 0
3 _ISEG size 0 flags 0
4 _BSEG size 0 flags 0
5 _XSEG size 0 flags 0
6 _GSINIT size 18 flags 0
7 _GSFINAL size 0 flags 0
8 _HOME size 0 flags 0