llvm-mos-sdk
Classes | Macros | Enumerations | Functions
cbm.h File Reference
#include <stddef.h>
Include dependency graph for cbm.h:

Go to the source code of this file.

Classes

struct  cbm_dirent
 

Macros

#define JOY_FIRE_MASK   JOY_BTN_1_MASK
 
#define JOY_FIRE(v)   ((v) & JOY_FIRE_MASK)
 
#define CH_HLINE   192
 
#define CH_VLINE   221
 
#define CH_ULCORNER   176
 
#define CH_URCORNER   174
 
#define CH_LLCORNER   173
 
#define CH_LRCORNER   189
 
#define CH_TTEE   178
 
#define CH_BTEE   177
 
#define CH_LTEE   171
 
#define CH_RTEE   179
 
#define CH_CROSS   219
 
#define CH_CURS_UP   145
 
#define CH_CURS_DOWN   17
 
#define CH_CURS_LEFT   157
 
#define CH_CURS_RIGHT   29
 
#define CH_PI   222
 
#define CH_HOME   19
 
#define CH_DEL   20
 
#define CH_INS   148
 
#define CH_ENTER   13
 
#define CH_STOP   3
 
#define CH_LIRA   92
 
#define CH_ESC   27
 
#define CH_FONT_LOWER   14
 
#define CH_FONT_UPPER   142
 
#define CBM_A_RO   1 /* Read only */
 
#define CBM_A_WO   2 /* Write only */
 
#define CBM_A_RW   3 /* Read, Write */
 
#define CBM_READ   0 /* default is ",p" */
 
#define CBM_WRITE   1 /* ditto */
 
#define CBM_SEQ   2 /* default is ",r" -- or ",s" when writing */
 

Enumerations

enum  : unsigned char { CBM_LOAD_RAM = 0, CBM_LOAD_VERIFY = 1 }
 

Functions

unsigned char cbm_k_acptr (void)
 
unsigned char cbm_k_basin (void)
 
void cbm_k_bsout (unsigned char C)
 
unsigned char cbm_k_chkin (unsigned char FN) __attribute__((leaf))
 
unsigned char cbm_k_chkout (unsigned char FN) __attribute__((leaf))
 
unsigned char cbm_k_chrin (void)
 
void cbm_k_chrout (unsigned char C)
 
void cbm_k_cint (void)
 
void cbm_k_ciout (unsigned char C)
 
unsigned char cbm_k_ckout (unsigned char FN) __attribute__((leaf))
 
void cbm_k_clall (void)
 
void cbm_k_close (unsigned char FN)
 
void cbm_k_clrch (void)
 
unsigned char cbm_k_getin (void)
 
unsigned cbm_k_iobase (void) __attribute__((leaf))
 
void cbm_k_listen (unsigned char dev)
 
void * cbm_k_load (unsigned char flag, void *load_addr)
 CBM KERNAL function to load or verify file. More...
 
unsigned char cbm_k_open (void) __attribute__((leaf))
 
unsigned char cbm_k_readst (void)
 
unsigned char cbm_k_save (void *startaddr, void *endaddr_plusone) __attribute__((leaf))
 
void cbm_k_scnkey (void)
 
void cbm_k_second (unsigned char addr)
 
void cbm_k_setlfs (unsigned char LFN, unsigned char DEV, unsigned char SA) __attribute__((leaf))
 
void cbm_k_setnam (const char *Name) __attribute__((leaf))
 
void cbm_k_settim (unsigned long timer)
 
void cbm_k_talk (unsigned char dev)
 
void cbm_k_tksa (unsigned char addr)
 
void cbm_k_udtim (void)
 
void cbm_k_unlsn (void)
 
void cbm_k_untlk (void)
 

Macro Definition Documentation

◆ CBM_A_RO

#define CBM_A_RO   1 /* Read only */

◆ CBM_A_RW

#define CBM_A_RW   3 /* Read, Write */

◆ CBM_A_WO

#define CBM_A_WO   2 /* Write only */

◆ CBM_READ

#define CBM_READ   0 /* default is ",p" */

◆ CBM_SEQ

#define CBM_SEQ   2 /* default is ",r" -- or ",s" when writing */

◆ CBM_WRITE

#define CBM_WRITE   1 /* ditto */

◆ CH_BTEE

#define CH_BTEE   177

◆ CH_CROSS

#define CH_CROSS   219

◆ CH_CURS_DOWN

#define CH_CURS_DOWN   17

◆ CH_CURS_LEFT

#define CH_CURS_LEFT   157

◆ CH_CURS_RIGHT

#define CH_CURS_RIGHT   29

◆ CH_CURS_UP

#define CH_CURS_UP   145

◆ CH_DEL

#define CH_DEL   20

◆ CH_ENTER

#define CH_ENTER   13

◆ CH_ESC

#define CH_ESC   27

◆ CH_FONT_LOWER

#define CH_FONT_LOWER   14

◆ CH_FONT_UPPER

#define CH_FONT_UPPER   142

◆ CH_HLINE

#define CH_HLINE   192

◆ CH_HOME

#define CH_HOME   19

◆ CH_INS

#define CH_INS   148

◆ CH_LIRA

#define CH_LIRA   92

◆ CH_LLCORNER

#define CH_LLCORNER   173

◆ CH_LRCORNER

#define CH_LRCORNER   189

◆ CH_LTEE

#define CH_LTEE   171

◆ CH_PI

#define CH_PI   222

◆ CH_RTEE

#define CH_RTEE   179

◆ CH_STOP

#define CH_STOP   3

◆ CH_TTEE

#define CH_TTEE   178

◆ CH_ULCORNER

#define CH_ULCORNER   176

◆ CH_URCORNER

#define CH_URCORNER   174

◆ CH_VLINE

#define CH_VLINE   221

◆ JOY_FIRE

#define JOY_FIRE (   v)    ((v) & JOY_FIRE_MASK)

◆ JOY_FIRE_MASK

#define JOY_FIRE_MASK   JOY_BTN_1_MASK

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : unsigned char

Flags for cbm_load()

Enumerator
CBM_LOAD_RAM 

Load into RAM.

CBM_LOAD_VERIFY 

Performs verify.

Function Documentation

◆ cbm_k_acptr()

unsigned char cbm_k_acptr ( void  )

◆ cbm_k_basin()

unsigned char cbm_k_basin ( void  )

◆ cbm_k_bsout()

void cbm_k_bsout ( unsigned char  C)

◆ cbm_k_chkin()

unsigned char cbm_k_chkin ( unsigned char  FN)

◆ cbm_k_chkout()

unsigned char cbm_k_chkout ( unsigned char  FN)

◆ cbm_k_chrin()

unsigned char cbm_k_chrin ( void  )

◆ cbm_k_chrout()

void cbm_k_chrout ( unsigned char  C)

◆ cbm_k_cint()

void cbm_k_cint ( void  )

◆ cbm_k_ciout()

void cbm_k_ciout ( unsigned char  C)

◆ cbm_k_ckout()

unsigned char cbm_k_ckout ( unsigned char  FN)

◆ cbm_k_clall()

void cbm_k_clall ( void  )

◆ cbm_k_close()

void cbm_k_close ( unsigned char  FN)

◆ cbm_k_clrch()

void cbm_k_clrch ( void  )

◆ cbm_k_getin()

unsigned char cbm_k_getin ( void  )

◆ cbm_k_iobase()

unsigned cbm_k_iobase ( void  )

◆ cbm_k_listen()

void cbm_k_listen ( unsigned char  dev)

◆ cbm_k_load()

void* cbm_k_load ( unsigned char  flag,
void *  load_addr 
)

CBM KERNAL function to load or verify file.

Should be called after cbm_k_setlfs() and cbm_k_setnam(). On Commander X16, the flag argument takes the following values:

flag Description
0 Load at address
1 Verify
2 Loads into VRAM $00000 + address (cx16)
3 Loads into VRAM $10000 + address (cx16)

On other Commodore targets, a non-zero flag value triggers verify.

Parameters
flagLoad or verify
load_addrLoad address pointer (if not verifying).
Returns
Address of last byte loaded/verified or KERNAL error code

◆ cbm_k_open()

unsigned char cbm_k_open ( void  )

◆ cbm_k_readst()

unsigned char cbm_k_readst ( void  )

◆ cbm_k_save()

unsigned char cbm_k_save ( void *  startaddr,
void *  endaddr_plusone 
)

◆ cbm_k_scnkey()

void cbm_k_scnkey ( void  )

◆ cbm_k_second()

void cbm_k_second ( unsigned char  addr)

◆ cbm_k_setlfs()

void cbm_k_setlfs ( unsigned char  LFN,
unsigned char  DEV,
unsigned char  SA 
)

◆ cbm_k_setnam()

void cbm_k_setnam ( const char *  Name)

◆ cbm_k_settim()

void cbm_k_settim ( unsigned long  timer)

◆ cbm_k_talk()

void cbm_k_talk ( unsigned char  dev)

◆ cbm_k_tksa()

void cbm_k_tksa ( unsigned char  addr)

◆ cbm_k_udtim()

void cbm_k_udtim ( void  )

◆ cbm_k_unlsn()

void cbm_k_unlsn ( void  )

◆ cbm_k_untlk()

void cbm_k_untlk ( void  )