I have this snippet of the code. can somebody explain why It doesn't work, I want every 5 seconds print "Syntax Error"
thanks in advance
tks = 177560
tkb = 177562
tps = 177564
tpb = 177566
lcs = 177546
. = torg + 2000
main: mov #main, sp
mov #outp, @#64
mov #200, @#66
mov #clock, @#100
mov #300, @#102
mov #101, @#tks
mov #100, @#tps
mov #100, @#lcs
prog: mov #msg, -(sp)
br outp
clock: inc time_is
cmp time_is, time_out
bne clk_end
clr time_is
jmp prog
clk_end:rti
outp:
mov r1,-(sp)
mov r2,-(sp)
mov 6(sp),r2
str_loop:
movb (r2)+,r1
beq pr_str_end
jsr pc, print_char
br str_loop
pr_str_end:
mov (sp)+,r2
mov (sp)+,r1
rts pc
print_char:
tstb @#tps
bpl print_char
movb r1, @#tpb
rts pc
. = torg + 3000
msg:.ascii<Syntax Error>
.byte 0
.even
time_out: .word 300
time_is: .word 0
buffer: .blkw 3