.LOGCALC
A=1
While A != 5
Lbl 1
Repeat getKey->Z
End
If Z=x and Z=y and Z=..... (all keys, but 4,down key and 1)
Goto 1
End
If Z=1 //down key
A+A->A
End
If Z=34 //1 key
A+A->A
End
If Z=35 // 4key
A+1->A //A should now be 5
End
Data(1,2,3,4)->Str1
0->S
Repeat S=4
0->S
ClrHome
For(F,0,3
0->K
Repeat K
getKey->K
End
{Str1+F}=K+S->S
Output(F,0,"*
End
End
Output(0,0,"Welcome!
What I've used was Krolypto. I don't know anybody that could get past it (except for myself, but you need a screwdriver).
If you don't want to do that, see if you have calcutil. If you do, you can use its run program on startup functionYou can make your program run on startup, archived or not, ASM or not.Spoiler For how:
Data(1,2,3,4)->Str1
0->S
Repeat S=4
0->S
ClrHome
For(F,0,3
0->K
Repeat K
getKey->K
End
{Str1+F}=K+S->S
Output(F,0,"*
End
End
Output(0,0,"Welcome!
:.LOGCALC
:ClrHome
:1→A
:While A≠5
:Lbl 1
:Repeat getKey→Z
:End
:If Z=1 or Z=2 or Z=3 or Z=4 or Z=5 or Z=6 or Z=7 or Z=8 or Z=9 or Z=10 or Z=11 or Z=12 or Z=13 or Z=14 or Z=15 or Z=16 or Z=17 or Z=18 or Z=19 or Z=20 or Z=21 or Z=22 or Z=23 or Z=24 or Z=25 or Z=26 or Z=27 or Z=28 or Z=29 or Z=30 or Z=31 or Z=32 or Z=33 or Z=35 or Z=36 or Z=37 or Z=38 or Z=39 or Z=40 or Z=41 or Z=42 or Z=43 or Z=44 or Z=45 or Z=46 or Z=47 or Z=48 or Z=49 or Z=50 or Z=51 or Z=52 or Z=54
:Goto 1
:End
:If Z=1
:A+A→A
:End
:If Z=34
:A+A→A
:End
:If Z=35
:A+1→A
:End
:End
Data( just stores data. It's like a list in BASIC. Then all Builderboy's routine does is gets keys four times, each time checking to see if it matches the Nth term in the list. You should change 1, 2, 3, and 4 to the keycodes of whatever keys you want :)
It's a lot smaller than hardcoding the key checks yourself.
:.LOGCALC
:ClrHome
:1→A
:!If A=5 An "!" does the same thing as ≠
:Lbl 1
:Repeat getKey→Z
:End
:! If Z=1+(Z=34)+(Z=35) to add 'multiple choices' , use "+(-add choice here-)"
:Goto 1
:End
:If Z=1
:2*A→A
:End
:If Z=34
:2*A→A
:End
:If Z=35
:A+1→A
:End
:End
Code: [Select]:.LOGCALC
:ClrHome
:1→A
:!If A=5 An "!" does the same thing as ≠
:Lbl 1
:Repeat getKey→Z
:End
:! If Z=1+(Z=34)+(Z=35) to add 'multiple choices' , use "+(-add choice here-)"
:Goto 1
:End
:If Z=1
:2*A→A
:End
:If Z=34
:2*A→A
:End
:If Z=35
:A+1→A
:End
:End
Just a little optimization to show you a few things...
:.LOGCALC
:.DiagnosticOff and ClrHome are both unnecessary, but make it look better
:DiagnosticOff
:ClrHome
:Lbl S
:!If sub(G)-1
:!If sub(G)-34
:Return!If sub(G)-35
:End
:End
:Goto S
:Lbl G
:Repeat getKey
:End
...And now, the super-optimized version:Code: [Select]:.LOGCALC
:.DiagnosticOff and ClrHome are both unnecessary, but make it look better
:DiagnosticOff
:ClrHome
:Lbl S
:!If sub(G)-1
:!If sub(G)-34
:Return!If sub(G)-35
:End
:End
:Goto S
:Lbl G
:Repeat getKey
:End
Quote...And now, the super-optimized version:Code: [Select]:.LOGCALC
:.DiagnosticOff and ClrHome are both unnecessary, but make it look better
:DiagnosticOff
:ClrHome
:Lbl S
:!If sub(G)-1
:!If sub(G)-34
:Return!If sub(G)-35
:End
:End
:Goto S
:Lbl G
:Repeat getKey
:End
WOW :)
BTW, is it possible to un-assemble an assembled file into ASM so you can open it and edit?