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

2019/04/18 21:31:23

MixJuice GET URL : kidspod.club/mj/794

Jam to CAKE EEPROM(Cake BASIC)

IchigoCake BASIC 専用プログラムです。
IchigoJam BASIC では動作しません。

詳細は イチゴジャム レシピ で公開しています。
「プログラムをみる」を参照して下さい。

SOURCE CODE

CLS
 
NEW
 
10 'IchigoJam to Cake EEPROM
20 CLV:S=32
30 [102]=0:'IchigoCake Only!
40 INPUT"Jam Load No.?",N
50 N=N-100
60 FOR B=0 TO 1023 STEP S
70 POKE #800,N*4+B/256,B%256
80 A=#50+(N>63)*4
90 R=I2CR(A,#800,2,#1400+B,S)
100 NEXT
110 INPUT"Cake Save No.?",N
120 N=N-100
130 POKE #800,N*16,0
140 A=#50+(N>15)*4
150 R=I2CR(A,#800,2,#880,S)
160 P=PEEK(#880)
170 IF P=0 OR P=255 GOTO 220
180 ?"Found Data!";
190 INPUT"Continue(Y=1/N=2)?",C
200 IF C=2 END
210 IF C<>1 GOTO 180
220 FOR B=0 TO 1023 STEP S
230 POKE #800,N*16+B/256,B%256
240 A=#50+(N>15)*4
250 R=I2CW(A,#800,2,#1400+B,S)
260 NEXT
270 FOR B=1024 TO 4095 STEP S
280 POKE #800,N*16+B/256,B%256
290 A=#50+(N>15)*4
300 R=I2CW(A,#800,2,#C00,S)
310 NEXT

'OK

COMMENT