📄 ear.asm
字号:
XG$puts$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'find'
;------------------------------------------------------------
;barcode Allocated to in memory with name '_find_barcode_1_1'
;i Allocated to registers
;sloc0 Allocated to in memory with name '_find_sloc0_1_0'
;sloc1 Allocated to in memory with name '_find_sloc1_1_0'
G$find$0$0 ==.
C$ear.c$96$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 96
; -----------------------------------------
; function find
; -----------------------------------------
_find:
C$ear.c$0$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 0
mov _find_barcode_1_1,dpl
mov (_find_barcode_1_1 + 1),dph
mov (_find_barcode_1_1 + 2),b
C$ear.c$100$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 100
lcall _clearlcd
C$ear.c$101$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 101
mov _gotoxy_PARM_2,#0x01
mov dpl,#0x01
lcall _gotoxy
C$ear.c$102$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 102
mov dpl,_find_barcode_1_1
mov dph,(_find_barcode_1_1 + 1)
mov b,(_find_barcode_1_1 + 2)
lcall _puts
C$ear.c$104$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 104
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
lcall _delay
C$ear.c$105$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 105
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
lcall _delay
C$ear.c$106$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 106
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
lcall _delay
C$ear.c$108$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 108
mov r5,#0x00
mov r6,#0x00
mov r7,#0xE2
mov r0,#0xFF
00103$:
mov dptr,#(_database_details + 0x0002)
movx a,@dptr
mov _find_sloc0_1_0,a
inc dptr
movx a,@dptr
mov (_find_sloc0_1_0 + 1),a
clr c
mov a,r5
subb a,_find_sloc0_1_0
mov a,r6
xrl a,#0x80
mov b,(_find_sloc0_1_0 + 1)
xrl b,#0x80
subb a,b
jc 00112$
ljmp 00106$
00112$:
C$ear.c$110$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 110
mov a,#0x1E
add a,r7
mov r7,a
; Peephole 180 changed mov to clr
clr a
addc a,r0
mov r0,a
mov a,r7
add a,#_attendance_records
mov r1,a
mov a,r0
addc a,#(_attendance_records >> 8)
mov r2,a
mov _find_sloc1_1_0,r1
mov (_find_sloc1_1_0 + 1),r2
mov (_find_sloc1_1_0 + 2),#0x01
mov _strstrcmp_PARM_2,_find_barcode_1_1
mov (_strstrcmp_PARM_2 + 1),(_find_barcode_1_1 + 1)
mov (_strstrcmp_PARM_2 + 2),(_find_barcode_1_1 + 2)
mov dpl,_find_sloc1_1_0
mov dph,(_find_sloc1_1_0 + 1)
mov b,(_find_sloc1_1_0 + 2)
push ar2
push ar5
push ar6
push ar7
push ar0
push ar1
lcall _strstrcmp
mov r3,dpl
mov r4,dph
pop ar1
pop ar0
pop ar7
pop ar6
pop ar5
pop ar2
mov a,r3
orl a,r4
; Peephole 109 removed ljmp by inverse jump logic
jnz 00105$
00113$:
C$ear.c$111$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 111
mov dpl,r1
mov dph,r2
; Peephole 132 changed ljmp to sjmp
sjmp 00107$
00105$:
C$ear.c$108$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 108
inc r5
cjne r5,#0x00,00114$
inc r6
00114$:
ljmp 00103$
00106$:
C$ear.c$114$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 114
; Peephole 181 used 16 bit load of dptr
mov dptr,#0x0000
00107$:
C$ear.c$115$1$1 ==.
XG$find$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'readbarcode'
;------------------------------------------------------------
;counts Allocated to in memory with name '_readbarcode_PARM_2'
;barcode Allocated to registers r2 r3 r4
;i Allocated to registers
;sloc0 Allocated to in memory with name '_readbarcode_sloc0_1_0'
G$readbarcode$0$0 ==.
C$ear.c$261$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 261
; -----------------------------------------
; function readbarcode
; -----------------------------------------
_readbarcode:
C$ear.c$272$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 272
mov r2,dpl
mov r3,dph
mov r4,b
C$ear.c$265$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 265
mov r5,#0x00
mov r6,#0x00
00101$:
clr c
mov a,r5
subb a,_readbarcode_PARM_2
mov a,r6
xrl a,#0x80
mov b,(_readbarcode_PARM_2 + 1)
xrl b,#0x80
subb a,b
; Peephole 108 removed ljmp by inverse jump logic
jnc 00104$
00109$:
C$ear.c$267$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 267
mov a,r5
add a,r2
mov r7,a
mov a,r6
addc a,r3
mov r0,a
mov ar1,r4
push ar2
push ar3
push ar4
push ar5
push ar6
push ar7
push ar0
push ar1
lcall _getkey
mov _readbarcode_sloc0_1_0,dpl
pop ar1
pop ar0
pop ar7
pop ar6
pop ar5
pop ar4
pop ar3
pop ar2
mov dpl,r7
mov dph,r0
mov b,r1
mov a,_readbarcode_sloc0_1_0
lcall __gptrput
C$ear.c$265$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 265
; tail increment optimized
inc r5
cjne r5,#0x00,00101$
inc r6
; Peephole 132 changed ljmp to sjmp
sjmp 00101$
00104$:
C$ear.c$270$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 270
mov a,r5
add a,r2
mov dpl,a
mov a,r6
addc a,r3
mov dph,a
mov b,r4
; Peephole 180 changed mov to clr
clr a
lcall __gptrput
C$ear.c$272$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 272
mov dpl,r2
mov dph,r3
mov b,r4
00105$:
C$ear.c$273$1$1 ==.
XG$readbarcode$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'main'
;------------------------------------------------------------
;barcode Allocated to in memory with name '_main_barcode_1_1'
;attendance_record_ptr Allocated to registers r2 r3
G$main$0$0 ==.
C$ear.c$275$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 275
; -----------------------------------------
; function main
; -----------------------------------------
_main:
C$ear.c$290$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 290
mov dpl,#0x02
lcall _init8051
C$ear.c$294$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 294
lcall _init2x16lcd
C$ear.c$296$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 296
lcall _clearlcd
C$ear.c$308$1$1 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 308
00105$:
C$ear.c$310$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 310
mov _gotoxy_PARM_2,#0x01
mov dpl,#0x01
lcall _gotoxy
C$ear.c$311$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 311
mov r2,#__str_2
mov r3,#(__str_2 >> 8)
mov r4,#0x02
mov dpl,r2
mov dph,r3
mov b,r4
lcall _puts
C$ear.c$312$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 312
mov _gotoxy_PARM_2,#0x02
mov dpl,#0x01
lcall _gotoxy
C$ear.c$313$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 313
mov r2,#__str_3
mov r3,#(__str_3 >> 8)
mov r4,#0x02
mov dpl,r2
mov dph,r3
mov b,r4
lcall _puts
C$ear.c$315$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 315
mov r2,#_main_barcode_1_1
; Peephole 3.b changed mov to clr
; Peephole 3.b changed mov to clr
clr a
mov r3,a
mov r4,a
mov (_readbarcode_PARM_2 + 1),a
mov _readbarcode_PARM_2,#0x0E
mov dpl,r2
mov dph,r3
mov b,r4
push ar2
push ar3
push ar4
lcall _readbarcode
pop ar4
pop ar3
pop ar2
C$ear.c$316$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 316
mov (_main_barcode_1_1 + 0x000d),#0x00
C$ear.c$317$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 317
mov _gotoxy_PARM_2,#0x01
mov dpl,#0x01
push ar2
push ar3
push ar4
lcall _gotoxy
pop ar4
pop ar3
pop ar2
C$ear.c$318$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 318
mov dpl,r2
mov dph,r3
mov b,r4
push ar2
push ar3
push ar4
lcall _puts
pop ar4
pop ar3
pop ar2
C$ear.c$319$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 319
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
push ar2
push ar3
push ar4
lcall _delay
pop ar4
pop ar3
pop ar2
C$ear.c$320$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 320
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
push ar2
push ar3
push ar4
lcall _delay
pop ar4
pop ar3
pop ar2
C$ear.c$321$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 321
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
push ar2
push ar3
push ar4
lcall _delay
pop ar4
pop ar3
pop ar2
C$ear.c$324$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 324
push ar2
push ar3
push ar4
lcall _clearlcd
pop ar4
pop ar3
pop ar2
C$ear.c$325$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 325
mov dpl,r2
mov dph,r3
mov b,r4
lcall _find
mov r2,dpl
mov r3,dph
C$ear.c$326$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 326
; Peephole 132 changed ljmp to sjmp
; Peephole 198 optimized misc jump sequence
cjne r2,#0x00,00102$
cjne r3,#0x00,00102$
;00111$:
; Peephole 200 removed redundant sjmp
00112$:
C$ear.c$328$3$3 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 328
mov _gotoxy_PARM_2,#0x01
mov dpl,#0x01
push ar2
push ar3
lcall _gotoxy
pop ar3
pop ar2
C$ear.c$329$3$3 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 329
mov r4,#__str_4
mov r5,#(__str_4 >> 8)
mov r6,#0x02
mov dpl,r4
mov dph,r5
mov b,r6
push ar2
push ar3
lcall _puts
pop ar3
pop ar2
C$ear.c$330$3$3 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 330
mov _gotoxy_PARM_2,#0x02
mov dpl,#0x01
push ar2
push ar3
lcall _gotoxy
pop ar3
pop ar2
C$ear.c$331$3$3 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 331
mov r4,#__str_5
mov r5,#(__str_5 >> 8)
mov r6,#0x02
mov dpl,r4
mov dph,r5
mov b,r6
push ar2
push ar3
lcall _puts
pop ar3
pop ar2
; Peephole 132 changed ljmp to sjmp
sjmp 00103$
00102$:
C$ear.c$335$3$4 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 335
mov _gotoxy_PARM_2,#0x01
mov dpl,#0x01
push ar2
push ar3
lcall _gotoxy
pop ar3
pop ar2
C$ear.c$336$3$4 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 336
mov r4,#__str_6
mov r5,#(__str_6 >> 8)
mov r6,#0x02
mov dpl,r4
mov dph,r5
mov b,r6
push ar2
push ar3
lcall _puts
pop ar3
pop ar2
C$ear.c$337$3$4 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 337
mov _gotoxy_PARM_2,#0x02
mov dpl,#0x01
push ar2
push ar3
lcall _gotoxy
pop ar3
pop ar2
C$ear.c$338$3$4 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 338
mov a,#0x0F
add a,r2
mov r2,a
; Peephole 180 changed mov to clr
clr a
addc a,r3
mov r3,a
mov dpl,r2
mov dph,r3
mov b,#0x01
lcall _puts
00103$:
C$ear.c$344$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 344
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
lcall _delay
C$ear.c$345$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 345
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
lcall _delay
C$ear.c$346$2$2 ==.
; D:\Shekhar\Projects\EAR-1022\System\ear.c 346
; Peephole 182 used 16 bit load of dptr
mov dptr,#(((0x61)<<8) + 0xA8)
lcall _delay
ljmp 00105$
00107$:
C$ear.c$348$1$1 ==.
XG$main$0$0 ==.
ret
.area CSEG (CODE)
G$keys$0$0 == .
_keys:
Fear$_str_0$0$0 == .
__str_0:
.ascii " "
.db 0x00
Fear$_str_1$0$0 == .
__str_1:
.ascii " "
.db 0x00
Fear$_str_2$0$0 == .
__str_2:
.ascii "* JBB Sof Tech *"
.db 0x00
Fear$_str_3$0$0 == .
__str_3:
.ascii "Swap your card"
.db 0x00
Fear$_str_4$0$0 == .
__str_4:
.ascii "Invalid card"
.db 0x00
Fear$_str_5$0$0 == .
__str_5:
.ascii "Please try again"
.db 0x00
Fear$_str_6$0$0 == .
__str_6:
.ascii "Valid card"
.db 0x00
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -