; Produce patterns on the HP48SX display. swap.a c,d0 ; Save d0, d1 push.a c swap.a c,d1 push.a c ; Now we can manipulate the screen move.p5 0x7097c,a move.p5 2176,c add.a a,c move.a c,r1 ; r1 is stopping address move.p2 0xff, a move.w a,r2 ; r2 is value to store move.p5 256,a move.a a,r3 ; r3 is global count outer: ; Outer loop move.p5 0x7097c,a move.a a,r0 ; r0 is current address lupe: move.a r0,a ; Store value move.a a,d0 move.a r2,a move.2 a,@d0 ; Increment address move.a r0,a move.a r1,c inc.a a inc.a a move.a a,r0 ; Loop brgt.a c,a,lupe ; Change pattern move.b r2,a dec.b a move.b a,r2 ; Outer loop move.a r3,a dec.a a move.a a,r3 brnz.a a,outer ; return to the next RPL Instruction pop.a c swap.a c,d1 pop.a c swap.a c,d0 move.a @d0,a add.a 5,d0 jump @a