NOS Graphics Library

Usage / Installation:

To use this library, download it from **insert link** and transfer the NOSLIB program to your calc. Then, in your header, you want to add the following code:

AsmComp(NOSLIB)

This will add your program in the compilation process. After this, you only need to use each command if you need it as described below.

 

Global Variables:

IN - General Purpose Command Input (100 bytes)

OUT - General Purpose Command Output (50 bytes)

NOSIN - Secondary Command Input (50 bytes)

NOS - Global Command Data Storage

 


Lbl SETUP

Sets up the canvas screen and sets the global library variables.

Inputs:

Entry: Size: Setting:
IN+0 1 byte BG Color 1
IN+1 1 byte BG Color 2
IN+2 1 byte Text Color 1
IN+3 1 byte Text Color 2

Outputs: None

 

Variables Used:

NOS - 4 bytes - Global color definitions

IN - 4 bytes - Input

A - Overwritten and not restored

 

Notes:

The background color 1 is the primary background color, where as the secondary is the one used for shapes, the status bar, and lines. The text color 1 is for text on the background color 1 background, and text color 2 is for text on background color 2.


Lbl STATUSBAR

Displays status bar, with global color index, at the top of the screen with the specified string.

Inputs:

Entry: Size: Setting:
IN+0 30 bytes Status Bar Title
IN+40 1 byte Set for null byte (Set to 0)

Outputs: None

 

Variables Used:

IN - 30 bytes - Input

NOS - 4 bytes - Color Definitions

NOSIN - 6 bytes - For subprogram

Str1 - For displaying string, overwritten and not restored


 

Lbl INPUT

Input routine for drawing canvas.

Inputs:

Entry: Size: Setting:
IN+0 3 bytes X Position of box
IN+3 3 bytes Y Position of box
IN+6 3 bytes Borders for box (1 for borders, 0 for no borders)
IN+9 3 bytes Spaces format (0 to disallow, 1 to allow)
IN+12 3 bytes Input format (0 for letters, 1 for numbers)
IN+15 3 bytes Max length (leave blank for auto)
IN+18 3 bytes Lock Case (1 prevents changing character set, 0 allows)

Outputs:

Entry: Size: Description:
OUT+0 Max length specified (or use length(OUT) String returned from input (EXIT if CLEAR is pressed)

 

Variables Used:

NOS - 4 bytes - Global color definitions

IN - 21 bytes - Input

A - Overwritten and not restored

Str2 - Overwritten and not restored

Str3 - Overwritten and not restored

Str4 - Overwritten and not restored

G - Overwritten and not restored


 

Lbl DIALOG

Displays smaller window with custom status bar.

Inputs:

Entry: Size: Setting:
IN+0 10 bytes Status bar title
IN+10 1 bytes null Byte
IN+11 3 bytes X position
IN+14 3 bytes Y position
IN+17 3 bytes Width of box
IN+20 3 bytes Height of box

Outputs: None

 

Variables Used:

NOS - 4 bytes - Global color definitions

IN - 21 bytes - Input

Str1 - Overwritten and not restored


 

Lbl PROMPT

Similar to DIALOG, however has built in input routine.

Inputs:

Entry: Size: Setting:
IN+0 10 bytes Mini Status bar title
IN+10 1 bytes null Byte
IN+11 3 bytes X position
IN+14 3 bytes Y position
IN+17 3 bytes Width of box
IN+20 3 bytes Height of box
IN+23 3 bytes Spaces format (0 to disallow, 1 to allow)
IN+26 3 bytes Input format (0 for letters, 1 for numbers)
IN+29 3 bytes Max length (leave blank for auto)
IN+32 3 bytes Lock Case (1 prevents changing character set, 0 allows)

Outputs:

Entry: Size: Description:
OUT+0 Max length specified (or use length(OUT)) String returned from input (EXIT if CLEAR is pressed)

 

Variables Used:

NOS - 4 bytes - Global color definitions

IN - 21 bytes - Input

A - Overwritten and not restored

Str1 - Overwritten and not restored

Str2 - Overwritten and not restored

Str3 - Overwritten and not restored

Str4 - Overwritten and not restored

G - Overwritten and not restored

© 2019 Nicholas Pease (LAX18)