FRAME (BOX) PSEUDOGRAPHICS

<< Sync Generation   ·    Home   ·   Keyboard >>

There are 32 pseudographics characters (codes 0x00-0x1F) which are used for frames and lines drawing. Some examples are given here.

In the main source code fine, VIDEO.S, there are some subroutines which can simplify drawing of those shapes. They are:

PHOR: draws the single horizontal line. Leftmost character starts at coordinates W1 (low byte X, high byte Y), length is at W3, foreground and background colour and blinking attributes at W4

PHOR2: draws the double horizontal line. Leftmost character starts at coordinates W1 (low byte X, high byte Y), length is at W3, foreground and background colour and blinking attributes at W4

PVERT: draws the single vertical line. Uppermost character starts at coordinates W1 (low byte X, high byte Y), length is at W3, foreground and background colour and blinking attributes at W4

PVERT2: draws the double vertical line. Uppermost character starts at coordinates W1 (low byte X, high byte Y), length is at W3, foreground and background colour and blinking attributes at W4

PBOX: draws the single-line box. Upper left character starts at coordinates W1 (low byte X, high byte Y), dimensions are at W3 (low byte horizontal, high byte vertical), foreground and background colour and blinking attributes at W4

PBOX2: draws the double-line box. Upper left character starts at coordinates W1 (low byte X, high byte Y), dimensions are at W3 (low byte horizontal, high byte vertical), foreground and background colour and blinking attributes at W4

You can also use macros, which are defined in file MACRO.INC:

HOR   XPOS, YPOS, LENGTH, COLOUR
HOR2  XPOS, YPOS, LENGTH, COLOUR
VERT  XPOS, YPOS, LENGTH, COLOUR
VERT2 XPOS, YPOS, LENGTH, COLOUR
BOX   XPOS, YPOS, WIDTH, HEIGHT, COLOUR
BOX2  XPOS, YPOS, WIDTH, HEIGHT, COLOUR

When the new lines/boxes are overwriting and crossing the old ones, the new characters will automatically adjust their shapes (codes) for crossings. Yet, some special cases (which are rarely used) are not covered, as not all of the possible crossings are contained in the character set. Generally, the characters for double lines which are connecting the edges of the single-line box and the box corners which are composed of single and double edges are missing (those are  , , , , , , , , , , and ).

Also, the box corners will not be automatically adjusted when they are written over the existing pseudographics characters. So, the good practice is to draw the box first, and then the lines inside it, as the line edges will adjust automatically. For instance, if you draw the small box inside the bigger one so that it overwrites its borders, it will look like:

 ┌───┌───┐───┐ 
 │   │   │   │ 
 └───└───┘───┘ 

But if you draw two vertical lines inside the same box, it wiil look much better:

 ┌───┬───┬───┐ 
 │   │   │   │ 
 └───┴───┴───┘ 

While drawing lines and boxes, you can select foreground and background colours and blinking attributes. The same rules are valid as if you are writing ASCII characters in video memory.

<< Sync Generation   ·    Home   ·   Keyboard >>