BASIC CHRSET and CHRDEF Statements - fvdhoef/aquarius-plus GitHub Wiki

LOAD CHRSET

TYPE: plusBASIC v0.14c disk statement


FORMAT: LOAD CHARSET filespec

Action: Loads a binary character ROM file.

  • filespec is a string expression containing an optional path and the full file name.
  • The character ROM file must be exactly 2 kilobytes (2048 bytes) long.
    • It is loaded into the alternate character set buffer but not into character RAM.
  • Error 50, File not found results if the file does not exist. (as of v0.17f)

Example:

LOAD "custchars.chr"

Loads the character ROM file custchars.chr into the alternate character set buffer.


SAVE CHRSET

TYPE: plusBASIC v022.x disk statement

FORMAT: SAVE CHARSET filespec

Action: Save character set to binary character ROM file.

  • filespec is a string expression containing an optional path and the full file name.
  • The contents are Character RAM are written to the file.
    • The resulting file will be 2048 bytes long.

Example:

SAVE "savedchars.chr"

Saves current character defininitions to character ROM file savedchars.chr.


USE CHRSET

TYPE: plusBASIC v0.21a graphics statement


FORMAT: USE CHRSET chrset

Action: Selects the specified character set.

  • chrset specifies the character set to use. Valid values are 0
    • 0 - The standard AQUASCII character set.
    • 1 - The character set in the alternate character set buffer.
      • The Latin-1 character set is loaded into the buffer during cold boot.

FORMAT: USE CHRSET filespec

Action: Loads a binary character ROM file and copies it into character RAM.

  • Performs the following actions:
    • LOAD CHRSET filespec
    • USE CHRSET 1

GETCHRSET

TYPE: plusBASIC v0.21w graphics statement


FORMAT: GETCHRSET

Action: Returns the character set currently in use.

  • The possible return values are
    • 0 - The standard AQUASCII character set.
    • 1 - The character set in the alternate character set buffer.
    • -1 - The current character set has been altered using the SET CHRDEF statement.

SETCHRDEF

TYPE: plusBASIC v022.x graphics statement


FORMAT: SET CHRDEF$ ascii_code TO string

Action: Redefines a character.

  • ascii_code is the ASCII code of the character to be defined.
  • _string is an 8 byte binary stringcontaining the character definition.
  • Illegal quantity error results if ascii_code is not in the range '0' through '255' or string is not exactly 8 characters long.

GETCHRDEF

TYPE: plusBASIC v022.x graphics statement


FORMAT: GETCHRDEF$ ( ascii_code )

Action: Returns the definition of the specified character.

  • ascii_code is the ASCII code of the requested character.
    • Illegal quantity error results if ascii_code is not in the range '0' through '255'.
  • Returns a binary string of 8 byte containing the character definition.