The work data will be erased every time the program is run from the Editor, and it will be discarded when the listing is saved onto disc. A quick check can be made to see if the data area has been successfully assigned to fast memory, using the FAST FREE function, like this:
E> M=Fast Free : Rem Give the amount of available FAST memory Reserve As Work 10,1000 If M<>Fast Free Print "The Data has been stored in FAST Ram" Else Print "Sorry, there is only CHIP Ram available" End If
RESERVE AS CHIP DATA
instruction: reserve a new chip data bank
Reserve As Chip Data bank number,length
Use this variation of the RESERVE AS instruction to allocate a permanent area of memory using Chip Ram. If there is none available, an "Out of Memory" error will be reported. You can obtain an instant read-out of the remaining chip memory by calling the CHIP FREE function, as follows:
E> CF=Chip Free Print "Remaining Chip memory = ";CF;" bytes."
Once a bank has been defined by this command, it will be saved automatically, along with your AMOS Professional Basic program.
RESERVE AS CHIP WORK
instruction: reserve a new chip work bank
Reserve As Chip Work bank number,length
This command allocates the selected block of temporary memory using Chip Ram, and it is often used with the DOUBLE BUFFERED sampling system, to play samples directly from hard disc. Here are some typical examples of the different RESERVE AS commands:
X> Reserve As Chip Work 10,10000: Rem 10000 bytes of chip workspace to bank 10 Reserve As Work 11,5000: Rem 5000 bytes of fast workspace to bank 11 Reserve As Chip Data 12,2000 : Rem 2000 bytes of permanent chip data to bank 12 Reserve as Data 13,1000 : Rem 1000 bytes of fast data to bank 13
Saving memory banks
AMOS Professional provides the simplest of instructions for saving memory banks.
SAVE
instruction: save one or more memory banks onto disc
Save "filename.abk"
Save "filename.abk",bank number