97 lines
5.5 KiB
Plaintext
97 lines
5.5 KiB
Plaintext
1 ;--------------------------------------------------------
|
|
2 ; File Created by SDCC : free open source ANSI-C Compiler
|
|
3 ; Version 4.0.0 #11528 (Linux)
|
|
4 ;--------------------------------------------------------
|
|
5 .module console
|
|
6 .optsdcc -mz80
|
|
7
|
|
8 ;--------------------------------------------------------
|
|
9 ; Public variables in this module
|
|
10 ;--------------------------------------------------------
|
|
11 .globl _get_char
|
|
12 .globl _put_char
|
|
13 .globl _put_string
|
|
14 ;--------------------------------------------------------
|
|
15 ; special function registers
|
|
16 ;--------------------------------------------------------
|
|
17 ;--------------------------------------------------------
|
|
18 ; ram data
|
|
19 ;--------------------------------------------------------
|
|
20 .area _DATA
|
|
21 ;--------------------------------------------------------
|
|
22 ; ram data
|
|
23 ;--------------------------------------------------------
|
|
24 .area _INITIALIZED
|
|
25 ;--------------------------------------------------------
|
|
26 ; absolute external ram data
|
|
27 ;--------------------------------------------------------
|
|
28 .area _DABS (ABS)
|
|
29 ;--------------------------------------------------------
|
|
30 ; global & static initialisations
|
|
31 ;--------------------------------------------------------
|
|
32 .area _HOME
|
|
33 .area _GSINIT
|
|
34 .area _GSFINAL
|
|
35 .area _GSINIT
|
|
36 ;--------------------------------------------------------
|
|
37 ; Home
|
|
38 ;--------------------------------------------------------
|
|
39 .area _HOME
|
|
40 .area _HOME
|
|
41 ;--------------------------------------------------------
|
|
42 ; code
|
|
43 ;--------------------------------------------------------
|
|
44 .area _CODE
|
|
45 ;src/console.c:3: char get_char() __naked {
|
|
46 ; ---------------------------------
|
|
47 ; Function get_char
|
|
48 ; ---------------------------------
|
|
0000 49 _get_char::
|
|
50 ;src/console.c:9: __endasm;
|
|
0000 3E 06 [ 7] 51 ld a, #6
|
|
0002 CDr00r00 [17] 52 call __bios_call
|
|
0005 6F [ 4] 53 ld l, a
|
|
0006 C9 [10] 54 ret
|
|
55 ;src/console.c:10: }
|
|
56 ;src/console.c:12: void put_char(char c) __naked {
|
|
57 ; ---------------------------------
|
|
58 ; Function put_char
|
|
59 ; ---------------------------------
|
|
0007 60 _put_char::
|
|
61 ;src/console.c:21: __endasm;
|
|
0007 FD 21 02 00 [14] 62 ld iy, #2
|
|
000B FD 39 [15] 63 add iy, sp
|
|
000D FD 4E 00 [19] 64 ld c, 0(iy)
|
|
0010 3E 09 [ 7] 65 ld a, #9
|
|
0012 CDr00r00 [17] 66 call __bios_call
|
|
0015 C9 [10] 67 ret
|
|
68 ;src/console.c:22: }
|
|
69 ;src/console.c:24: void put_string(char* s) {
|
|
70 ; ---------------------------------
|
|
71 ; Function put_string
|
|
72 ; ---------------------------------
|
|
0016 73 _put_string::
|
|
74 ;src/console.c:25: while (*s) {
|
|
0016 D1 [10] 75 pop de
|
|
0017 C1 [10] 76 pop bc
|
|
0018 C5 [11] 77 push bc
|
|
0019 D5 [11] 78 push de
|
|
001A 79 00101$:
|
|
001A 0A [ 7] 80 ld a, (bc)
|
|
001B B7 [ 4] 81 or a, a
|
|
001C C8 [11] 82 ret Z
|
|
83 ;src/console.c:26: put_char(*s);
|
|
001D C5 [11] 84 push bc
|
|
001E F5 [11] 85 push af
|
|
001F 33 [ 6] 86 inc sp
|
|
0020 CDr07r00 [17] 87 call _put_char
|
|
0023 33 [ 6] 88 inc sp
|
|
0024 C1 [10] 89 pop bc
|
|
90 ;src/console.c:27: s++;
|
|
0025 03 [ 6] 91 inc bc
|
|
92 ;src/console.c:29: }
|
|
0026 18 F2 [12] 93 jr 00101$
|
|
94 .area _CODE
|
|
95 .area _INITIALIZER
|
|
96 .area _CABS (ABS)
|