📄 lib24c16.lst
字号:
1 ;--------------------------------------------------------
2 ; File Created by SDCC : FreeWare ANSI-C Compiler
3 ; Version 2.3.5 Wed Jul 30 11:55:55 2003
4
5 ;--------------------------------------------------------
6 .module lib24c16
7
8 ;--------------------------------------------------------
9 ; Public variables in this module
10 ;--------------------------------------------------------
11 .globl _reeprom_PARM_2
12 .globl _weeprom_PARM_3
13 .globl _weeprom_PARM_2
14 .globl _weeprom
15 .globl _reeprom
16 .globl _read
17 .globl _outs
18 .globl _out
19 .globl _in
20 .globl _stop
21 ;--------------------------------------------------------
22 ; special function registers
23 ;--------------------------------------------------------
24 ;--------------------------------------------------------
25 ; special function bits
26 ;--------------------------------------------------------
27 ;--------------------------------------------------------
28 ; overlayable register banks
29 ;--------------------------------------------------------
30 .area REG_BANK_0 (REL,OVR,DATA)
0000 31 .ds 8
32 ;--------------------------------------------------------
33 ; internal ram data
34 ;--------------------------------------------------------
35 .area DSEG (DATA)
0000 36 _weeprom_PARM_2::
0000 37 .ds 1
0001 38 _weeprom_PARM_3::
0001 39 .ds 1
0002 40 _reeprom_PARM_2::
0002 41 .ds 1
42 ;--------------------------------------------------------
43 ; overlayable items in internal ram
44 ;--------------------------------------------------------
45 .area OSEG (OVR,DATA)
46 .area OSEG (OVR,DATA)
47 .area OSEG (OVR,DATA)
48 ;--------------------------------------------------------
49 ; indirectly addressable internal ram data
50 ;--------------------------------------------------------
51 .area ISEG (DATA)
52 ;--------------------------------------------------------
53 ; bit data
54 ;--------------------------------------------------------
55 .area BSEG (BIT)
56 ;--------------------------------------------------------
57 ; external ram data
58 ;--------------------------------------------------------
59 .area XSEG (XDATA)
60 ;--------------------------------------------------------
61 ; external initialized ram data
62 ;--------------------------------------------------------
63 .area XISEG (XDATA)
64 ;--------------------------------------------------------
65 ; global & static initialisations
66 ;--------------------------------------------------------
67 .area GSINIT (CODE)
68 .area GSFINAL (CODE)
69 .area GSINIT (CODE)
70 ;--------------------------------------------------------
71 ; Home
72 ;--------------------------------------------------------
73 .area HOME (CODE)
74 .area CSEG (CODE)
75 ;--------------------------------------------------------
76 ; code
77 ;--------------------------------------------------------
78 .area CSEG (CODE)
79 ;------------------------------------------------------------
80 ;Allocation info for local variables in function 'weeprom'
81 ;------------------------------------------------------------
82 ;address Allocated to in memory with name '_weeprom_PARM_2'
83 ;datum Allocated to in memory with name '_weeprom_PARM_3'
84 ;page Allocated to registers r2
85 ;WRCMD Allocated to registers
86 ;------------------------------------------------------------
87 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:92: void weeprom (char page, char address, char datum)
88 ; -----------------------------------------
89 ; function weeprom
90 ; -----------------------------------------
0000 91 _weeprom:
0002 92 ar2 = 0x02
0003 93 ar3 = 0x03
0004 94 ar4 = 0x04
0005 95 ar5 = 0x05
0006 96 ar6 = 0x06
0007 97 ar7 = 0x07
0000 98 ar0 = 0x00
0001 99 ar1 = 0x01
100 ; genReceive
101 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:95: page = page << 1; // move A0, A1 & A2 to their positions
102 ; genLeftShift
103 ; genLeftShiftLiteral
104 ; genlshOne
105 ; Peephole 244.a moving first to a instead of r2
0000 E5 82 106 mov a,dpl
0002 FA 107 mov r2,a
0003 25 E0 108 add a,acc
0005 FA 109 mov r2,a
110 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:96: page = page & 0xFE; // clear r/w bit
111 ; genAnd
0006 53 02 FE 112 anl ar2,#0xFE
113 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:97: WRCMD = page | 0xA0; // build the write command
114 ; genOr
0009 74 A0 115 mov a,#0xA0
000B 4A 116 orl a,r2
000C F5 82 117 mov dpl,a
118 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:98: outs (WRCMD); // send the write command with start condition
119 ; genCall
000E 12s00r68 120 lcall _outs
121 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:99: out (address); // send address
122 ; genCall
0011 85*00 82 123 mov dpl,_weeprom_PARM_2
0014 12s00rB2 124 lcall _out
125 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:100: out (datum); // send data
126 ; genCall
0017 85*01 82 127 mov dpl,_weeprom_PARM_3
001A 12s00rB2 128 lcall _out
129 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:101: stop (); // send stop condition
130 ; genCall
001D 12s01r19 131 lcall _stop
0020 132 00101$:
0020 22 133 ret
134 ;------------------------------------------------------------
135 ;Allocation info for local variables in function 'reeprom'
136 ;------------------------------------------------------------
137 ;address Allocated to in memory with name '_reeprom_PARM_2'
138 ;page Allocated to registers r2
139 ;aux Allocated to registers r2
140 ;WRCMD Allocated to registers r3
141 ;------------------------------------------------------------
142 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:118: char reeprom (char page, char address)
143 ; -----------------------------------------
144 ; function reeprom
145 ; -----------------------------------------
0021 146 _reeprom:
147 ; genReceive
148 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:123: aux = aux << 1; // move A0, A1 & A2 to their positions
149 ; genLeftShift
150 ; genLeftShiftLiteral
151 ; genlshOne
152 ; Peephole 244.a moving first to a instead of r2
0021 E5 82 153 mov a,dpl
0023 FA 154 mov r2,a
0024 25 E0 155 add a,acc
0026 FA 156 mov r2,a
157 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:124: aux = aux & 0xFE; // clear r/w bit
158 ; genAnd
0027 53 02 FE 159 anl ar2,#0xFE
160 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:125: WRCMD = aux | 0xA0; // build the write command
161 ; genOr
002A 74 A0 162 mov a,#0xA0
002C 4A 163 orl a,r2
164 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:126: outs (WRCMD); // send the write command with start condition
165 ; genCall
166 ; Peephole 244.c loading dpl from a instead of r3
002D FB 167 mov r3,a
002E F5 82 168 mov dpl,a
0030 C0 02 169 push ar2
0032 C0 03 170 push ar3
0034 12s00r68 171 lcall _outs
0037 D0 03 172 pop ar3
0039 D0 02 173 pop ar2
174 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:127: out (address); // send address
175 ; genCall
003B 85*02 82 176 mov dpl,_reeprom_PARM_2
003E C0 02 177 push ar2
0040 C0 03 178 push ar3
0042 12s00rB2 179 lcall _out
0045 D0 03 180 pop ar3
0047 D0 02 181 pop ar2
182 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:128: aux = read (WRCMD); // send read command and receive data
183 ; genCall
0049 8B 82 184 mov dpl,r3
004B 12s00r4F 185 lcall _read
186 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:129: return (aux); // return solicited data
187 ; genRet
188 ; Peephole 150 removed misc moves via dpl before return
004E 189 00101$:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -