This may be of little interest to many people, but I'm currently trying to finish an Amiga AMOS game I started 20 years ago. There's a few things I need to keep writing little snippets of code for - as my memory isn't the best. I'll add to this as I continue work on the game.
I'm always having to check what the scancodes are for certain keys. Here are the ones I use most often.
Here is some code to easily get Scancodes.
Here is a reference to the in-built patterns in AMOS:
And if you wanted it, here is the code I used to make it:
Scancodes
I'm always having to check what the scancodes are for certain keys. Here are the ones I use most often.
Escape | 69 |
Backspace | 65 |
Enter | 68 |
Cursor Up | 76 |
Cursor Right | 78 |
Cursor Down | 77 |
Cursor Left | 79 |
Help | 95 |
Delete | 70 |
Function Keys F1-F10 | 80-89 |
Here is some code to easily get Scancodes.
Code:
Do
K$=Inkey$ : Rem Read the Keyboard
K=Scancode : Rem get the scancode of the key pressed
If K > 0 : Print K : End If : Rem if there is a scancode, output it to screen
Loop
Patterns
AMOS comes with 35 built in patterns. Granted, many are rubbish and completely useless. However, patterns 28 - 34 can be pretty useful if you need to add some monochromatic shading.Here is a reference to the in-built patterns in AMOS:
And if you wanted it, here is the code I used to make it:
Code:
Cls 0
For S=0 To 1
For Y=0 To 1
For X=0 To 8
Set Pattern P
Bar X*36,Y*100 To X*36+36,Y*100+100
Text X*36,Y*100+9,Str$(P)
Box X*36,Y*100 To X*36+36,Y*100+99
Inc P
If P=35 : Wait Key : End : End If
Next X
Next Y
Wait Key
Cls 0
Next S