Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 8 of 19

PDT 3200 Run-Time Library Reference Manual: Chapter 2 Function Reference, pages 59 to 68

Pages 59 to 68 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 59

Chapter 2: Function Reference

BIOS_GetCurXY p_bios.h Syntax void BIOS_GetCurXY(UINT *Row, UINT *Column);

Description Returns the position of the cursor on the active display page. This is a macro equivalent to BIOS_GetCursorPos(P_ACTIVE_PAGE, Row, Column).

Parameters None.

Returns Row Column Note:

Row position of cursor. Column position of cursor. The row and column numberings both begin at 0.

Sample See BIOS_GetDisplayPage().

2-31

Page 60

PDT 3200 Run-Time Library Reference Manual

BIOS_GetDate p_bios.h Syntax void BIOS_GetDate(UINT *Century, UINT *Year, UINT *Month, UINT *Day);

Description Returns the current system date.

Parameters None.

Returns Century Year Month Day

Century (19 or 20). Year (0Ð99). Month (1Ð12). Day (1Ð31).

Sample #include <stdio.h> #include "p_bios.h" void DateAndTime(void) { UCHAR ScanCode; UCHAR Input; UINT Century,Year,Month,Day; UINT Hours,Minutes,Seconds,DST; // Get current system date and time BIOS_GetDate(&Century, &Year, &Month, &Day); BIOS_GetTime(&Hours, &Minutes, &Seconds, &DST); BIOS_ClearScreen(P_ATT_NORM); printf ("\n%2u:%2u:%2u DST:%u", Hours, Minutes, Seconds, DST); printf ("\n%u/%u/%u%u", Month, Day, Century, Year); printf ("\n\n Press any key..."); BIOS_KeyboardReadChar(&ScanCode); // Change for daylight savings BIOS_GetTime(&Hours, &Minutes, &Seconds, &DST);

2-32

Page 61

Chapter 2: Function Reference

BIOS_SetTime(Hours+1, Minutes, Seconds, DST); return; }

2-33

Page 62

PDT 3200 Run-Time Library Reference Manual

BIOS_GetDisplayPage p_bios.h Syntax UINT BIOS_GetDisplayPage(void);

Description Returns the currently active display page.

Parameters None.

Returns Active display page in the range 0 to 7.

Sample #include <stdio.h> #include "p_bios.h" void GetActivePage(void) { UINT Row, Column; UINT DisplayPage; // Two ways to get the cursor position // on the active page // Get the active page and call BIOS_GetCursorPos() DisplayPage = BIOS_GetDisplayPage(); BIOS_GetCursorPos (DisplayPage, &Row, &Column); // Use the BIOS_GetCurXY macro. It gets the active page // for you. BIOS_GetCurXY (&Row, &Column); return; }

2-34

Page 63

Chapter 2: Function Reference

BIOS_GetFontInfo p_bios.h Syntax void BIOS_GetFontInfo(UINT FontId, UINT *CharWidth, UINT *CharHeight, UINT *LastRow, UCHAR far **FontTable);

Description Returns information about the font speciÞed by FontId.

Parameters FontId

Font identiÞer. P_ACT_FONT gets information for the currently active font. P_8X8_FONT gets information for the 8x8 font. P_8X16_FONT gets information for the 8x16 font. P_6X8_FONT gets information for the 6x8 font.

Returns CharWidth CharHeight LastRow FontTable

Pixel width of display character. Bytes per character. Last row of logical screen. The Þrst row is 0. Address to font table containing character bitmaps.

Sample See BIOS_ClearScreen().

2-35

Page 64

PDT 3200 Run-Time Library Reference Manual

BIOS_GetKbdCtrl p_bios.h Syntax UCHAR BIOS_GetKbdCtrl(void);

Description Returns the status of the keyboard control ßags. These ßags enable or disable special key sequences.

Parameters None.

Returns Bit ßags deÞned by the following constants. These ßags may be combined in any logical combination. P_KBDCTRL_PRGM P_KBDCTRL_REBOOT

Trigger programming is enabled. CTRL-ALT-DEL key sequence is enabled.

Sample #include <stdio.h> #include "p_bios.h" void SetMiscConfigs(void) { int keyClick; UCHAR kbdCtrl; UINT altTone; UINT volume; UCHAR ScanCode; // Key click, trigger programming disabled, CTRL-ALT-DEL enabled. // Alternate speaker tone at lowest frequency. // Turn down the volume a bit (default is 7). BIOS_SetKeyClick (P_KBDSOUND_CLICK); BIOS_SetKbdCtrl (P_KBDCTRL_REBOOT); BIOS_SetSpeakerAlternate(0); BIOS_SetSpeakerVolume(4); // Use access functions to get the new settings.

2-36

Page 65

Chapter 2: Function Reference

BIOS_ClearScreen(P_ATT_NORM); keyClick = BIOS_GetKeyClick(); if (keyClick == P_KBDSOUND_CLICK) printf ("Keyboard will click\n"); else if (keyClick == P_KBDSOUND_BEEP) printf ("Keyboard will beep\n"); else printf ("Keyboard is silent\n"); kbdCtrl = BIOS_GetKbdCtrl(); if (kbdCtrl & P_KBDCTRL_PRGM) printf ("Trigger pgm On\n"); else printf ("Trigger pgm Off\n"); if (kbdCtrl & P_KBDCTRL_REBOOT) printf ("CTRL-ALT-DEL On\n"); else printf ("CTRL-ALT-DEL Off\n"); printf ("Alt Tone=%u\n", BIOS_GetSpeakerAlternate()); printf ("Volume=%u\n", BIOS_GetSpeakerVolume()); printf ("\nPress any key..."); BIOS_KeyboardReadChar(&ScanCode); return; }

2-37

Page 66

PDT 3200 Run-Time Library Reference Manual

BIOS_GetKeyClick p_bios.h Syntax UCHAR BIOS_GetKeyClick(void);

Description Returns the keyboard click setting.

Parameters None.

Returns P_KBDSOUND_OFF P_KBDSOUND_CLICK P_KBDSOUND_BEEP

Sample See BIOS_GetKbdCtrl().

2-38

Keypresses generate no sound. Keypresses generate mechanical click. Keypresses generate beep.

Page 67

Chapter 2: Function Reference

BIOS_GetKeyExtFlags p_bios.h Syntax UINT BIOS_GetKeyExtFlags(void);

Description Returns the status of CTRL, ALT, and CAPS LOCK keys. The only additional information this function provides over BIOS_GetKeyFlags() is whether a CAPS LOCK, CTRL, or ALT key is being held down. BIOS_GetKeyInputState(), which handles the PDT 3200 keyboard better, is recommended for these purposes. This function is provided for PC compatibility. The CTRL and ALT keys on the unit are considered to be LEFT-CTRL and LEFT-ALT keys.

Parameters None.

Returns Bit ßags deÞned by the following constants. These ßags may be combined in any logical combination. P_KBDSHIFT_CTRL P_KBDSHIFT_ALT P_KBDSHIFT_CAPS P_KBDSHIFT_INS P_KBDSHIFT_CTRL_DOWN P_KBDSHIFT_ALT_DOWN P_KBDSHIFT_CAPS_DOWN

CTRL key is pressed. ALT key is pressed. CAPS LOCK is active. INS is active. CTRL key is pressed. ALT key is pressed. CAPS LOCK key is pressed and active.

Sample See BIOS_GetKeyFlags()

2-39

Page 68

PDT 3200 Run-Time Library Reference Manual

BIOS_GetKeyFlags p_bios.h Syntax UCHAR BIOS_GetKeyFlags(void);

Description Returns the status of CTRL, ALT, CAPS LOCK, and INS keys. BIOS_GetKeyInputState(), which handles the special keyboard of the unit better, is recommended for these purposes.

Parameters None.

Returns Bit ßags deÞned by the following constants. These ßags may be combined in any logical combination. P_KBDSHIFT_CTRL P_KBDSHIFT_ALT P_KBDSHIFT_CAPS P_KBDSHIFT_INS

CTRL key is pressed. ALT key is pressed. CAPS LOCK is active. INS is active.

Sample #include <stdio.h> #include "p_bios.h" void KeyStatusFlags(void) { int stateChanges = 0; UCHAR flags, oldflags=0; UINT extflags, oldextflags=0; BIOS_ClearScreen(P_ATT_NORM); // Display status of special keys through 50 state change while (stateChanges < 50) { flags = BIOS_GetKeyFlags();

2-40