# unit zxlib

### ZX Spectrum library

author: Bostjan Gorisek (Gury)

## Register Variables:

name: | address: | type: | description:
--- | --- | --- | ---
CHBAS | $2F4 | byte | Character base address
RAMTOP | $6A | byte | RAM top memory address

## Interface:

name: | description:
--- | ---
Flash | #### procedure Flash (y, x : byte; char01, char02 : char); overload; Alternate flashing of two characters on location y, x ##### parameters: y - coordinate Y x - coordinate X char01 - first character to flash char02 - second character to flash
Flash | #### procedure Flash (y, x : byte; str : string); overload; Alternate flashing text on location y, x ##### parameters: y - coordinate Y x - coordinate X str - flashing string
Flash | #### procedure Flash (var f : file; y, x : byte; str : string); overload; Alternate flashing text on location y, x on screen device S: ##### parameters: f - variable holder for screen device S: (text mode 1, 2) y - coordinate Y x - coordinate X str - flashing string
Flash | #### procedure Flash (var f : file; y, x, rep : byte; str : string); overload; Alternate flashing text on location y, x on screen device S: ##### parameters: f - variable holder for screen device S: (text mode 1, 2) y - coordinate Y x - coordinate X str - flashing string
PrintAt | #### procedure PrintAt (y, x : byte; c : char); overload; Print character on location y, x in text mode 0 ##### parameters: y - coordinate Y x - coordinate X c - character to be displayed
PrintAt | #### procedure PrintAt (y, x : byte; text : string); overload; Print string on location y, x in text mode 0 ##### parameters: y - coordinate Y x - coordinate X text - string to be displayed
PrintAt | #### procedure PrintAt (var f : file; y, x : byte; c : char); overload; Print character on location y, x to screen device S: ##### parameters: f - variable holder for screen device S: (text mode 1, 2) y - coordinate Y x - coordinate X c - character to be displayed
PrintAt | #### procedure PrintAt (var f : file; y, x : byte; text : string); overload; Print string on location y, x to screen device S: ##### parameters: f - variable holder for screen device S: (text mode 1, 2) y - coordinate Y x - coordinate X text - string to be displayed
Screen | #### function Screen (y, x : byte) : char; overload; Locate character on location y, x in text mode 0 ##### parameters: y - coordinate Y x - coordinate X
Screen | #### function Screen (var f : file; y, x : byte) : char; overload; Locate character on location y, x on screen device S: ##### parameters: f - variable holder for screen device S: (text mode 1, 2) y - coordinate Y x - coordinate X
SetRAM | #### function SetRAM (pages : byte) : word; Set new top free RAM and character set address ##### parameters: pages - number of pages reserved at the top of free memory
Sgn | #### function Sgn (number : integer) : integer; Return signed or zero number depending on input number ##### parameters: number - Number to be checked ##### returns: number > 0: returned value 1 number < 0: returned value -1 number = 0: returned value 0
ZXTitle | #### procedure ZXTitle (title : string; y, x : byte; author, dev, text, misc : string); ZX Spectrum title screen ##### parameters: title - title name y - coordinate Y x - coordinate X author - author dev - port by... text - miscellaneous text misc - additional text