DEMO MODE

<< UART   ·    Home   ·   Adding Graphics Window >>

In the main source file (video.s), after the initialization process and before the OCx interrupt routine, there are two .include directives:

                                 
  .include  "template.inc"       
  .include  "demo.inc"           
                                 

The first file, template.inc, is almost empty now, and it is the place where you should write your assembly program. The other one, demo.inc, is only for demonstration and features testing, and may be deleted when it is not needed any more.

When you start the demo program (which is by default if you did not modify any file), you shall see a column of help messages at the right of the screen. Pressing F1 sets or removes those messages. Each time when they are set, the portion of the video memory is saved in the special buffer (named AUX_BUFFER in the demo.inc source file) which occupies 700 bytes in the Data RAM, and each time it is removed, the video memory contents are restored from this buffer. So you can call "help screen" without destroying the screen contents.

In the similar way, by pressing the PRINT SCREEN key on the keyboard, you can display the whole character set at the bottom of the screen. The previous content of that portion of the screen is saved to (or restored from) the 736-byte AUX_ASCII_BUF.

 

Now you can type the text using PS/2 keyboard, change the screen attributes and modes or draw lines and boxes. On the top of the help column, there are cursor parameter markers, named C1 and C2. Here you can see the foreground and background colours for both cursors and which one is currently active. The active cursor determines the attributes for characters typed by the keyboard. To toggle the cursors, press the key TAB.

CTRL-R|G|B|C|M|Y|W|K selects the Red|Green|Blue|Cyan|Magenta|Yellow|White|blacK foreground colour for the active cursor. In the similar way, ALT-R|G|B|C|M|Y|W|K selects the background colour. CTRL-X toggles blinking/non-blinking status for the foreground (ALT-X for the background).

Each pressing of CAPS LOCK key toggles the bit KBDFLAG,#8, which determines if the CAPS LOCK is active, but the only indication for its status is that the last row, with the text caps on:ATTRIB blinks. When the CAPS LOCK is active, CTRL-key and ALT-key do not alter the cursor parameters, but directly affect the current parameters under the cursor on the screen, leaving the character code unchanged. This can be used to modify the colour and blinking attributes in video memory, without affecting the text contents.

Here is the list of commands for function keys F1...F12:
  

KEY

COMMAND

ACTION
F1 Sets/removes HELP screen. Screen contents are automatically saved/restored on this command. Toggle
HELPFLAG,#0
F2

Changes the video routine mode between the pure text mode, in which the routine takes 77% of processor time, and the full-screen text mode, with 95,6% of processor occupancy.

Toggle
FLAG,#0
F3

Draws the single-line box, with coordinates defined by both cursors, and the colour attributes by the active cursor. If the cursors are in the same row, the horizontal single line is drawn, and if they are in the same column, the vertical single line is drawn.

Call PBOX|
PHOR|PVERT
F4

Draws the double-line box, with coordinates defined by both cursors, and the colour attributes by the active cursor. If the cursors are in the same row, the horizontal double line is drawn, and if they are in the same column, the vertical double line is drawn.

Call PBOX2|
PHOR2|PVERT2
F5

Sets/removes the active cursor colour attributes for the whole screen.

Write to byte
SCREEN_ARG+1
F6

Changes the height/width of the whole screen, in four steps: normal H - normal W, normal H - double W, double H - normal W, double H - double W.

Increment byte
SCREEN_ARG+0
F7

Sets/removes the active cursor colour attributes for the single row, in which the active cursor is positioned.

Write to byte
LINE_ARG+2n+1
F8

Changes the height/width for the single row, in which the active cursor is positioned, in four steps: normal H - normal W, normal H - double W, double H - normal W, double H - double W.

Increment byte
SCREEN_ARG+2n
F9

Sets the whole screen background colour, including the border, according to the active cursor background. SHIFT-F9 sets only the border colour. This command is not reversible, as it trashes the previous background colours of the whole video memory. Colours for the help messages are automatically adjusted so that they are always visible, but it is not the case with the rest of the screen.

Note: the contents of AUX_BUFFER and AUX_ASCII_BUF are not affected, so when the previous contents of Video RAM is restored, its background may not be the same as the rest of the screen. Pressing F9 again will solve the problem.

Write CURCOLx
to all odd bytes of
video  memory
and to variable
MARGIN
F10

Hides/Unhides the cursor which is not currently active.

Toggle
CURFLAG,#1
F11

Slows down the cursor blinking rate.

dec CURxSPEED
call SETSPEED
F12

Speeds up the cursor blinking rate.

inc CURxSPEED
call SETSPEED

<< UART   ·    Home   ·   Adding Graphics Window >>