Amos Professional Manual  Contents  Index

Using Screens


and starts scanning again at the top left-hand corner of the screen. The period between the completion of one screen and the beginning of the next update is known as the "vertical blank period", or VBL for short. This is the period when AMOS Professional jumps in to perform important tasks like moving Bobs and swapping screens.

AMOS Professional is so efficient, it considers a 50th of a second to be a huge waste of time, and is eager to get on with any other tasks that need doing. This means that your programs could get out of synchronisation with what is actually happening on screen, so there are situations when AMOS Professional must be instructed to wait for the next vertical blank period, in order keep in step.

WAIT VBL
instruction: wait for next vertical blank period
Wait Vbl

This simple command can be included to achieve perfect synchronisation, and is especially useful after a SCREEN SWAP.

Screen compaction
Naturally you will want to exploit the most spectacular images in your programs, but the idea becomes less attractive because of the large amounts of program memory that get used when a graphical screen is used. With a single, 64 colour, full-size screen consuming 60k of RAM, the AMOS Professional programmer needs to crunch the data that makes up screen graphics, pack it into an acceptable amount of memory and then unpack it when necessary.

SPACK
picture compactor extension: pack a screen
Spack screen number To bank number
Spack screen number To bank number xl,y1,x2,y2

This command stands for "screen pack", and it supports all standard graphic modes, including HAM. Memory is crunched to a fraction of its original requirement, and in its simplest form you only need to define the screen number that holds the source of your image (from 0 to 7), and the number of the memory bank where you want the packed image deposited (from 1 upwards), for example:

X> Spack 7 To 20

If the selected memory bank does not already exist, AMOS Professional will reserve it automatically before packing in the screen data, which includes everything about the image including its mode, size and any offsets or display settings. This means that when the data is unpacked, the image will be re-created in its original state. Your new memory bank will be stored in fast memory if available, and will be saved along with your Basic program. After SPACK has been called, you can determine the size of your crunched screen with the LENGTH function.

Back    Next
06.02.05