我对我写的简单程序有点困惑,你可以吗? 请解释为什么它只打印一个字符后就退出,我预料到了 每 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
最佳答案
这肯定是一个与模拟器相关的问题,因为我尝试运行你的代码,并且它工作正常!
您是以色列理工学院的学生吗?
关于assembly - pdp-11 上的时钟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3087618/