我对我写的简单程序有点困惑,你能解释一下为什么它在只打印一个字符后退出,我希望它每 5 秒打印一次我的字符,提前谢谢
tks = 177560
tkb = 177562
tps = 177564
tpb = 177566
lcs = 177546
. = torg + 2000
main: mov #main, sp
mov #clock, @#100 ; vector interrupt of the clock 100-102
mov #300, @#102 ;
mov #100, @#lcs ; here I enable interrupt-enable of the clock
prog: clr r0 ; here endless loop
beq prog
halt
clock: inc count
cmp count, timeout
bne clk_end
clr count
mov #'*, @#tpb
clk_end:rti
. = torg + 3000
timeout: .word 300000
count: .word 0