-
Notifications
You must be signed in to change notification settings - Fork 0
/
ANAGMA-A.txt
31 lines (31 loc) · 996 Bytes
/
ANAGMA-A.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1 'ANAGMA-A
2 CLS:CLV
3 LC10,12:?"<<ANAGMA-A>>":WAIT60
14 CLS:LC10,1:?"MODE CHOICE":LC11,7:?"ENCODE: 1":LC11,9:?"DECODE: 2"
16 K=INKEY():IFK=49Q=1:GOTO20ELSEIFK=50Q=2:GOTO20
18 GOTO16
20 CLS:CLK:W=0:LC 1,2:?"PLEASE INPUT 12 DIGIT CODEKEY"
22 LC 10,4:?"<4 DIGIT x3>"
25 FORG=0TO2
30 LC12,12+2*G:INPUTN:IFN>9999ORN<1000GOTO30
40 A=4*G:GSB400:NEXT
140 CLS:LC0,0:?"INPUT:":LC0,12:?"OUTPUT:"
160 K=INKEY():CLK:IFK=0 GOTO160
162 IF K=8ORK=10 GOTO170
163 IF K=24 GOTO170
164 IF K<27ORK>127 GOTO160
170 IF K=24 POKE#AA0+I,95+(Q=1)*[W]-(Q=2)*[W]:POKE#920+I,95:GOTO330
173 IFK=127 RUN
176 IF K=10 POKE#920+I,10:POKE#AA0+I,10:GOTO330
178 IF K<>8 GOTO190
180 IF I=0 POKE#920,0:POKE#AA0,0:GOTO160
182 IFW>-1&&I>-1I=I-1:W=W-1:POKE#920+I,0:POKE#AA0+I,0:GOTO160
184 IFW<0W=11:GOTO182
186 IFI<0GOTO160
190 IFW<0W=11
200 POKE#920+I,K
320 POKE#AA0+I,K+(Q=1)*[W]-(Q=2)*[W]
330 I=I+1:W=W+1:IFW=12W=0
350 IFI=320I=0
360 GOTO160
400 [A]=N/1000:[A+1]=(N%1000)/100:[A+2]=((N%1000)%100)/10:[A+3]=((N%1000)%100)%10:RTN