! "W N, p=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  r-lx  Pf eP5Ћ 4R`ȋ  `e `R7 product ~?sum4 @product.s JAsum.s YBlt* L T` J` @ ,pr e0 e0   ߋtvߋpr $x    `A _xx ,pr e0 e0   ߋtvߋpr icsr = 177560 ibuf = 177562 ocsr = 177564 obuf = 177566 mov $160000,sp loop: movb $'*,r0 jsr pc,out jsr pc,in mov $0-'0,r2 add r0,r2 jsr pc,in mov $0-'0,r3 add r0,r3 jsr pc,in mov $12,r0 jsr pc,out mul r3,r2 div $12,r2 mov r2,r0 add $'0,r0 jsr pc,out mov r3,r0 add $'0,r0 jsr pc,out mov $12,r0 jsr pc,out mov $15,r0 jsr pc,out br loop out: tstb *$ocsr bpl out mov r0,*$obuf rts pc in: tstb *$icsr bpl in movb *$ibuf,r0 jsr pc,out rts pc /* r0: number of integers added so far */ /* r1r2: sum of integers in [0, r0) */ /* r3: n */ io = 177570 / switch and display register 0 mov *$io,r3 clr r0 clr r1 clr r2 loop: cmp r0,r3 beq stop add r0,r2 adc r1 inc r0 br loop stop: mov r1,*$io 0 mov r2,*$io 0 ,r0 add $'0,r0 jsr pc,out mov $12,r0 jsr pc,out mov $15,r0 jsr pc,out br loop out: tstb *$ocsr bpl out mov r0,*$obuf rts pc in: tstb *$icsr bpl in movb *$ibuf,r0 jsr pc,out rts pc