( Assign names to each of the screen ports. ) %SCREEN.X 50; %SCREEN.Y 52; %SCREEN.WIDTH 54; %SCREEN.HEIGHT 56; %SCREEN.PALETTE 58; %SCREEN.DRAW 5E; ( Set colors. ) *:15CF STD*:SCREEN.PALETTE ( :3 ) *:2FAB STD*:SCREEN.PALETTE ( :3 ) *:3FFF STD*:SCREEN.PALETTE ( :3 ) *:4FAB STD*:SCREEN.PALETTE ( :3 ) *:55CF STD*:SCREEN.PALETTE ( :3 ) ( Set the screen width and height. ) *:0400 STD*:SCREEN.WIDTH *:0230 STD*:SCREEN.HEIGHT ( Setup ) :81 STD:SCREEN.DRAW ( Put down a pixel to pin the thingy ) *:0000 ( Put the starting y-cordinate in the stack ) *:00E0 ( Put the starting pallete index in the stack. double for swap convinience. ) ( Main program ) @loop JMS:put-screen-width-if-odd-or-0000-if-even STD*:SCREEN.X ( get the x location we need for this particular stripe and go to it ) SWP* JMS:walk-y SWP* ( Swap to having the y location on the top of the stack for just long enough to bump it and send ) JMS:draw-rect ( draw that thang ) DUP EQU:E5 NOT ( is the index E5? ) JCN:loop ( if it isn't, loop ) ( Just hold that right there and don't close. ) *:0000 STD*:00 @walk-y ADD*:0070 ( add one stripe-height to the number in the stack ) DUP* ( duplicate the new y-cordinate ) STD*:SCREEN.Y ( send the y-cordinate to the screen's y port ) JMPr ( we return to our regularly scheduled broadcast ) @draw-rect INC ( +1 pallete index ) DUP STD:SCREEN.DRAW ( dup the darg and send it ) JMPr ( we return to our regularly scheduled broadcast ) @put-screen-width-if-odd-or-0000-if-even DUP* ( duplicate what should be the darg ) AND*:0001 ( is it odd? ) JCN*:{ ( if it isn't ) LDD*:SCREEN.WIDTH ( push the screen width ) JMPr ( we return to our regularly scheduled broadcast ) } ( if it is ) *:0000 ( push 0000 ) JMPr ( we return to our regularly scheduled broadcast )