author: bocianu bocianu@gmail.com
Set of useful procedures to simplify common tasks in Atari 8-bit programming.
This library is a part of 'blibs' - set of custom Mad-Pascal libraries.
https://gitlab.com/bocianu/blibs
name: | type: | description: |
---|---|---|
TdateTime | record
end; | Record type used to store date and time. |
name: | description: |
---|---|
CountBits | function CountBits(b: byte):byte;assembler;Counts number of ones in bits of any byte value.
parameters:returns: |
WriteLnCentered | procedure WriteLnCentered(s: string);Outputs string aligned to center of screen width. Length of string should not exceed screen width (40).
parameters: |
WriteRightAligned | procedure WriteRightAligned(w: byte; s: TString);Outputs string aligned to right of provided width. Length of string should not exceed provided width of field.
parameters: |
NullTermToString | function NullTermToString(ptr: word): string;Parses null terminated string into regular pascal string variable.
parameters:returns: |
FFTermToString | function FFTermToString(ptr: word): string;Parses string terminated with $FF into regular pascal string variable.
parameters:returns: |
ExpandRLE | procedure ExpandRLE(src: word; dest: word);Expands RLE compressed data from source memory location and writes expanded data at destination memory address.
parameters: |
ExpandLZ4 | procedure ExpandLZ4(source: word; dest: word);assembler;Expands LZ4 compressed data from source memory location and writes expanded data at destination memory address. Based on xxl & fox routine from here: https://xxl.atari.pl/lz4-decompressor/
parameters: |
UnixToDate | procedure UnixToDate(ux: cardinal; var date: TDateTime);Converts unix timestamp to proper date, represented as an record of TDateTime type.
parameters: |
Hour24to12 | function Hour24to12(hour: byte):byte;Converts 24 hour clock indication into to 12 hour
parameters:returns: |
HexChar2Dec | function HexChar2Dec(c:char):byte;Converts hex char into proper value in decimal.
parameters:returns: |
Base64Init | procedure Base64Init;Initializes base64 encoding tables. Must be started once, prior to any compression or decompression process. |
Base64Encode | procedure Base64Encode(var src, dest: string);Encodes string using base64 code. Be sure that trlaslation arrays are initialized by calling Base64Init first. Once.
parameters: |
Base64Decode | procedure Base64Decode(var src, dest: string);Decodes base 64 encoded string Be sure that trlaslation arrays are initialized by calling Base64Init first. Once.
parameters: |