8-Bit Software Online Conversion
Amoeba. Version 2 - Listing
0 DATA"
"
10 DATA" 10 000
01 "
20 DATA" 10 111
01 "
30 DATA" 10 000
000 01 "
40 DATA" 10 111
111 01 "
50 DATA" 10 000 000
000 01 "
60 DATA" 10 111 111
111 01 "
70 DATA"10 000 000 000
000 01 "
80 DATA" 10 111 111 111
111 01 "
90 DATA" 10 000 000
1100 0101 "
100 DATA" 10 00010 0011
000 01 "
110 DATA" 10 000 00010
0011 01 "
120 DATA" 10 000 000
000 111 01 "
130 DATA" 10 00010 0011
1100 0101 "
140 DATA" 10 000 00010
0011 111 01 "
150 DATA" 10 111 111
1100 0101 "
160 DATA" 10 10111 0011
111 01 "
170 DATA" 10 10111 0011
1100 0101 "
180 DATA" 10 111 111
111 000 01 "
190 DATA" 10 111 10111 0
011 01 "
200 DATA" 10 111 10111 0
011 000 01 "
210 DATA" 10 1100 0011
01 "
220 DATA" 10 00010 0011
01 "
230 DATA" 10 000 000
111 01 "
240 DATA" 10 00010 0011
111 01 "
250 DATA" 1010 0011 1100
0101 "
260 DATA" 10 111 111
000 01 "
270 DATA" 10 10111 0011
01 "
280 DATA" 10 10111 0011
000 01 "
290 DATA" 1010 0011
111 01 "
300 DATA" 1010 0011
000 01 "
310 DATA" 1010 00100
0001 01 "
320 DATA" 10 1000 0011
000 01 "
330 DATA" 10 1000 00100
0001 01 "
340 DATA" 10 1110 0011
111 01 "
350 DATA" 1010 11011
0111 01 "
360 DATA" 10 1110 11011
0111 01 "
370 DATA" 1010 10011
0011 01 "
380 DATA" 101010 000011
0011 01 "
390 DATA" 10 1000 0011
111 01 "
400 DATA" 10 000 1000 0011
111 01 "
410 DATA" 1010 00110
0011 01 "
420 DATA" 101010 001111
0011 01 "
430 DATA" 10 1110 0011
000 01 "
440 DATA" 10 111 1110 0011
000 01 "
450
451 REM ***************************
460 REPEAT
470 MODE7
480 PRINT'''TAB(10)"1...PRINT CARDS"
490 PRINTTAB(10)"2...PLAY GAME"
500 PRINT'TAB(10)"OPTION ? "
510 A$=GET$
520 UNTIL A$="1" OR A$="2"
530 IF A$="2" THEN 1660
531 REM ***************************
540
550 MODE4
560 ONERRORPROCerror
570 *KEY10"OLD|M"
580 VDU23,1,0;0;0;0;
590 VDU23,244,&18,&18,&30,&E3,&C7,&0C,
&18,&18
600 VDU23,245,&18,&18,&0C,&C7,&E3,&30,
&18,&18
610 CLS
620 PRINT"These cards do not quite fit
on a"
630 PRINT"sheet of A4, but will do if
the paper"
640 PRINT"is turned half way, so this
program"
650 PRINT"prompts you to do so."
660 PRINT''"Ready printer press a key
when ready."
670 A=GET
680 CLS
690 FOR I=1 TO 44 STEP 4
700 IF I=21 PROCturnpage
710 FOR N=0 TO 3
720 PROCgetcard(I+N)
730 PROCdcard(N,25,G$)
740 NEXT
750 PROCprint
760 REMA=GET
770 NEXT
780
790 VDU23,1,1;0;0;0;
800 PRINTTAB(0,0)"ALL DONE"
810 END
820
830 DEFPROCturnpage
840 PRINTTAB(0,10)"TURN PAPER AND PRES
S A KEY":A=GET
850 CLS
860 ENDPROC
870
880 DEFPROCgetcard(C%)
890 RESTORE C%*10
900 READ G$
910 ENDPROC
920
930 DEFPROCdcard(x,y,G$)
940 FOR SY%=1 TO LEN(G$) STEP 7
950 N%=SY% DIV 7 +y
960 C$=MID$(G$,SY%,7)
970 PRINTTAB(x*10,N%);
980 FOR J%=1 TO 7
990 IF MID$(C$,J%,1)="1" VDU244
1000 IF MID$(C$,J%,1)="0" VDU245
1010 IF MID$(C$,J%,1)=" " VDU32
1020 NEXT
1030 NEXT
1040 ENDPROC
1050
1060 DEFPROCprint
1070 PROCassemble
1080 REM*LOAD SCREEN
1090 *FX 5,1
1100 VDU2,1,27,1,65,1,8
1110 FOR Y%=255 TO 0 STEP -32
1120 VDU 1,27,1,75,1,64,1,1
1130 FOR X%=0 TO 1279 STEP 4
1140 !Xlo=X%+Y%*&10000
1150 ?bitstodo=8
1160 CALL makebyte
1170 NEXT
1180 VDU1,10
1190 NEXT
1200 REMVDU1,12,3
1210 VDU3
1220 ENDPROC
1230
1240 DEF PROCassemble
1250 OSWORD=&FFF1
1260 OSWRCH=&FFEE
1270 DIM S% 80
1280 Xlo=S%
1290 Xhi=S%+1
1300 Ylo=S%+2
1310 Yhi=S%+3
1320 colour=S%+4
1330 byte=S%+5
1340 bitstodo=S%+6
1350 S%=S%+7
1360 FOR opt=0 TO 2 STEP 2
1370 P%=S%
1380 [OPT opt
1390 .makebyte LDA #9
1400 LDX #Xlo MOD 256
1410 LDY #Xlo DIV 256
1420 JSR OSWORD
1430 CLC
1440 LDA colour
1450 BNE rotate
1460 SEC
1470 .rotate ROL byte
1480 SEC
1490 LDA Ylo
1500 SBC #4
1510 STA Ylo
1520 BCC dec`Yhi
1530 JMP decdone
1540 .dec`Yhi DEC Yhi
1550 .decdone DEC bitstodo
1560 BNE makebyte
1570 LDA #1
1580 JSR OSWRCH
1590 LDA byte
1592 EOR #&FF
1600 JSR OSWRCH
1610 RTS
1620 ]
1630 NEXT opt
1640 ENDPROC
1650
1660 REM ***** GAME *****
1670 MODE4
1680 ONERRORPROCerror
1690 *KEY10"OLD|M"
1700 PROCinit
1710
1720 REPEAT
1730 PROCflash
1740 PROCpboard
1750 PROCkeys
1760 UNTIL FALSE
1770
1780 END
1790
1800 DEFPROCkeys
1810 IF K% A$=INKEY$(50) ELSE PROCpaddl
es
1820 Q%=INSTR("! AZaz,.",A$)
1830 IFQ%=2 PROCadjust
1840 IFQ%<3 ENDPROC
1850 IFQ%=7 xpos%=FNdec(xpos%)
1860 IFQ%=8 xpos%=FNinc(xpos%)
1870 IF(Q%=4ORQ%=6) ypos%=FNinc(ypos%)
1880 IF(Q%=3ORQ%=5) ypos%=FNdec(ypos%)
1890 IFQ%>2 PROCmove
1900 ENDPROC
1910
1920 DEFPROCpaddles
1930 A$=INKEY$(50)
1940 IF ADVAL(1) < 20000 A$="."
1950 IF ADVAL(1) > 50000 A$=","
1960 IF ADVAL(2) < 20000 A$="Z"
1970 IF ADVAL(2) > 50000 A$="A"
1980 IF ADVAL(3) < 20000 A$="."
1990 IF ADVAL(3) > 50000 A$=","
2000 IF ADVAL(4) < 20000 A$="Z"
2010 IF ADVAL(4) > 50000 A$="A"
2020 X=ADVAL(0) AND 3
2030 IF X A$=" "
2040 ENDPROC
2050
2060 DEFPROCadjust
2070 IF ?addr%=244 OR ?addr%=246 ?addr%
=245:ENDPROC
2080 IF ?addr%=245 OR ?addr%=247 ?addr%
=244
2090 ENDPROC
2100
2110 DEFFNdec(var%)
2120 IF var%>0 THEN var%=var%-1
2130 =var%
2140
2150 DEFFNinc(var%)
2160 IF var%<6 THEN var%=var%+1
2170 =var%
2180
2190 DEFPROCmove
2200 PROCnotinv
2210 addr%=&900+(ypos%*7)+xpos%
2220 ENDPROC
2230
2240 DEFPROCflash
2250 IF ?addr%=244 ?addr%=246:ENDPROC
2260 IF ?addr%=245 ?addr%=247:ENDPROC
2270 PROCnotinv
2280 ENDPROC
2290
2300 DEFPROCnotinv
2310 IF ?addr%=246 ?addr%=244
2320 IF ?addr%=247 ?addr%=245
2330 ENDPROC
2340
2350 DEFPROCpboard
2360 VDU30,31,0,10
2370 FOR SY%=1 TO 49 STEP 7
2380 N%=SY% DIV 7 + 10
2390 PRINTTAB(17,N%)MID$($&900,SY%,7)
2400 NEXT
2410 ENDPROC
2420
2430 DEFPROCinit
2440 PRINT''" ********* ACTIVE KEYS **
*******"
2450 PRINT''TAB(10)" A...UP"
2460 PRINTTAB(10)" Z...DOWN"
2470 PRINTTAB(10)" <...LEFT"
2480 PRINTTAB(10)" >...RIGHT"
2490 PRINT" SPACE BAR...TOGGLE"
2500 PRINT''TAB(10)"PRESS P FOR PADDLES
"''
2510 Q$=GET$
2520 CLS
2530 IF Q$="P" OR Q$="p" THEN K%=0 ELSE
K%=1
2540 VDU23,1,0;0;0;0;
2550 VDU19,0,4;0;0;0;
2560 VDU23,244,&18,&18,&30,&E3,&C7,&0C,
&18,&18
2570 VDU23,245,&18,&18,&0C,&C7,&E3,&30,
&18,&18
2580 VDU23,246,&E7,&E7,&CF,&1C,&38,&F3,
&E7,&E7
2590 VDU23,247,&E7,&E7,&F3,&38,&1C,&CF,
&E7,&E7
2592 t1$=CHR$(244)
2594 t2$=CHR$(245)
2596 T$=" "+t1$+t2$+t1$+t2$+t1$+t2$+" "
2598 L$=T$+T$+T$+T$+T$
2610 FOR I%=1 TO 14
2620 PRINTL$
2630 NEXT
2640 *FX4,1
2650 S1$="XXXXXXX":S2$="XXXXXXX"
2660 xpos%=0:ypos%=0:addr%=&900
2690 S1$=t1$+t2$+t1$+t2$+t1$+t2$+t1$
2700 S2$=t2$+t1$+t2$+t1$+t2$+t1$+t2$
2710 $&900=S1$+S2$+S1$+S2$+S1$+S2$+S1$
2720 ENDPROC
2730
2740 DEFPROCerror
2750 VDU23,1,1;0;0;0;
2760 *FX4,0
2770 END
2780 ENDPROC