The text of a manual · part 15 of 23
VRC 4000 Software Driver Manual: Chapter 2 TBDriver Touchscreen Driver for DOS, pages 133 to 138
Pages 133 to 138 of 206, from VRC 4000 Software Driver Manual
The original document is the PDF (1.2 MB). 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 VRC-4000
Page 133
Chapter 2: TBDriver Touchscreen Driver for DOS
The Pad command defines the coordinates of a pad, and the sequence of keystrokes to be stuffed into the keyboard buffer if the pad is touched. The syntax is: Pad<X1>,<Y1>,<X2>,<Y2>,<Keystroke definitions> where: X1 is the top row of the pad Y1 is the left column of the pad X2 is the bottom row of the pad Y2 is the right column of the pad The coordinates must be defined in the scale defined by the active Scale command. The file may contain any number of Pad commands, but only the first 99 are used.
Keystroke Definitions Keystroke definitions can be defined as either simple characters or hexadecimal scancode definitions, or any combination of both. Simple characters must be surrounded by double quotes, as in the following example: Pad 38,6,45,8,”Date”
More complex keystrokes must be defined as hexadecimal scancodes, consisting of four characters, for example the backspace key as follows: Pad 38,9,54,11,0E08
The two types can be combined, for example “TBpad u” followed by the Enter key: Pad 38,12,54,14,”TBpad u” 1c0d
Spaces and tabs are ignored when they occur outside quotes, and may be used to make the file more easily readable, but spaces are treated as normal characters when they occur inside quotes. The double quote character cannot be used literally, so it must always be defined using its scancode (0322). Up to 16 keystrokes may be defined for each pad. Here are some more examples:
2-91
Page 134
VRC 4000 Software Driver Manual
Pad 11,15,18,17,0322 “HELLO” 0322(“HELLO”, with quotes) Pad 20,15,27,17,”HD” 0E08 “ELLO” 1C0D(HD, backspace, ELLO, Enter) Pad 29,15,36,17,4800 4800 4100 1C0D(Up, Up, F7, Enter)
A small utility program, TBkey is provided for you to find out what the scancodes are for the various keystrokes you might want to generate. Run it by typing TBkey, and press any key, or combination of Alt-keys, Shift-keys, etc., and TBkey will display the scancode. Press Escape to exit TBkey.
The TBpad Command Line TBpad can be invoked at the command line in one of three ways: • TBpad • TBpad U • TBpad <filename>
Invoking “TBpad” on its own will make it resident in memory if it is not already resident. If it is already resident, it will do nothing. Invoking “TBpad U” unloads TBpad from memory. Invoking “TBpad <filename>” will make the program resident if it is not already resident, and load and activate the specified pad definition file. If TBpad is already resident, it will load and activate the specified pad definition file, replacing any previously active file - A convenient way of swapping pad definitions. When loading a pad definition file from the command line like this, TBpad might display the following error messages: • Error, line xx - Line too long • Error, line xx - Syntax error • Error, line xx - Code yy
The first message occurs if a line in the pad definition file is more than 80 characters long. The second occurs if a syntax error is discovered while parsing a line, and the third reports errors reading the file, in which case the code yy is the DOS error code. 2-92
Page 135
Chapter 2: TBDriver Touchscreen Driver for DOS
The TBpad Application Programming Interface TBpad uses software interrupt vector 68hex to export its Application Programming Interface. There are four callable functions: • Identify TBpad • Load Pad Definition File (Pascal string) • Load Pad Definition File (C string) • Unload TBpad
The Identify TBpad Function Calling sequence: AL = 1 Interrupt 68hex Return Values. AX ='TB' BH =Major version number BL =Minor version number
The Load Pad Definition File Function (Pascal string) Calling sequence: AL =2 BX =Segment of file pathname (Pascal string) CX =Offset of file pathname Interrupt 68hex
2-93
Page 136
VRC 4000 Software Driver Manual
Return Values: AX = 0 if load successful 5001 = Line too long error 5002 = Syntax error Or any DOS file error code BX =
Line number in error, if AX <> 0
The Load Pad Definition File Function (C string) Calling sequence: AL =4 BX =Segment of file pathname (C string) CX =Offset of file pathname Interrupt 68hex Return Values: AX = 0 if load successful 5001 = Line too long error 5002 = Syntax error Or any DOS file error code BX =
Line number in error, if AX <> 0
The Unload TBpad Function Calling sequence: AL =3 Interrupt 68hex
2-94
Page 137
Chapter 2: TBDriver Touchscreen Driver for DOS
Return Values: AH = 0 if unload possible 1 if unload not possible
2-95
Page 138
VRC 4000 Software Driver Manual
2-96