$mod52
org 0h
ljmp start
org 0bh
ljmp t0int
org 1bh
ljmp t1int
org 100h
start:
mov sp,#50h
mov ie,#8ah
mov ip,#0ah
mov tmod,#11h
mov 20h,#14h
mov 21h,#00h
mov tl0,#0bah
mov th0,#03ch
setb tr0
setb tr1
loop:
lcall 8300h
sjmp loop
t0int:
mov tl0,#0bah
mov th0,#03ch
djnz 20h,nex
push acc
read:
mov 22h,21h
mov a,th1
mov 24h,tl1
cjne a,th1,read
mov 23h,a
pop acc
mov th1,#00
mov tl1,#00
mov 21h,#00
mov 20h,#14h
nex:
reti
t1int:
inc 21h
reti
end
『本文转载自网络,版权归原作者所有,如有侵权请联系删除』