The text of a manual · part 10 of 19
PDT 3200 Run-Time Library Reference Manual: Chapter 2 Function Reference, pages 79 to 88
Pages 79 to 88 of 168, from PDT 3200 Run-Time Library Reference Manual
The original document is the PDF (949 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Symbol PDT-3200
Page 79
Chapter 2: Function Reference
BIOS_GetVideoMode p_bios.h Syntax UINT BIOS_GetVideoMode(void);
Description Returns the current video mode. The default video mode is P_VMODE_TEXT_80x25_CB. Some video modes are provided for compatibility only. P_VMODE_TEXT_40x25 and P_VMODE_TEXT_40x25_CB are equivalent. P_VMODE_TEXT_80x25, P_VMODE_TEXT_80x25_CB, and P_VMODE_TEXT_80x25_MONO are equivalent.
Parameters None.
Returns 40x25 text mode without color burst. 40x25 text mode. 80x25 text mode without color burst. 80x25 text mode. 320x200 resolution graphics mode without color burst. P_VMODE_GRAPHIC_320X200_CB 320x200 resolution graphics mode. P_VMODE_GRAPHIC_640X200 640x200 resolution graphics mode. P_VMODE_TEXT_80X25_MONO 80x25 text mode, 2 color. P_VMODE_TEXT_40X25 P_VMODE_TEXT_40X25_CB P_VMODE_TEXT_80X25 P_VMODE_TEXT_80X25_CB P_VMODE_GRAPHIC_320X200
Sample None.
2-51
Page 80
PDT 3200 Run-Time Library Reference Manual
BIOS_GetViewportMode p_bios.h Syntax UCHAR BIOS_GetViewportMode(void);
Description Returns the viewport mode settings which affect text wrapping and panning of the viewport.
Parameters None.
Returns Bit ßags deÞned by the following constants. These ßags may be combined in any logical combination. P_VIEWPT_HPAN P_VIEWPT_VPAN
Enables horizontal panning. Enables vertical panning.
Sample #include <stdio.h> #include "p_bios.h" void ReadViewportPosMode(void) { UINT mode, x, y; UINT width, height; UCHAR scanCode, ch; mode = BIOS_GetViewportMode(); BIOS_GetViewportPos(&x, &y); BIOS_GetViewportSize(&width, &height); printf ("Pos : (%u, %u)\nMode: 0x%02x\n", x, y, mode); printf ("Horiz. panning is %s, \n", mode&VIEWPT_MODE_HMOVE ? "ON" : "OFF"); printf ("Vert. panning is %s \n", mode&VIEWPT_MODE_VMOVE ? "ON" : "OFF"); printf ("Size : (%u, %u)\n", width, height); printf ("\n < Hit any key > "); while (!BIOS_GetKeyStatus(&scanCode, &ch));
2-52
Page 81
Chapter 2: Function Reference
BIOS_KeyboardReadChar(&scanCode); }
2-53
Page 82
PDT 3200 Run-Time Library Reference Manual
BIOS_GetViewportPos p_bios.h Syntax void BIOS_GetViewportPos(UINT *Row, UINT *Column);
Description Returns the current position of the viewport screen relative to the logical display screen. If panning is not enabled, the viewport and the physical screen are the same; Row and Column are both zero.
Parameters None.
Returns Row Column
Top row of logical screen visible on the physical screen. Leftmost column of logical screen visible on the physical screen.
Sample See BIOS_GetViewportMode().
2-54
Page 83
Chapter 2: Function Reference
BIOS_GetViewportSize p_bios.h Syntax void BIOS_GetViewportSize(UINT *Rows, UINT *Columns);
Description Returns the number of rows and columns of the viewport.
Parameters None.
Returns Rows Columns
Number of rows that can be seen in the display window. The default (6x8 font) is 8. Number of columns that can be seen in the display window. The default (6x8 font) is 21.
Sample See BIOS_GetViewportMode().
2-55
Page 84
PDT 3200 Run-Time Library Reference Manual
BIOS_IsCursorOn p_bios.h Syntax UINT BIOS_IsCursorOn(void);
Description Checks to see whether cursor is visible.
Parameters None.
Returns FALSE TRUE
Sample See BIOS_CursorOff().
2-56
Cursor is not visible. Cursor is visible.
Page 85
Chapter 2: Function Reference
BIOS_KeyboardReadChar p_bios.h Syntax UCHAR BIOS_KeyboardReadChar(UCHAR *ScanCode);
Description Returns keyboard scan code and ASCII character from the keyboard buffer. BIOS_KeyboardReadChar() removes the keystroke from the keyboard buffer. To retrieve this information without removing the keystroke, use BIOS_GetKeyStatus().
Parameters None.
Returns ScanCode Character
Scan code of the key pressed. ASCII value of key pressed.
Sample See BIOS_APMGetStatus.
2-57
Page 86
PDT 3200 Run-Time Library Reference Manual
BIOS_KeyboardWriteChar p_bios.h Syntax int BIOS_KeyboardWriteChar(UCHAR ScanCode, UCHAR Ch);
Description Inserts a keyboard scan code and ASCII character into the keyboard buffer. The new character appears after any other keystrokes which may already be in the keyboard buffer.
Parameters ScanCode Ch
Scan code of the key pressed. ASCII value of key pressed.
Returns Keystroke successfully placed in keyboard buffer. Keyboard buffer is full.
FALSE TRUE
Sample #include <stdio.h> #include "p_bios.h" void IntoKeyboardBuffer(void) { UCHAR scanCode, ch; // Put a character into the keyboard buffer BIOS_KeyboardWriteChar (30, 'a'); // Read it back out and display ch = BIOS_KeyboardReadChar (&scanCode); printf ("Char %c Scan %u\n", ch, scanCode); return; }
2-58
Page 87
Chapter 2: Function Reference
BIOS_Load6x8Font p_bios.h Syntax void BIOS_Load6x8Font(void);
Description Loads the internal 6x8 font as the new active font.
Parameters None.
Returns None.
Sample #include <stdio.h> #include "p_bios.h" void PickAFont(void) { UCHAR scanCode, ch; int done = 0; BIOS_ClearScreen(P_ATT_NORM); printf ("1. Load 6x8\n"); printf ("2. Load 8x8\n"); printf ("3. Load 8x16\n"); printf ("ESC: Exit"); // Put a character into the keyboard buffer while (!done) { while (!BIOS_GetKeyStatus (&scanCode, &ch)); ch = BIOS_KeyboardReadChar (&scanCode); switch (ch) { case '1': BIOS_Load6x8Font(); break; case '2': BIOS_Load8x8Font(); break; case '3': BIOS_Load8x16Font(); break; case 27: done = 1; break; default: break;
2-59
Page 88
PDT 3200 Run-Time Library Reference Manual
} } return; }
2-60