gbdk_playground/beep/main.lst

236 lines
12 KiB
Plaintext
Raw Normal View History

2020-07-11 13:41:14 +00:00
1 ;--------------------------------------------------------
2 ; File Created by SDCC : FreeWare ANSI-C Compiler
3 ; Version 2.3.1 Wed Jul 8 09:50:25 2020
4
5 ;--------------------------------------------------------
6 .module lcc2312250
7
8 ;--------------------------------------------------------
9 ; Public variables in this module
10 ;--------------------------------------------------------
11 .globl _main
12 ;--------------------------------------------------------
13 ; special function registers
14 ;--------------------------------------------------------
15 ;--------------------------------------------------------
16 ; special function bits
17 ;--------------------------------------------------------
18 ;--------------------------------------------------------
19 ; internal ram data
20 ;--------------------------------------------------------
21 .area _DATA
22 ;--------------------------------------------------------
23 ; overlayable items in internal ram
24 ;--------------------------------------------------------
25 .area _OVERLAY
26 ;--------------------------------------------------------
27 ; indirectly addressable internal ram data
28 ;--------------------------------------------------------
29 .area _ISEG
30 ;--------------------------------------------------------
31 ; bit data
32 ;--------------------------------------------------------
33 .area _BSEG
34 ;--------------------------------------------------------
35 ; external ram data
36 ;--------------------------------------------------------
37 .area _XSEG
38 ;--------------------------------------------------------
39 ; global & static initialisations
40 ;--------------------------------------------------------
41 .area _GSINIT
42 .area _GSFINAL
43 .area _GSINIT
44 ;--------------------------------------------------------
45 ; Home
46 ;--------------------------------------------------------
47 .area _HOME
48 .area _CODE
49 ;--------------------------------------------------------
50 ; code
51 ;--------------------------------------------------------
52 .area _CODE
53 ; main.c 4
54 ; genLabel
55 ; genFunction
56 ; ---------------------------------
57 ; Function main
58 ; ---------------------------------
0000 59 ___main_start:
0000 60 _main:
0000 E8 FD 61 lda sp,-3(sp)
62 ; main.c 5
63 ; genAssign
0002 01 24 FF 64 ld bc,#0xFF24
65 ; genAssign (pointer)
0005 3E FF 66 ld a,#0xFF
0007 02 67 ld (bc),a
68 ; main.c 6
69 ; genAssign
0008 01 25 FF 70 ld bc,#0xFF25
71 ; genAssign (pointer)
000B 3E FF 72 ld a,#0xFF
000D 02 73 ld (bc),a
74 ; main.c 7
75 ; genAssign
000E 01 26 FF 76 ld bc,#0xFF26
77 ; genAssign (pointer)
0011 3E 80 78 ld a,#0x80
0013 02 79 ld (bc),a
80 ; main.c 9
81 ; genIpush
82 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0014 21 01 01 83 ld hl,#0x0101
0017 E5 84 push hl
85 ; genCall
0018 CD 00 00 86 call _gotogxy
001B E8 02 87 lda sp,2(sp)
88 ; main.c 10
89 ; genIpush
90 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
001D 21 84 00 91 ld hl,#__str_0
0020 E5 92 push hl
93 ; genCall
0021 CD 00 00 94 call _gprintf
0024 E8 02 95 lda sp,2(sp)
96 ; main.c 12
97 ; genIpush
98 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0026 21 02 03 99 ld hl,#0x0302
0029 E5 100 push hl
101 ; genCall
002A CD 00 00 102 call _gotogxy
002D E8 02 103 lda sp,2(sp)
104 ; main.c 13
105 ; genIpush
106 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
002F 21 97 00 107 ld hl,#__str_1
0032 E5 108 push hl
109 ; genCall
0033 CD 00 00 110 call _gprintf
0036 E8 02 111 lda sp,2(sp)
112 ; main.c 15
113 ; genLabel
0038 114 00104$:
115 ; main.c 16
116 ; genCall
117 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0038 CD 00 00 118 call _joypad
003B 4B 119 ld c,e
120 ; genAssign
003C 79 121 ld a,c
122 ; main.c 17
123 ; genIfx
003D B7 124 or a,a
003E CA 38 00 125 jp z,00104$
126 ; main.c 18
127 ; genAssign
0041 01 10 FF 128 ld bc,#0xFF10
129 ; genAssign (pointer)
0044 3E 38 130 ld a,#0x38
0046 02 131 ld (bc),a
132 ; main.c 19
133 ; genAssign
0047 01 11 FF 134 ld bc,#0xFF11
135 ; genAssign (pointer)
004A 3E 70 136 ld a,#0x70
004C 02 137 ld (bc),a
138 ; main.c 20
139 ; genAssign
004D 01 12 FF 140 ld bc,#0xFF12
141 ; genAssign (pointer)
0050 3E E0 142 ld a,#0xE0
0052 02 143 ld (bc),a
144 ; main.c 21
145 ; genAssign
0053 01 13 FF 146 ld bc,#0xFF13
147 ; genAssign (pointer)
0056 3E 0A 148 ld a,#0x0A
0058 02 149 ld (bc),a
150 ; main.c 22
151 ; genAssign
0059 01 14 FF 152 ld bc,#0xFF14
153 ; genAssign (pointer)
005C 3E C6 154 ld a,#0xC6
005E 02 155 ld (bc),a
156 ; main.c 24
157 ; genAssign
005F 01 25 FF 158 ld bc,#0xFF25
159 ; genAssign
160 ; AOP_STK for _main_sloc0_1_0
0062 F8 01 161 lda hl,1(sp)
0064 36 25 162 ld (hl),#0x25
0066 23 163 inc hl
0067 36 FF 164 ld (hl),#0xFF
165 ; genPointerGet
166 ; AOP_STK for _main_sloc0_1_0
167 ; AOP_STK for _main_sloc1_1_0
0069 2B 168 dec hl
006A 5E 169 ld e,(hl)
006B 23 170 inc hl
006C 56 171 ld d,(hl)
006D 1A 172 ld a,(de)
006E 2B 173 dec hl
006F 2B 174 dec hl
175 ; genOr
176 ; AOP_STK for _main_sloc1_1_0
0070 77 177 ld (hl),a
0071 7F 178 ld a,a
0072 F6 11 179 or a,#0x11
180 ; genAssign (pointer)
0074 02 181 ld (bc),a
182 ; main.c 26
183 ; genIpush
184 ; _saveRegsForCall: sendSetSize: 0 deInUse: 0 bcInUse: 0 deSending: 0
0075 21 C8 00 185 ld hl,#0x00C8
0078 E5 186 push hl
187 ; genCall
0079 CD 00 00 188 call _delay
007C E8 02 189 lda sp,2(sp)
190 ; genGoto
007E C3 38 00 191 jp 00104$
192 ; genLabel
0081 193 00106$:
194 ; genEndFunction
0081 E8 03 195 lda sp,3(sp)
0083 C9 196 ret
0084 197 ___main_end:
0084 198 __str_0:
0084 3D 3D 3D 3D 3D 3D 199 .ascii "====== Beep ======"
20 42 65 65 70 20
3D 3D 3D 3D 3D 3D
0096 00 200 .db 0x00
0097 201 __str_1:
0097 50 72 65 73 73 20 202 .ascii "Press any button"
61 6E 79 20 62 75
74 74 6F 6E
00A7 00 203 .db 0x00
204 .area _CODE
ASxxxx Assembler V01.75 (GameBoy Z80-like CPU), page 1.
Symbol Table
0 ___main_end 0084 R
0 ___main_start 0000 R
0 __str_0 0084 R
0 __str_1 0097 R
_delay **** GX
_gotogxy **** GX
_gprintf **** GX
_joypad **** GX
0 _main 0000 GR
ASxxxx Assembler V01.75 (GameBoy Z80-like CPU), page 2.
Area Table
0 _CODE size A8 flags 0
1 _DATA size 0 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 0 flags 0
7 _GSFINAL size 0 flags 0
8 _HOME size 0 flags 0