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.

Scancodes​


I'm always having to check what the scancodes are for certain keys. Here are the ones I use most often.

Escape69
Backspace65
Enter68
Cursor Up76
Cursor Right78
Cursor Down77
Cursor Left79
Help95
Delete70
Function Keys F1-F1080-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:

amoscodes1.png

amoscodes2.png


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