AMCAF Extension V1.40 Manual  Index

Primary Disk Commands

AMCAF gives you some very easy to use commands to load, save, and modify files.

instruction: copies a file
File Copy sourcefile$ To targetfile$

This command copies the file with the name 'sourcefile$' to the file 'targetfile$'.
This command allows you to even copy a file of 3 MB in size, even if you only got 100 KB of free memory.

instruction: load a file temporarily
Wload file$,bank

This command loads the file named 'file$' completely into memory, storing it in bank number 'bank'.
The bank is defined as 'Work'.
If 'bank' is a negative number, the file is loaded into Chip ram instead.

Wload could be replaced by the following commands:

Open In 1,FILE$ : LE=Lof(1) : Close 1
Reserve As Work BANK,LE

instruction: load a file permanently
Dload file$,bank

Just like Wload, this command loads a file into memory, but this time a Permanent 'Data'-Bank will be created.

instruction: save a file to disk
Wsave file$,bank

This command saves the bank with the number 'bank' as file named 'file$' onto the current disk drive.
This file contains no AMOS overhead, that means that only the pure binary data is saved.

instruction: save a file to disk
Dsave file$,bank

Dsave is exactly the same as Wsave in every aspect.

instruction: modify the protection bits of an object
Protect Object pathfile$,prot

This command changes the Protection Flags of the Object 'pathfile$' to the bitmapped value 'prot'.

instruction: set the filenote of an object
Set Object Comment pathfile$,comment$

This command sets the comment of the Object 'pathfile$' to the string 'comment$'.

instruction: set the date of an object
Set Object Date pathfile$,date,time

This command changes the date of the Object 'pathfile$' to the given date and time stamp.
This command only works on OS2.0 and higher.

instruction: start a new process
Launch file$
Launch file$,stack

The Launch instruction starts a new task which is saved on disk with the name 'file$'.
The optional parameter 'stack' holds the size of the stack memory to be allocated (default value is 4096).

Note: Many programs don't work when started from AMOS, as they are not part of a workbench or CLI environment.