Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2019/08/24 10:14:45

MixJuice GET URL : kidspod.club/mj/894

FILE TYPE 保存してあるプログラムでタイプ練習

プログラムの入力が速くできるようになりたい。

EEPROMに保存したプログラムを、入力する練習をします。

SOURCE CODE

NEW
10 'FILE TYPE-INIT
20 F=FILE():J=0
30 CLS:?"FILE TYPE":?
40 FILES 100,110
50 ?:INPUT "FILE:",N
60 CLS:?"FILE TYPE":?:FILESN,N
70 LC0,4:?"HIT A ";
80 @K:K=INKEY():IFK=0CONT
90 IFK<>65:?CHR$(K);:GOTO@K
100 PLAY "T200L16<CEG<C"
110 IFSOUND()CONT
120 ?:O=0:X=0:CLT
130 S=(N-100)*1024
140 B=#800:L=200:?
150 LRUNF+1

SAVE 0

NEW
10 'FILE TYPE-READ
20 POKE #8CC,S/256,S%256
30 R=I2CR(80,#8CC,2,B,L)
40 LC0,6,1
50 IF[0]=0LRUNF+3
60 ?CHR$(12);[0];" ";
70 E=PEEK(#802)
80 FORI=#803TO#802+E
90 C=PEEK(I):IFC>32?CHR$(C);
100 NEXT
110 ?:S=S+E+4:P=0:LRUNF+2

SAVE 1

NEW
10 'FILE TYPE-TYPE
20 @T:Z=PEEK(#900+32*6+P)
30 K=INKEY():IFK=0CONT
40 IFZ=KBEEP10:?CHR$(K);:O=O+1:P=P+1:GOTO@NE
50 IF((K>=161)*(K<=224))GOTO@ER
60 IF((Z>=161)*(Z<=224))GOTO@JP
70 @ER:IF(K>31)*(K<>127)?CHR$(K);:BEEP20:WAIT20:?CHR$(8);
80 X=X+1:GOTO@T
90 @JP:IF(J>0)*(K=8)?CHR$(8);:J=J-1:GOTO@T
100 IFK>31BEEP10:?CHR$(K);:J=J+1
110 GOTO@T
120 @NE:IFPEEK(#900+32*6+P)<>0GOTO@T
130 @LF:K=INKEY():IFK=0CONT
140 IFK<>10:BEEP20:WAIT20:GOTO@LF
150 FORI=0TO(E+31)/16:SCROLL0:NEXT

SAVE 2

NEW
10 'FILE TYPE-END
20 T=TICK()/60:?
30 ?O;"モジ ";
40 ?"ミス ";X;"カイ ";
50 ?T;"ビョウ":?
60 PLAY "L16<GFEDC"
70 ?:?"HIT A ";
80 @K:K=INKEY():IFK=0CONT
90 IFK<>65:?CHR$(K);:GOTO@K
100 CLS:LRUNN

SAVE 3

COMMENT