xor
a,20h
; timer overflow register “XOR”
; with 20h
sz
acc
; check over 20h
jmp
timer_nov
; if not over 20h , jump timer_nov
mov
a,00001011b
;
reti
;(4)
; return from ISR
timer_nov:
; timer_nov
clr
acc
;
reti
; return ISR
start:
; program start
mov
a,07h
;(1)
; setup INTC (external INT ON,
; timer ON)
mov
intc,a
;
mov
a,80h
; setup timer mode (internal clock)
mov
mrc,a
;
clr
pcc
; set port C as output port
top:
;(13)
; top
set
pac
;(12)
; set port A as input port
set
pbc
; set port B as input port
clr
addrl
; clear low byte address register
clr
addrh
; clear high byte address register
mov
a,00001001b
; move acc=00001001,
; (BUSY=1, ACK=0, OE=0, WR=1)
mov
pc,a
;(3)
; output acc to port C
clr
acc
;
store:
; store
snz
acc.0
;(4)
; check acc.0=“0”.if external INT
; interrupt,will change acc.0=“1”
jmp
store
; if acc.0=“0” jump store
clr
pac
;(5)
; if acc.0=“1” , set port A as
; output port
clr
pbc
; set port B as output port
next:
; next
mov
a,addrl
;(6)
;
mov
pa,a
; output low byte address register
; to port A
mov
a,addrh
;
mov
pb,a
; output low byte address register
; to port B
inc
addrl
; increment low byte address register
sz
addrl
; check if equal to 0
jmp
no_inc
; if not 0 jump no_inc
mov
a,1
;
addm
a,addrh
; increment high byte address
; register
no_inc:
; no_inc
mov
a,00000010b
; move acc=00000010,
; (BUSY=0, ACK=0, OE=1,WR=0)
mov
pc,a
;(7)
; output acc to port C
HT-IDE User’s Guide
222
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...