Skip to main content
optimized it, learned new tactics with casio BASIC
Source Link

Casio BASIC (Casio FX-9750GIII), 532532 468 bytes

"............................... !.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~."→Str 3
50→Dim255→Dim List 1
{0,-1,1}→List 2
50→Dim List 3
1→P
1→S
1→L1→L~S
For 1→I To StrLen(Str 1)
StrMid(Str 1,I,1)→Str1→Str 2
If Not D
Then If Not StrCmp(Str 2,"."
Then Q+1→Q
1+MOD(Q-1,20→Z21→Z
List 1[P]-31→J
J<1⇒15→J
Locate Z,(Int (Q/20Q÷22))+1+2,StrMid(Str 3,List 1[P]J,1)
Isz Q
IfEnd
MOD(List 1[P]+(Not1[P]+List StrCmp2[StrScr(Str 2,"+"))"-(Not StrCmp(+",Str 2,"-"))+1],255)→List255→List 1[P]
MOD(P+1+MOD(NotP+List StrCmp2[StrSrc(Str 2"12","2"))-(Not StrCmp(Str 2,"1"))+1]-1,255)→P255→P
IfEnd
If Not StrCmp(Str 2,"["
Then If Not List 1[P] Or D=11[P]+D
Then S+1→SI→List 3[L]
1→DIsz L
Else I→ListIsz 3[L]S
L+1→L1→D
IfEnd
IfEnd
If Not StrCmp(Str 2,"]"
Then S>1⇒Dsz S-(S>1)→S
If S(DSD
Then 0→D
Dsz S-1→S
Else If Not List 1[P]
Then L-1→L
Else List 3[L-1]→I
Else Dsz L
IfEnd
IfEnd
IfEnd
Next
While Not Getkey
WhileEnd

this isn't perfect AT ALL. you can't do input.

You have to enter the program into Str 1, and you have to replace < and > with 1 and 2 respectively

its also super slow (but not slower than the TI-84 program I made a while earlier)

Casio BASIC (Casio FX-9750GIII), 532 bytes

"............................... !.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~."→Str 3
50→Dim List 1
50→Dim List 3
1→P
1→S
1→L
For 1→I To StrLen(Str 1)
StrMid(Str 1,I,1)→Str 2
If Not D
Then If Not StrCmp(Str 2,"."
Then Q+1→Q
1+MOD(Q,20→Z
Locate Z,(Int (Q/20))+1,StrMid(Str 3,List 1[P],1)
IfEnd
MOD(List 1[P]+(Not StrCmp(Str 2,"+"))-(Not StrCmp(Str 2,"-")),255)→List 1[P]
MOD(P+(Not StrCmp(Str 2,"2"))-(Not StrCmp(Str 2,"1")),255)→P
IfEnd
If Not StrCmp(Str 2,"["
Then If Not List 1[P] Or D=1
Then S+1→S
1→D
Else I→List 3[L]
L+1→L
IfEnd
IfEnd
If Not StrCmp(Str 2,"]"
Then S-(S>1)→S
If S(D
Then 0→D
S-1→S
Else If Not List 1[P]
Then L-1→L
Else List 3[L-1]→I
IfEnd
IfEnd
IfEnd
Next
While Not Getkey
WhileEnd

this isn't perfect AT ALL. you can't do input.

You have to enter the program into Str 1, and you have to replace < and > with 1 and 2 respectively

its also super slow (but not slower than the TI-84 program I made a while earlier)

Casio BASIC (Casio FX-9750GIII), 532 468 bytes

" !.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~."→Str 3
255→Dim List 1
{0,-1,1}→List 2
50→Dim List 3
1→L~S
For 1→I To StrLen(Str 1
StrMid(Str 1,I,1→Str 2
If Not D
Then If Not StrCmp(Str 2,"."
Then 1+MOD(Q-1,21→Z
List 1[P]-31→J
J<1⇒15→J
Locate Z,(Int (Q÷22))+2,StrMid(Str 3,J,1)
Isz Q
IfEnd
MOD(List 1[P]+List 2[StrScr("-+",Str 2)+1],255→List 1[P]
1+MOD(P+List 2[StrSrc("12",Str 2)+1]-1,255→P
IfEnd
If Not StrCmp(Str 2,"["
Then If List 1[P]+D
Then I→List 3[L]
Isz L
Else Isz S
1→D
IfEnd
IfEnd
If Not StrCmp(Str 2,"]"
Then S>1⇒Dsz S
If SD
Then 0→D
Dsz S
Else If List 1[P]
Then List 3[L-1]→I
Else Dsz L
IfEnd
IfEnd
IfEnd
Next

this isn't perfect AT ALL. you can't do input.

You have to enter the program into Str 1, and you have to replace < and > with 1 and 2 respectively

its also super slow (but not slower than the TI-84 program I made a while earlier)

Source Link

Casio BASIC (Casio FX-9750GIII), 532 bytes

"............................... !.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~."→Str 3
50→Dim List 1
50→Dim List 3
1→P
1→S
1→L
For 1→I To StrLen(Str 1)
StrMid(Str 1,I,1)→Str 2
If Not D
Then If Not StrCmp(Str 2,"."
Then Q+1→Q
1+MOD(Q,20→Z
Locate Z,(Int (Q/20))+1,StrMid(Str 3,List 1[P],1)
IfEnd
MOD(List 1[P]+(Not StrCmp(Str 2,"+"))-(Not StrCmp(Str 2,"-")),255)→List 1[P]
MOD(P+(Not StrCmp(Str 2,"2"))-(Not StrCmp(Str 2,"1")),255)→P
IfEnd
If Not StrCmp(Str 2,"["
Then If Not List 1[P] Or D=1
Then S+1→S
1→D
Else I→List 3[L]
L+1→L
IfEnd
IfEnd
If Not StrCmp(Str 2,"]"
Then S-(S>1)→S
If S(D
Then 0→D
S-1→S
Else If Not List 1[P]
Then L-1→L
Else List 3[L-1]→I
IfEnd
IfEnd
IfEnd
Next
While Not Getkey
WhileEnd

this isn't perfect AT ALL. you can't do input.

You have to enter the program into Str 1, and you have to replace < and > with 1 and 2 respectively

its also super slow (but not slower than the TI-84 program I made a while earlier)