org 0
;
X0000: mov r7,a
X0001: addc a,r7
addc a,r7
rr a
rr a
X0005: ajmp X0001
;
X0007: add a,r7
addc a,r7
addc a,r7
mov a,#0c2h
inc r1
ajmp X006d
;
org 10h
;
ajmp X0001
;
org 14h
;
inc rb1r1
nop
;
org 1bh
;
ajmp X0501
;
xrl rb0r1,a
orl rb0r2,a
cjne a,rb0r1,X0007
inc a
inc r2
ljmp X8405
;
anl a,r2
rr a
add a,rb0r6
anl c,/20h.3
xch a,@r0
inc @r1
mov r3,a
inc a
xrl a,r0
inc r1
anl rb0r5,a
inc r1
inc r1
mov r5,t3
mov r7,a
;
org 42h
;
dec a
inc a
ljmp X0102
;
inc a
ajmp X0001
;
ajmp X0001
;
ajmp X0000
;
org 57h
;
lcall X0304
inc @r0
lcall X0101
ajmp X0001
;
ajmp X0000
;
org 6bh
;
inc a
inc a
X006d: inc a
inc a
inc a
ajmp X0001
;
ajmp X0001
;
ajmp X0000
;
org 8ah
;
dec r1
nop
inc a
mov a,r4
ajmp X0005
;
org 91h
;
inc a
nop
subb a,@r0
inc a
nop
;
org 97h
;
add a,r2
mov r2,cml2
nop
;
org 0a3h
;
add a,r2
mov r2,cml2
nop
;
org 0ach
;
dec r1
mov r7,a
;
org 0b2h
;
ajmp X0000
;
ajmp X00ff
;
org 0b7h
;
inc @r0
ajmp X0028
;
ljmp Xb900
;
inc r2
nop
ljmp X3902
;
cjne r1,#2,X00fe
nop
;
org 0c7h
;
ljmp X451c
;
org 0cbh
;
ljmp X4e38
;
org 0cfh
;
ljmp X5753
;
org 0d3h
;
ljmp X616f
;
org 0d7h
;
ljmp X768b
;
org 0dbh
;
ljmp X83a7
;
org 0dfh
;
ljmp X95c2
;
org 0e3h
;
ljmp Xa3de
;
org 0e7h
;
ljmp Xb9fa
;
org 0ebh
;
inc r4
nop
;
org 0efh
;
inc r4
nop
;
org 0f3h
;
dec r0
nop
mov r3,a
nop
rl a
nop
movx @r0,a
nop
orl rb0r0,a
cjne r1,#0,X016e
nop
X0101: mov r7,#0
subb a,r6
nop
orl a,@r0
nop
movx a,@r0
nop
inc r4
nop
acall X0700
rr a
nop
mov r6,a
nop
ajmp X0000
;
org 12bh
;
sjmp X012d
;
X012d: nop
;
org 130h
;
X0130: movx @r0,a
movx @r0,a
movx @r0,a
X0133: movx @r0,a
nop
anl rb0r0,#19h
nop
anl rb0r0,#3eh
nop
mov 92h,a
addc a,rb1r0
nop
;
org 143h
;
inc r7
xrl a,r6
mov r2,rb0r0
mov r2,a
rr a
mov a,r0
nop
inc r0
nop
mov 71h,r4
ajmp X0271
;
mov 41h,71h
acall X0341
mov r4,a
nop
;
org 15ah
;
inc r7
xrl a,r6
mov r2,rb0r0
mov r7,a
;
org 16eh
;
X016e: mov r7,a
;
org 174h
;
inc r7
xrl a,r6
mov r2,rb1r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
jnz X01cc
xrl a,r6
mov r2,rb0r0
nop
inc r7
xrl a,r6
mov r2,0f4h
cpl a
cpl a
cpl a
mov r7,a
;
org 1cch
;
X01cc: mov r7,a
;
org 1e0h
;
addc a,r0
addc a,@r1
acall X0246
add a,r5
acall X0130
addc a,r0
addc a,#39h
add a,r5
addc a,r1
rlc a
mov r7,a
;
org 1f0h
;
addc a,#30h
acall X0133
nop
;
org 1f7h
;
ljmp X0200
;
org 200h
;
X0200: db 0ffh
;
; Register/Memory Equates
;
rb0r0 equ 0
rb0r1 equ 1
rb0r2 equ 2
rb0r5 equ 5
rb0r6 equ 6
rb1r0 equ 8
rb1r1 equ 9
rb1r4 equ 0ch
;
X0028 equ 28h
X00fe equ 0feh
X00ff equ 0ffh
X0102 equ 102h
X0246 equ 246h
X0271 equ 271h
X0304 equ 304h
X0341 equ 341h
X0501 equ 501h
X0700 equ 700h
X3902 equ 3902h
X451c equ 451ch
X4e38 equ 4e38h
X5753 equ 5753h
X616f equ 616fh
X768b equ 768bh
X83a7 equ 83a7h
X8405 equ 8405h
X95c2 equ 95c2h
Xa3de equ 0a3deh
Xb900 equ 0b900h
Xb9fa equ 0b9fah
;
end
;
Mình muốn tìm công thức tính số đếm từ chương trình này!, cảm ơn mọi người nhiều!
;
X0000: mov r7,a
X0001: addc a,r7
addc a,r7
rr a
rr a
X0005: ajmp X0001
;
X0007: add a,r7
addc a,r7
addc a,r7
mov a,#0c2h
inc r1
ajmp X006d
;
org 10h
;
ajmp X0001
;
org 14h
;
inc rb1r1
nop
;
org 1bh
;
ajmp X0501
;
xrl rb0r1,a
orl rb0r2,a
cjne a,rb0r1,X0007
inc a
inc r2
ljmp X8405
;
anl a,r2
rr a
add a,rb0r6
anl c,/20h.3
xch a,@r0
inc @r1
mov r3,a
inc a
xrl a,r0
inc r1
anl rb0r5,a
inc r1
inc r1
mov r5,t3
mov r7,a
;
org 42h
;
dec a
inc a
ljmp X0102
;
inc a
ajmp X0001
;
ajmp X0001
;
ajmp X0000
;
org 57h
;
lcall X0304
inc @r0
lcall X0101
ajmp X0001
;
ajmp X0000
;
org 6bh
;
inc a
inc a
X006d: inc a
inc a
inc a
ajmp X0001
;
ajmp X0001
;
ajmp X0000
;
org 8ah
;
dec r1
nop
inc a
mov a,r4
ajmp X0005
;
org 91h
;
inc a
nop
subb a,@r0
inc a
nop
;
org 97h
;
add a,r2
mov r2,cml2
nop
;
org 0a3h
;
add a,r2
mov r2,cml2
nop
;
org 0ach
;
dec r1
mov r7,a
;
org 0b2h
;
ajmp X0000
;
ajmp X00ff
;
org 0b7h
;
inc @r0
ajmp X0028
;
ljmp Xb900
;
inc r2
nop
ljmp X3902
;
cjne r1,#2,X00fe
nop
;
org 0c7h
;
ljmp X451c
;
org 0cbh
;
ljmp X4e38
;
org 0cfh
;
ljmp X5753
;
org 0d3h
;
ljmp X616f
;
org 0d7h
;
ljmp X768b
;
org 0dbh
;
ljmp X83a7
;
org 0dfh
;
ljmp X95c2
;
org 0e3h
;
ljmp Xa3de
;
org 0e7h
;
ljmp Xb9fa
;
org 0ebh
;
inc r4
nop
;
org 0efh
;
inc r4
nop
;
org 0f3h
;
dec r0
nop
mov r3,a
nop
rl a
nop
movx @r0,a
nop
orl rb0r0,a
cjne r1,#0,X016e
nop
X0101: mov r7,#0
subb a,r6
nop
orl a,@r0
nop
movx a,@r0
nop
inc r4
nop
acall X0700
rr a
nop
mov r6,a
nop
ajmp X0000
;
org 12bh
;
sjmp X012d
;
X012d: nop
;
org 130h
;
X0130: movx @r0,a
movx @r0,a
movx @r0,a
X0133: movx @r0,a
nop
anl rb0r0,#19h
nop
anl rb0r0,#3eh
nop
mov 92h,a
addc a,rb1r0
nop
;
org 143h
;
inc r7
xrl a,r6
mov r2,rb0r0
mov r2,a
rr a
mov a,r0
nop
inc r0
nop
mov 71h,r4
ajmp X0271
;
mov 41h,71h
acall X0341
mov r4,a
nop
;
org 15ah
;
inc r7
xrl a,r6
mov r2,rb0r0
mov r7,a
;
org 16eh
;
X016e: mov r7,a
;
org 174h
;
inc r7
xrl a,r6
mov r2,rb1r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
inc r4
addc a,r2
mov r7,a
rl a
jnz X01cc
xrl a,r6
mov r2,rb0r0
nop
inc r7
xrl a,r6
mov r2,0f4h
cpl a
cpl a
cpl a
mov r7,a
;
org 1cch
;
X01cc: mov r7,a
;
org 1e0h
;
addc a,r0
addc a,@r1
acall X0246
add a,r5
acall X0130
addc a,r0
addc a,#39h
add a,r5
addc a,r1
rlc a
mov r7,a
;
org 1f0h
;
addc a,#30h
acall X0133
nop
;
org 1f7h
;
ljmp X0200
;
org 200h
;
X0200: db 0ffh
;
; Register/Memory Equates
;
rb0r0 equ 0
rb0r1 equ 1
rb0r2 equ 2
rb0r5 equ 5
rb0r6 equ 6
rb1r0 equ 8
rb1r1 equ 9
rb1r4 equ 0ch
;
X0028 equ 28h
X00fe equ 0feh
X00ff equ 0ffh
X0102 equ 102h
X0246 equ 246h
X0271 equ 271h
X0304 equ 304h
X0341 equ 341h
X0501 equ 501h
X0700 equ 700h
X3902 equ 3902h
X451c equ 451ch
X4e38 equ 4e38h
X5753 equ 5753h
X616f equ 616fh
X768b equ 768bh
X83a7 equ 83a7h
X8405 equ 8405h
X95c2 equ 95c2h
Xa3de equ 0a3deh
Xb900 equ 0b900h
Xb9fa equ 0b9fah
;
end
;
Mình muốn tìm công thức tính số đếm từ chương trình này!, cảm ơn mọi người nhiều!