Useful Tables

Interface Select Codes

Internal Select Codes
Select Code Device or Interface
1 Display (alpha)
2 Keyboard
3 Display (graphics)
4 Internal floppy-disk drive
5 Optional powerfail protection APCI (Series 400 computer)
6 APCI (Series 400 computer)
6 or 132 Display (bit-mapped graphics)
7 HP-IB
9 RS-232
14 or 28 SCSI
21 LAN
23 HP Parallel interface (Centronics compatible)

Factory Presets for External Interfaces
Select\Code Device or Interface
8 HP-IB
9 RS-232
10 (not used)
11 BCD
12 GPIO
14 High-Speed HP-IB
14 SCSI
20 Data Communications
21 Shared Resource Management
21 LAN
27 EPROM Programmer
28 RGB Color Video
30 Bubble Memory
32 Pseudo Select Code (Parity, Cache, Floating-point math hardware, and battery-backed clock)
33 EXT SIGNAL Registers (BASIC/UX)

Display Enhancement Characters

BASIC uses certain characters as display enhancement characters. These characters do not occupy any space on the screen, nor do they produce any immediately visible effect. Display enhancement characters change the appearance of characters that follow.

Globalized BASIC defines both one- and two-byte display enhancement characters. Refer to the globalization chapters of HP BASIC Porting and Globalization for more information about two-byte characters.

PRINT CHR$(132);A$;CHR$(128)                                                                        underline on/off

PRINT CHR$(255)&CHR$(132);A$;CHR$(255)&CHR$(128)                           underline on/off

Monochrome Display Enhancements
Character Resulting Enhancement
One-byte Two-byte
CHR$(128) CHR$(255)&CHR$(128) All enhancements off
CHR$(129) CHR$(255)&CHR$(129) Inverse video on
CHR$(130) CHR$(255)&CHR$(130) Blinking on*
CHR$(131) CHR$(255)&CHR$(131) Inverse video and blinking on
CHR$(132) CHR$(255)&CHR$(132) Underline on
CHR$(133) CHR$(255)&CHR$(133) Underline and inverse video on
CHR$(134) CHR$(255)&CHR$(134) Underline and blinking on*
CHR$(135) CHR$(255)&CHR$(135) Underline, inverse video, and blinking on*

*Blinking not available on bit-mapped alpha displays.

Color Display Enhancements
Character Resulting Enhancement
One-byte Two-byte Model 236C Bit-mapped
CHR$(136) CHR$(255)&CHR$(136) White Pen 1
CHR$(137) CHR$(255)&CHR$(137) Red Pen 2
CHR$(138) CHR$(255)&CHR$(138) Yellow Pen 3
CHR$(139) CHR$(255)&CHR$(139) Green Pen 4
CHR$(140) CHR$(255)&CHR$(140) Cyan Pen 5
CHR$(141) CHR$(255)&CHR$(141) Blue Pen 6
CHR$(142) CHR$(255)&CHR$(142) Magenta Pen 7
CHR$(143) CHR$(255)&CHR$(143) Black Pen 8

CRT CONTROL registers 5 and 15 through 17 also provide a method of changing the alpha color.

PRINTing CHR$(x), where 136<x<143, will provide the same colors as on the Model 236C as long as the color map contains default values and the alpha write-enable mask includes planes 0 through 2. A user-defined color map which changes the values of pens 0 to 7 will change the meaning of CHR$(x).

U.S. ASCII Character Codes

U.S. ASCII Character Codes (continued)

U.S./European Display Characters

These characters can be displayed on the alpha screens of Models 216, 220 (with a 98204A display), 226, and 236 Computers.

U.S./European Display Characters (continued)

U.S./European Display Characters

These characters can be displayed on the alpha screen of Series 200 Model 217, 220 (with 98204B display), and 237 computers, and on Series 300 computers using a 98546 Display Compatibility Interface or 98700 Display Controller.

U.S./European Display Characters (continued)

U.S./European Display Characters

These characters can be displayed on the screen of Series 300 computers (except with a 98546 Display Compatibility Interface or 98700 Display Controller; see the preceding table).

U.S./European Display Characters (continued)

These characters can be displayed on the screen of Series 300 computers (except with a 98546 Display Compatibility Interface or 98700 Display Controller; see the preceding table).

Katakana Display Characters

These characters can be displayed on the screen of Model 216, 217, 220, 226, and 236 computers, and on Series 300 computers using a 98546 Display Compatibility Interface.

Katakana Display Characters (continued)

Katakana Display Characters

These characters can be displayed on the Model 237 and on all Series 300 bit-mapped alpha displays.

Katakana Display Characters (continued)

Codes 128-255 go here

Lexical Tables

The following tables show the five predefined lexical orders available with the LEXICAL ORDER IS statement.

Notation

All of the lexical tables use the following notation:



        sequence number:  113
    character displayed:  a
            ASCII value:  (97)

Characters not available on the keyboard can be entered by pressing the [ANY CHAR] key and typing the value enclosed in parenthesis (with leading zeros, if needed). The character will be collated according to the sequence number shown above the character.

LEXICAL ORDER IS ASCII

LEXICAL ORDER IS FRENCH

LEXICAL ORDER IS GERMAN

LEXICAL ORDER IS SPANISH

LEXICAL ORDER IS SWEDISH

Master Reset Table

Graphic Reset Table

Interface Reset Table

Second Byte of Non-ASCII Key Sequences (String)

Holding the [CTRL] key and pressing a non-ASCII key generates a two-character sequence on the CRT. For example,

[CTRL] - [Clear line]

produces the following characters on the CRT:

K%

Non-ASCII keypresses can be simulated by outputting these two-byte sequences to the keyboard. For example,

OUTPUT KBD;CHR$(255)&"%";

produces the same result as shown above. The decimal value of the first byte is 255 (on some computers this is the "inverse-video" K).

The following table can be used to look up the key that corresponds to the second character of the sequence. (On the small HP 98203A keyboard some non-ASCII keys generate ASCII characters when they are pressed while holding the [CTRL] key down.)

Normally on an ITF keyboard, [f1] corresponds to ON KEY 1 ..., [f2] corresponds to ON KEY 2 ..., etc. However, you can use CONTROL KBD,14;1 to change this relationship so that [f1] corresponds to ON KEY 0..., [f2] corresponds to ON KEY 1..., etc.

With 98203 keyboard compatibility (KBD CMODE ON), the ITF keyboard softkeys [f1] thru [f4], the [Menu] and [System] keys, and [f5] thru [f8] correspond to 98203 softkeys [k0] thru [k9], respectively. See "Porting to Series 300" chapter of HP BASIC Porting and Globalization for further information about this mode.

The terms System and User in the ITF Key column refer to the softkey menu which is currently active on an ITF keyboard.

Char. Val. ITF\Key 98203\Key Closure\Key
space 32 1 1
! 33 [Shift]-[Stop] [SHIFT]-[CLR I/O] Yes
" 34 1 1
# 35 [Shift]-[Clear line] [CLR LN]
$ 36 System [f7] [ANY CHAR] Yes
% 37 [Clear line] [CLR right arrow key;END] Yes
& 38 [Select]4 2
' 39 [Prev] 2 Yes
( 40 [Shift]-[Tab] [SHIFT]-[TAB]
) 41 [Tab] [TAB]
* 42 [Insert line] [INS LN] Yes
= 43 [Insert char] [INS CHR]
, 44 [Next] 2 Yes
- 45 [Delete char] [DEL CHR]

1These characters cannot be generated by pressing the CTRL key and a non-ASCII key. If one of these characters follows CHR$(255) in an output to the keyboard, an error is reported (Error 131 Bad non-alphanumeric keycode.).

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

4These keys have no system meaning, and will BEEP if not trapped by ON KBD.

Char. Val. ITF\Key 98203\Key Closure\Key
. 46 2 2
/ 47 [Delete line] [DEL LN] Yes
0 48 User 3 [f8] [k0] Yes
1 49 User 1 [f1] [k1] Yes
2 50 User 1 [f2] [k2] Yes
3 51 User 1 [f3] [k3] Yes
4 52 User 1 [f4] [k4] Yes
5 53 User 1 [f5] [k5] Yes
6 54 User 1 [f6] [k6] Yes
7 55 User 1 [f7] [k7] Yes
8 56 User 1 [f8] [k8] Yes
9 57 User 2 [f1] [k9] Yes
: 58 System [Shift]-[f6] 4 2
; 59 System [Shift]-[f7] 4 2

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

3This ITF key is located in the System Control Key Group just above the Numeric Keypad Group. Note that these keys have no labels on their keycaps; however, they do have labels on the BASIC keyboard overlay for the ITF keyboard. For information on the BASIC keyboard overlay for the ITF keyboard, read &usws; or &usux;.

4These keys have no system meaning, and will BEEP if not trapped by ON KBD.

6also System [f8]

7also System [Shift]-[f8]

Char. Val. ITF\Key 98203\Key Closure\Key
< 60 [left arrow] [left arrow key]
= 61 Result3 [RESULT]
> 62 [right arrow] [right arrow key]
? 63 Recall3 6 [RECALL]
@ 64 [Shift]-Recall3 7 [SHIFT]-[RECALL]
A 65 System [f4] [PRT ALL] Yes
B 66 [Back space] [BACK SPACE]
C 67 System [f2] [CONTINUE]
D 68 2 [EDIT]
E 69 [Enter] 8 [ENTER] Yes
F 70 System [f6] [DISPLAY FCTNS] Yes
G 71 [Shift]-[right arrow] [SHIFT]-[right arrow key]
H 72 [Shift]-[left arrow] [SHIFT]-[left arrow key]
I 73 [Break] [CLR I/O]

1These characters cannot be generated by pressing the CTRL key and a non-ASCII key. If one of these characters follows CHR$(255) in an output to the keyboard, an error is reported (Error 131 Bad non-alphanumeric keycode.).

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

3This ITF key is located in the System Control Key Group just above the Numeric Keypad Group. Note that these keys have no labels on their keycaps; however, they do have labels on the BASIC keyboard overlay for the ITF keyboard. For information on the BASIC keyboard overlay for the ITF keyboard, read &usws; or &usux;.

8Or [Return]

9Also [Print]

Char. Val. ITF\Key 98203\Key Closure\Key
J 74 (Katakana)2 (Katakana)2
K 75 [Clear display] [CLR SCR] Yes
L 76 Graphics 3 [GRAPHICS] Yes
M 77 Alpha 3 [ALPHA] Yes
N 78 Dump Graph 3 [DUMP GRAPHICS] Yes
O 79 Dump Alpha 3 9 [DUMP ALPHA] Yes
P 80 [Stop] [PAUSE] Yes
Q 81 1 1
R 82 System [f3] [RUN] Yes
S 83 System [f1] [STEP] Yes
T 84 [Shift]-[down arrow] [SHIFT]-[downkey] Yes
U 85 [Caps] [CAPS LOCK] Yes
V 86 [down arrow] [downkey] Yes

1These characters cannot be generated by pressing the CTRL key and a non-ASCII key. If one of these characters follows CHR$(255) in an output to the keyboard, an error is reported (Error 131 Bad non-alphanumeric keycode.).

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

Char. Val. ITF\Key 98203\Key Closure\Key
W 87 [Shift]-[up arrow] [SHIFT]-[up arrow key] Yes
X 88 2 [EXECUTE] Yes
W 87 [Shift]-[up arrow] [SHIFT]-[up arrow key] Yes
X 88 2 [EXECUTE] Yes
Y 89 (Roman)2 (Roman)2 Yes
Z 90 1 1
[ 91 System [f5] [CLR TAB]
\ 92 [diagional home] 2 Yes
] 93 System [Shift]-[f5] [SET TAB]
^ 94 [up arrow] [up arrow key] Yes
_ 95 System [Shift]-[diagional home] 2 Yes
` 96 1 1
a 97 User 2 [f2] [SHIFT]-[k0] Yes
b 98 User 2 [f3] [SHIFT]-[k1] Yes

1These characters cannot be generated by pressing the CTRL key and a non-ASCII key. If one of these characters follows CHR$(255) in an output to the keyboard, an error is reported (Error 131 Bad non-alphanumeric keycode.).

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

4These keys have no system meaning, and will BEEP if not trapped by ON KBD.

5These keys are also generated by the HP 46060A/B and HP 46095A (HP Mouse devices) buttons unless GRAPHICS INPUT IS is using them.

Char. Val. ITF\Key 98203\Key Closure\Key
c 99 User 2 [f4] [SHIFT]-[k2] Yes
d 100 User 2 [f5] [SHIFT]-[k3] Yes
e 101 User 2 [f6] [SHIFT]-[k4] Yes
f 102 User 2 [f7] [SHIFT]-[k5] Yes
g 103 User 2 [f8] [SHIFT]-[k6] Yes
h 104 User 3 [f1] [SHIFT]-[k7] Yes
i 105 User 3 [f2] [SHIFT]-[k8] Yes
j 106 User 3 [f3] [SHIFT]-[k9] Yes
k 107 User 3 [f4] 2 Yes
l 108 User 3 [f5] 2 Yes
m 109 User 3 [f6] 2 Yes
n 110 User 3 [f7] 2 Yes
o 111 System [Shift]-[f1] 4 2
p 112 System [Shift]-[f2] 4 2

1These characters cannot be generated by pressing the CTRL key and a non-ASCII key. If one of these characters follows CHR$(255) in an output to the keyboard, an error is reported (Error 131 Bad non-alphanumeric keycode.).

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

4These keys have no system meaning, and will BEEP if not trapped by ON KBD.

Char. Val. ITF\Key 98203\Key Closure\Key
q 113 System [Shift]-[f3] 4 2
r 114 System [Shift]-[f4] 4 2
s 115 User [Shift]-[f1] 4 5 2
t 116 User [Shift]-[f2] 4 5 2
u 117 User [Shift]-[f3] 4 5 2
v 118 User [Shift]-[f4] 4 2
w 119 User [Shift]-[f5] 4 2
x 120 User [Shift]-[f6] 4 2
y 121 User [Shift]-[f7] 4 2
z 122 User [Shift]-[f8] 4 2
{ 123 [System] 2 Yes
| 124 [Menu] 2 Yes
} 125 [User] 2 Yes
~ 126 [Shift]-[Menu] 2 Yes
(box) 127 1 1

1These characters cannot be generated by pressing the CTRL key and a non-ASCII key. If one of these characters follows CHR$(255) in an output to the keyboard, an error is reported (Error 131 Bad non-alphanumeric keycode.).

2Cannot generate this keycode from this keyboard. If this character is OUTPUT to the keyboard, an error is not reported. Instead, the system will perform as much of the indicated action as possible.

4These keys have no system meaning, and will BEEP if not trapped by ON KBD.