Download Electronic maze game
Transcript
10 -continued dn It rt out me reset newgam beg int adv setss xloop . mov a.r2 jbl start dec jmp mov jb3 dec r4 out jmp out a,r2 start r5 mov a,r2 jb2 start inc r5 call displa mov a,r5 swap a Test for end add xrl a,r4 a,r7 jnz strt Keep going clr a End outl bus,a Display box cpl mov a r2,a anl p2,#7fh Generate interrupt jtO dis me i Wait for reset button anl p2,#7fh Generate interupt clr ?) cpl ?) Set ?ag clr sel mov mov sel mov cpl a rbl r5,a r6,a rbO r2,a a Clear Display outl jmp bus,a start2 clr jbO 10 setss jbl int jb2 beg clr moves cntr and register Clear reset ?ag repeat last game jb3 adv jmp start error if pgm gets here mov a,t Get random number anl a,#3 Mask'it mov r3,a jmp setss mov a,t anl orl a,#3 a,#4 mov r3,a jmp setss mov a,t anl orl a,#7 a,#8 mov mov ids mov inc r3,a a,r3 tcnti orl p2,#80h djnz r0,kt Add offset Xmit game # r0,a r0 en tcnti call xyss call displa jmp start clear interrupt kt mov rl,#40h time delay for game # xmit routine kt2 djnz anl rl,kt2 p2,#7fh Set interrupt mov rl,#40h kt3 djnz rl,kt3 jmp xloop ‘Display subroutine displa mov a,r5 VERT BARS - set up cntr Get Y add 8 add data table base addr get data word set carry cpl c