|
BBC Micro C library
|
BBC MOS API wrappers. More...


Go to the source code of this file.
Data Structures | |
| struct | osfile_parameterblock_s |
| struct | osgbpb_controlblock_s |
Typedefs | |
| typedef struct osfile_parameterblock_s | osfile_parameterblock |
| typedef enum osfile_action_e | osfile_action |
| typedef struct osgbpb_controlblock_s | osgbpb_controlblock |
| typedef enum osgbpb_action_e | osgbpb_action |
Enumerations | |
| enum | osfile_action_e { osfile_saveblock = 0, osfile_writeinfo = 1, osfile_writeload = 2, osfile_writeexec = 3, osfile_writeattr = 4, osfile_readinfo = 5, osfile_deletenamedfile = 6, osfile_loadnamedfile = 0xff } |
| enum | osgbpb_action_e { osgbpb_putbytes_seq = 1, osgbpb_putbytes = 2, osgbpb_getbytes_seq = 3, osgbpb_getbytes = 4, osgbpb_gettitleandbootopt = 5, osgbpb_readdirectory = 6, osgbpb_readlibrary = 7, osgbpb_readfilenames = 8 } |
Functions | |
| static void | oswrch (uint8_t a_char) |
| static uint8_t | osrdch (void) |
| static void | osnewl (void) |
| static void | osasci (uint8_t a_char) |
| static void | gsinit (uint8_t *a, uint8_t *y) |
| static void | gsread (uint8_t *a, uint8_t *x, uint8_t y) |
| uint8_t | osrdrm (uint8_t y_romnum, uintptr_t address) |
| static uint8_t | osrdsc (uintptr_t address) |
| void | oswrsc (uint8_t a_byte, uintptr_t address) |
| static void | oseven (uint8_t y_eventnum) |
| static void | oscli (char *xy_command) |
| static void | osbyte (uint8_t a_func, uint8_t *x, uint8_t *y) |
| void | osword (uint8_t a_func, const void *xy_pointer) |
| void | osfile (uint8_t a_action, const osfile_parameterblock *xy_pblock) |
| static uint8_t | osbget (uint8_t y_handle) |
| static void | osbput (uint8_t a_byte, uint8_t y_handle) |
| void | osgbpb (uint8_t a_action, const osgbpb_controlblock *xy_pblock) |
| uint8_t | osfind (uint8_t a_operation, uint8_t x, uint8_t y) |
| static uint8_t | osfind_open_r (char *filename) |
| static uint8_t | osfind_open_w (char *filename) |
| static uint8_t | osfind_open_rw (char *filename) |
| static void | osfind_close (uint8_t handle) |
BBC MOS API wrappers.
C style wrappers around the BBC Micro OS API calls
| typedef enum osfile_action_e osfile_action |
Action to be performed by osfile call
| typedef struct osfile_parameterblock_s osfile_parameterblock |
Parameter block to be passed to osfile calls
| typedef enum osgbpb_action_e osgbpb_action |
Action to be performed by osgbpb call
| typedef struct osgbpb_controlblock_s osgbpb_controlblock |
Control block to be passed to osgbpb calls
| enum osfile_action_e |
Action to be performed by osfile call
| enum osgbpb_action_e |
Action to be performed by osgbpb call
GSINIT General string input initialise routine
This call cannot be used from a co processor
GSREAD Read character from string input
This call cannot be used from a co processor
|
inlinestatic |
OSASCI Write character routine where OSNEWL is called when A 0x0D
This routine performs an OSWRCH call with the accumulator contents unless called with 0x0D (13) when an OSNEWL call is performed.
| a_char | character to write |
OSARGS Read or write an open file's arguments
| a_action | number specifying the action required (also returns data) |
| x_zp_pointer | points to a four byte zero page control block |
| y_filehandle | file handle as provided by OSFIND, or zero OSBGET Get one byte from an open file |
| y_handle | the file handle, as provided by OSFIND |
OSBPUT Write a single byte to an open file
| a_byte | the byte to be written |
| y_handle | the file handle, as provided by OSFIND |
OSBYTE - OS call specified by the contents of A taking parameters in X and Y
| a_func | OS function to call |
| x | parameter to OS function |
| y | parameter to OS function |
|
inlinestatic |
OSCLI Passes line of text to the CLI
| xy_command | 0 terminated command to pass to CLI |
|
inlinestatic |
OSEVEN Generate an event
| void osfile | ( | uint8_t | a_action, |
| const osfile_parameterblock * | xy_pblock | ||
| ) |
OSFILE Read or write a whole file or its attributes
| a_action | sub action osfile should perform |
| xy_pblock | pointer to parameter block, also used for returning values |
OSFIND Open or close a file for byte access
| a_operation | 0 = close, 0x40 = open for read, 0x80 = open for write, 0xc0 = open for read/write |
| x | |
| y |
|
inlinestatic |
Close an open file (OSFIND helper)
| handle | open file handle |
|
inlinestatic |
Open a file for reading (OSFIND helper)
| filename | 0 terminated filename (modifies the terminator) |
|
inlinestatic |
Open a file for reading and writing (OSFIND helper)
| filename | 0 terminated filename (modifies the terminator) |
|
inlinestatic |
Open a file for writing (OSFIND helper)
| filename | 0 terminated filename (modifies the terminator) |
| void osgbpb | ( | uint8_t | a_action, |
| const osgbpb_controlblock * | xy_pblock | ||
| ) |
OSGBPB Read or write a group of bytes
This routine transfers a number of bytes to or from an open file. It can also be used to transfer filing system information.
| a_action | information to be transferred. |
| xy_pblock | pointer to a control block in memory |
|
inlinestatic |
OSNEWL Write a newline to selected output stream
|
inlinestatic |
OSRDCH Read character from currently selected input stream
OSRDRM Read byte in paged ROM
This call cannot be used from a co processor
| y_romnum | ROM bank number 0-15 |
| address | address in ROM, range 0x8000 - 0xbfff |
OSRDSC Read a byte from current screen memory
This call cannot be used from a co processor
This call is synonumous with OSRDRM with the address in the range of screen memory not paged ROM
| address | address in screen memory |
| void osword | ( | uint8_t | a_func, |
| const void * | xy_pointer | ||
| ) |
OSWORD OS call specified by contents of A taking parameters in a parameter block
| a_func | OS function to call |
| xy_pointer | pointer to parameter block |
|
inlinestatic |
OSWRCH Write character to currently selected output stream
| a_char | character to write |
1.8.13