.NOLIST #include "ti83.inc" #DEFINE line1 saferam1 #DEFINE line2 saferam1+2 #DEFINE angle saferam1+4 #DEFINE time saferam1+6 #DEFINE numLoop saferam1+8 #DEFINE posy saferam1+10 #DEFINE posx saferam1+12 .org 9327h .LIST start: call _runIndicOff call _clrlcdfull call _Grbufclr call _zeroop1 ld hl,-1 ld (angle),hl ld hl,5 ld (time),hl ld (numLoop),hl ld hl,line1 ld (hl),26 ld hl,line2 ld (hl),50 ld hl,posy ld (hl),25 ld bc,spriteShip ld a,(posy) ld e,a ld a,30 call SPRXOR mainloop: ld hl,$0204 ld (PENCOL),hl call _Plus1 ld a,6 call _DISPOP1A ld bc,spriteShip ld a,(posy) ld e,a ld a,30 call SPRXOR ld a,(numLoop) or a jp z,addPosy dec a ld (numLoop),a afterAddPosy: ld hl,PLOTSSCREEN+300h ld b,3 startLoopScroll: push bc ld b,0 loopScroll: rl (hl) dec hl djnz loopScroll pop bc djnz startLoopScroll ld a,r sla a cp 128 jp m,less more: ld e,1 jp suit less: ld e,$FF suit: ld a,(line1) add a,e cp 3 jp z,more ld e,a ld a,(line2) sub e cp 14 jp p,pasACote ld a,(line1) ld e,$FF add a,e ld l,0 ld e,a pasACote: ld a,e ld (line1),a ld e,a ld d,$5E ld c,0 ld b,d ld h,1 call _ILINE ld a,l or a jp z,more1 ld a,r sla a cp 128 jp m,less1 more1: ld e,1 jp suit1 less1: ld e,$FF suit1: ld a,(line2) add a,e cp 60 jp z,less1 ld (line2),a ld e,a ld d,$5E ld c,$3E ld b,d ld h,1 call _ILINE ld b,63 ld de,12 ld hl,PLOTSSCREEN clrFstPx: ld a,(hl) and %1111111 ld (hl),a add hl,de djnz clrFstPx ld bc,spriteShip ld a,(posy) ld e,a ld a,30 ;call SPRXOR call _GRBUFCPY ld a,62 ld bc,(posy) sub c ld c,a ld b,36 ld d,3 call _IPOINT jr nz,quit ld a,57 ld bc,(posy) sub c ld c,a ld b,36 ld d,3 call _IPOINT jr nz,quit jp mainloop quit: call _Grbufclr call _clrlcdfull jp _dispDone ;end up: ld hl,time ld a,(angle) or a jp p,negative inc (hl) ld a,(hl) cp 4 jp m,suit3 ld a,1 ld (angle),a jp suit3 negative: ld a,(hl) cp 1 jp z,suit3 dec (hl) jp suit3 addPosy: ld a,(angle) ld hl,posy cp 1 jp z,positive inc (hl) inc (hl) positive: dec (hl) ld a,0ffh out (1),a ld a,0feh out (1),a in a,(1) cp 247 jp z,up ld hl,time ld a,(angle) cp -1 jp z,negative inc (hl) ld a,(hl) cp 4 jp m,suit3 ld a,-1 ld (angle),a suit3: ld a,(time) ld (numLoop),a jp afterAddPosy spriteShip: .db %00011000 .db %00010000 .db %01111100 .db %11111110 .db %11111110 .db %01111100 .db %00000000 .db %00000000 #include "../MOVAX.Z80" .end