OpenCBM
Macros | Functions
petscii.c File Reference

Shared library / DLL for accessing the driver. More...

#include "debug.h"
#include <ctype.h>
#include <stdlib.h>
#include "opencbm.h"

Go to the source code of this file.

Macros

#define DBG_USERMODE
 
#define DBG_PROGNAME   "OPENCBM.DLL"
 
#define DLL
 mark: We are building the DLL */
 

Functions

char CBMAPIDECL cbm_petscii2ascii_c (char Character)
 Convert a PETSCII character to ASCII. More...
 
char CBMAPIDECL cbm_ascii2petscii_c (char Character)
 Convert an ASCII character to PETSCII. More...
 
char *CBMAPIDECL cbm_petscii2ascii (char *Str)
 Convert an null-termined PETSCII string to ASCII. More...
 
char *CBMAPIDECL cbm_ascii2petscii (char *Str)
 Convert an null-termined ASCII string to PETSCII. More...
 

Detailed Description

Shared library / DLL for accessing the driver.



Author
Michael Klein, Spiro Trikaliotis

Definition in file petscii.c.

Macro Definition Documentation

#define DBG_PROGNAME   "OPENCBM.DLL"

The name of the executable

Definition at line 27 of file petscii.c.

#define DBG_USERMODE

Mark: We are in user-space (for debug.h)

Definition at line 24 of file petscii.c.

Function Documentation

char* CBMAPIDECL cbm_ascii2petscii ( char *  Str)

Convert an null-termined ASCII string to PETSCII.

This function converts a string in ASCII to PETSCII.

Parameters
StrPointer to a buffer which holds a null-termined string in ASCII.
Returns
Returns a pointer to the Str itself, converted to PETSCII.

Definition at line 160 of file petscii.c.

References cbm_ascii2petscii_c().

char CBMAPIDECL cbm_ascii2petscii_c ( char  Character)

Convert an ASCII character to PETSCII.

This function converts a character in ASCII to PETSCII.

Parameters
CharacterThe character value to be converted in ASCII
Returns
Returns the value of character in PETSCII.

Definition at line 105 of file petscii.c.

Referenced by cbm_ascii2petscii().

char* CBMAPIDECL cbm_petscii2ascii ( char *  Str)

Convert an null-termined PETSCII string to ASCII.

This function converts a string in PETSCII to ASCII.

Parameters
StrPointer to a buffer which holds a null-termined string in PETCII.
Returns
Returns a pointer to the Str itself, converted to ASCII.

If some character cannot be printer on the PC, they are replaced with a dot (".").

Definition at line 136 of file petscii.c.

References cbm_petscii2ascii_c().

char CBMAPIDECL cbm_petscii2ascii_c ( char  Character)

Convert a PETSCII character to ASCII.

This function converts a character in PETSCII to ASCII.

Parameters
CharacterThe character value to be converted in PETSCII
Returns
Returns the value of character in ASCII if it can be displayed, a dot (".") otherwise.

Definition at line 64 of file petscii.c.

Referenced by cbm_petscii2ascii().