as.AmigaBasicBMAP: Coerce raw or named list to an AmigaBasicBMAP class object

View source: R/basic.r

as.AmigaBasicBMAPR Documentation

Coerce raw or named list to an AmigaBasicBMAP class object


Coerce raw or named list to an AmigaBasicBMAP class object





When x is a vector of raw data, it needs to be structured as it would be when stored in a binary file (see read.AmigaBasicBMAP). x can also be a named list, where the name of each element corresponds with a routine in the library. Each element should than consist of a list with 2 elements: The first should be named ‘libraryVectorOffset’ and should hold the numeric offset of the routine in the library (see details). The second element should be named ‘registers’ and should contain a vector of raw values refering to CPU registers used by the routine (see details).


An Amiga Basic BMAP file maps the offset of routines in Amiga libraries. This function converts the raw format in which it would be stored as a file into a comprehensive S3 class object. It can also convert a named list into an S3 class object. See ‘Arguments’ and ‘Examples’ sections on how to format this list.


Returns a AmigaBasicBMAP based on x


Pepijn de Vries

See Also

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


## Not run: 
## For the dos.library, the start of the bmap list would look like:
dos.list <- list(
  xOpen = list(
    libraryVectorOffset = -30,
    registers = as.raw(2:3)
  xClose = list(
    libraryVectorOffset = -36,
    registers = as.raw(2)
  xRead = list(
    libraryVectorOffset = -42,
    registers = as.raw(2:4)

## Note that the list above is incomplete, the dos.library holds more routines than shown here.
## This merely serves as an example.
## This list can be converted to an S3 class as follows:
dos.bmap <- as.AmigaBasicBMAP(dos.list)

## End(Not run)

AmigaFFH documentation built on Aug. 27, 2023, 9:07 a.m.