Learn R Programming

AmigaFFH (version 0.4.3)

AmigaBasic: The S3 AmigaBasic class

Description

A class that represents the content of Amiga Basic files.

Arguments

Author

Pepijn de Vries

Details

Amiga Basic is a BASIC-style programming language that was shipped with early Commodore Amiga machines. It requires an interpreter to run an Amiga Basic script. The AmigaFFH package does not interpret Amiga Basic scripts. It does allow for encoding and decoding scripts in the binary format in which it was originally stored on the Amiga. Amiga Basic scripts were stored as encoded binaries instead of ASCII text files in order to save (at the time precious) memory and disk space.

Amiga Basic binary files start with a file header (as an identifier) and is followed by each line of the script as binary data. The AmigaBasic-class object stores each line of the script as a list item as a vector of raw data. Use as.character and as.AmigaBasic to switch between character data and AmigaBasic-class objects.

References

https://en.wikipedia.org/wiki/AmigaBASIC

See Also

Other AmigaBasic.operations: AmigaBasic.reserved(), AmigaBasicBMAP, [.AmigaBasic(), as.AmigaBasicBMAP(), as.AmigaBasic(), as.character(), check.names.AmigaBasic(), names.AmigaBasic(), rawToAmigaBasicBMAP(), rawToAmigaBasic(), read.AmigaBasicBMAP(), read.AmigaBasic(), write.AmigaBasic()

Examples

Run this code
if (FALSE) {
## This creates an AmigaBasic-class object:
bas <- as.AmigaBasic("PRINT \"hello world!\"")

## This will decode the object as plain text:
as.character(bas)
}

Run the code above in your browser using DataLab