The text of a manual · part 14 of 19
PDT 3200 Run-Time Library Reference Manual: Chapter 2 Function Reference, pages 119 to 128
Pages 119 to 128 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 119
Chapter 2: Function Reference
BIOS_SpeakerTone (2600, 100); return; }
2-91
Page 120
PDT 3200 Run-Time Library Reference Manual
BIOS_SpeakerTone p_bios.h Syntax void BIOS_SpeakerTone(ULONG Frequency, UINT Duration);
Description Sounds the speaker at a speciÞed frequency for a speciÞed duration.
Parameters Frequency Duration
Frequency in Hertz. Valid values are 1 to 1193180 (1.19318 MHz.). Using a frequency of 0 (zero) has no effect. Length of time to sound speaker. This value is designated in milliseconds.
Returns None.
Sample See BIOS_SpeakerAlternate().
2-92
Page 121
Chapter 2: Function Reference
BIOS_VideoReadCharAtt p_bios.h Syntax void BIOS_VideoReadCharAtt(UINT DisplayPage, UCHAR *Attrib, UCHAR *Ch);
Description Returns the character and its attribute at the current cursor position.
Parameters DisplayPage Video display page of character to read. P_ACTIVE_PAGE indicates the current active display page.
Returns Attrib
Ch
Screen attribute of character read. P_ATT_NORM is normal white-on-black display attribute. P_ATT_INVERSE is reverse-video (black-on-white) display attribute. Character read from current position.
Sample #include <stdio.h> #include "p_bios.h" void StringAttr() { char Str[13] = "Hello World!"; char AttribStr[26]; int index; UINT oldx, oldy; UCHAR scanCode, ch; UCHAR attrib = P_ATT_NORM; BIOS_ClearScreen (P_ATT_NORM); for (index=0; index<sizeof(Str); index++) { // Display attribute string. Attribute toggles between
2-93
Page 122
PDT 3200 Run-Time Library Reference Manual
// normal and reverse video for each character. BIOS_VideoWriteCharAtt (P_ACTIVE_PAGE, attrib, Str[index], 1); BIOS_GetCursorPos (P_ACTIVE_PAGE, &oldx, &oldy); // Read character from screen and toggle attribute. BIOS_VideoReadCharAtt (P_ACTIVE_PAGE, &attrib, &ch); BIOS_SetCursorPos (P_ACTIVE_PAGE, oldx, oldy+1); AttribStr[index*2] = ch; if (attrib == P_ATT_NORM) attrib = P_ATT_INVERSE; else attrib = P_ATT_NORM; AttribStr[index*2+1] = attrib; } // Write new string to 2nd and 3rd line of display // Final cursor should be at the end of the second line, since // the BIOS_WriteAttribStr does not move the cursor. BIOS_WriteAttribStrWithCur (P_ACTIVE_PAGE, sizeof(Str), 1, 0, AttribStr); BIOS_WriteAttribStr (P_ACTIVE_PAGE, sizeof(Str), 2, 0, AttribStr); while (!BIOS_GetKeyStatus(&scanCode, &ch)); BIOS_KeyboardReadChar(&scanCode); return; }
2-94
Page 123
Chapter 2: Function Reference
BIOS_VideoWriteCharAtt p_bios.h Syntax void BIOS_VideoWriteCharAtt(UINT DisplayPage, UCHAR Attrib, UCHAR Ch, UINT Count);
Description Writes character(s) to the current cursor position. The cursor is not moved by this function.
Parameters DisplayPage Video display page of character to read. P_ACTIVE_PAGE indicates the current active display page. Attrib Screen attribute to use when writing the character. P_ATT_NORM can be used to specify a normal white-on-black display attribute. P_ATT_INVERSE can be used to specify a reverse-video (black-onwhite) display attribute. Ch Character to write. Count Number of times to repeat character write.
Returns None.
Sample See BIOS_VideoReadCharAtt().
2-95
Page 124
PDT 3200 Run-Time Library Reference Manual
BIOS_VideoWriteCharOnly p_bios.h Syntax void BIOS_VideoWriteCharOnly(UINT DisplayPage, UCHAR Ch, UINT Count);
Description Writes character(s) to the current cursor position. The cursor is not moved by this function.
Parameters DisplayPage Video display page of character to read. P_ACTIVE_PAGE indicates the current active display page. Ch Character to write. Count Number of times to repeat character write.
Returns None.
Sample None.
2-96
Page 125
Chapter 2: Function Reference
BIOS_WriteAttribStr p_bios.h Syntax void BIOS_WriteAttribStr(UINT DisplayPage, UINT StrLen, UINT Row, UINT Column, char far *String);
Description Writes a string to the display. The string contains alternating characters and attribute bytes. The cursor position is not updated after the write.
Parameters DisplayPage Video display page where string will be written. P_ACTIVE_PAGE indicates the current active display page. StrLen Length of string to display. Row Row to write string. Column Column to write string. String Address of string.
Returns None.
Sample See BIOS_VideoReadCharAtt().
2-97
Page 126
PDT 3200 Run-Time Library Reference Manual
BIOS_WriteAttribStrWithCur p_bios.h Syntax void BIOS_WriteAttribStrWithCur(UINT DisplayPage, UINT StrLen, UINT Row, UINT Column, char far *String);
Description Writes a string to the display. The string contains alternating characters and attribute bytes. The cursor position is updated after the write.
Parameters DisplayPage Video display page where string will be written. P_ACTIVE_PAGE indicates the current active display page. StrLen Length of string to display. Row Row to write string. Column Column to write string. String Address of string.
Returns None.
Sample See BIOS_VideoReadCharAtt().
2-98
Page 127
Chapter 2: Function Reference
BIOS_WriteCharTeleMode p_bios.h Syntax void BIOS_WriteCharTeleMode(UINT DisplayPage, UCHAR Ch, UINT Color);
Description Writes a character to the current cursor position. The cursor is not moved by this function.
Parameters DisplayPage Video display page of character to read. P_ACTIVE_PAGE indicates the current active display page. Ch Character to write. Color Foreground color to use if in graphics mode. While this function accepts any of the standard colors deÞned for the current video mode, the unit can display only two colors.
Returns None.
Sample None.
2-99
Page 128
PDT 3200 Run-Time Library Reference Manual
BIOS_WritePixel p_bios.h Syntax void BIOS_WritePixel(UINT DisplayPage, UINT Row, UINT Column, UINT Color);
Description Sets the pixel color at the speciÞed coordinates on the speciÞed display page. Pixels may be written only in one of the graphics modes (P_VMODE_GRAPHICS_...).
Parameters DisplayPage Video display page of pixel to set. P_ACTIVE_PAGE indicates the current active display page. Row Graphics x coordinate for pixel to write. Column Graphics y coordinate for pixel to write. Color Color to use for pixel. While this function accepts any of the standard colors deÞned for the current video mode, the unit can display only two colors.
Returns None.
Sample None.
2-100