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 25 of 38

PEN*KEY 6100 Computer Programmer's Reference Guide: Section 6: Conversions and Interfaces, pages 217 to 226

Pages 217 to 226 of 328, from PEN*KEY 6100 Computer Programmer's Reference Guide

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.

Filed in the catalog under the Intermec 6110

Page 217

SECTION 6

Conversions and Interfaces

6. Conversions and Interfaces

CL = Remaining battery life - percentage of charge 0ć100 = Percentage of full charge FFh = (undefined) All other values reserved DX = Remaining battery life 15 = Time units: 0 = seconds 1 = minutes 14-0 = Number of seconds or minutes: 0ć7FFFh Valid number of seconds 0ć7FFEh Valid number of minutes FFFFh = (undefined) Carry = 1 if unsuccessful: AH = Error code (09h Unrecognized device ID) INT 15h, Function AX = 530Bh: Get PM Event ELANAPM Gets PM Event returns the next pending PM event or indicates whether no PM events are pending. Call this function until there are no more pending PM events. On Entry: AH = 53h AL = 0Bh On Return: Carry = 0 if successful: BX = PM event code 1 if unsuccessful: AH = Error code: (80h No power management events pending) INT 15h, Function AX = 530Ch: Get Power State ELANAPM Returns the device power state only when a specific device ID is used. On Entry: AH = 53h AL = 0Ch BX = Power device ID 0001h = All devices power managed by the APM BIOS 01XXh = Display 02XXh = PC Card controller 04XXh = RS-232 05XXh = Network adapters 06XXh = PC Card slots 0EXXh = Intermec defined devices where XXh = unit number (0 based) unit number of FFh means all devices in this class On Return: Carry = 0 if successful: CX = Power state: 0000h Ready 0001h Standby 0002h Suspend 0003h OFF 1 if unsuccessful: AH = Error code: (09h Unrecognized device ID) PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-81

Page 218

Conversions and Interfaces

SECTION 6

INT 15h, Function AX = 530Dh: Enable/Disable Device Power Management

6. Conversions and Interfaces

ELANAPM Enables or disables APM BIOS automatic power management for a specified deĆ vice. When disabled, the APM BIOS does not automatically powerĆmanage the device. The only automatic power management that the BIOS does with devices is during Suspend. If power management of a device is disabled, during Suspend the power state of the device is not altered from the state set before Suspend was entered. On Entry: AH = 53h AL = 0Dh BX = Power device ID 0001h = All devices power managed by the APM BIOS 01XXh = Display 02XXh = PC Card controller 04XXh = RS-232 05XXh = Network adapters 06XXh = PC Card slots 0EXXh = Norand defined devices where XXh = unit number (0 based) CX = Function code 0000h Disable 0001h Enable On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: (09h Unrecognized device ID) INT 15h, Function AX = 5380h, Subfunction BH = 1Dh: System Reset BIOS Performs a system reset. RESET.EXE provides this function as well. On Entry: AH = 53h AL = 80h BH = 1Dh On Return: None (system resets) The following assembly code could be used in an application to produce the same results as RESET.EXE: hwdreset proc near mov bh, 1Dh mov ax, 5380h int 15h cli hlt hwreset endp

6-82

; cold reset

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 219

SECTION 6

Conversions and Interfaces

INT 15h, Function AH = 80h: Device Open BIOS Default BIOS returns with AH = 0 and carry flag clear. 6. Conversions and Interfaces

On Entry: AH = 80h BX = Device ID CX = Process ID On Return: Carry = 0 if successful: AH = 0 1 if unsuccessful: AH = Status INT 15h, Function AH = 81h: Device Close BIOS Default BIOS returns with AH = 0 and carry flag clear. On Entry: AH = 81h BX = Device ID CX = Process ID On Return: Carry = 0 if successful: AH = 0 1 if unsuccessful: AH = Status INT 15h, Function AH = 82h: Program Termination BIOS Default BIOS returns with AH = 0 and carry flag clear. On Entry: AH = 82h BX = Process ID On Return: Carry = 0 if successful: AH = 0 1 if unsuccessful: AH = Status

PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-83

Page 220

Conversions and Interfaces

SECTION 6

INT 15h, Function AX = 8300h: Set Event Wait Interval

6. Conversions and Interfaces

BIOS Programs the realĆtime clock to generate an interrupt after the specified amount of time and bit 7 of the byte pointed at by ES:BX is set. The duration of the wait interval is a multiple of 976 microseconds. On Entry: AH = 83h AL = 00h CX = High byte of interval in microseconds DX = Low byte of interval in microseconds ES:BX = Pointer to byte in calling program's memory that has bit 7 set when the interval expires On Return: Carry = 0 if successful: AH = 0 1 if unsuccessful: AH = Status INT 15h, Function AX = 8301h: Cancel Event Wait Interval BIOS On Entry: AH = 83h AL = 01h On Return: None INT 15h, Function AH = 85h: System Request Key BIOS Called by INT 09h ISR when the SYS REQ key is pressed. The default BIOS reĆ turns AH = 0 and carry clear. On Entry: AH = 85h AL = 00 = Key make 01 = Key break On Return: Carry = 0 if successful: AH = 0 1 if unsuccessful: AH = Status INT 15h, Function AH = 86h: Wait BIOS Suspends the calling program for the specified time period. The values in CX and DX are in microseconds but are rounded down to the nearest multiple of 976 microseconds. On Entry: AH = 86h CX = High byte of interval in microseconds DX = Low byte of interval in microseconds On Return: Carry = 0 if successful 1 if unsuccessful 6-84

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 221

SECTION 6

Conversions and Interfaces

INT 15h, Function AH = 87h: Move Block

INT 15h, Function AH = 88h: Read Extended Memory Size BIOS Reads the amount of memory above 1 megabytes from the CMOS RAM locations 30h and 31h. On Entry: AH = 88h On Return: AX = Number of contiguous 1 KB blocks of extended memory INT 15h, Function AH = 89h: Switch to Protected Mode BIOS GDT describes the memory management environment in effect on return to the calling program. All table descriptors are initialized by the calling program exĆ cept the BIOS code segment descriptor, with an access rights byte set to 9Bh. The address is set to F0000h and the segment limit is set to 0FFFFh. The DS, ES, and SS descriptors are loaded with 0018h, 0020h and 0028h, respectively. The descriptors built at these GDT offsets describe the segments that these regĆ isters reference after the BIOS returns to the calling program. The program entering protected mode must construct its own IDT. This IDT must not overlap the BIOS realĆmode table and must handle all interrupts while the program is in protected mode. On Entry: AH = 89h BH = Interrupt number for IRQ 0 BL = Interrupt number for IRQ 8 ES:SI = Pointer to GDT built by application On Return: Carry = 0 = No error AH = 00 = Successful move 1 = Error AH = FFh = Unsuccessful PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-85

6. Conversions and Interfaces

BIOS Copies a block of memory from anywhere in the system address space to anyĆ where else in the system address space. Memory space not generally available to realĆmode programs is accessible through this function. On Entry: AH = 87h CX = Number of 16Ćbit words to move ES:SI = Pointer to 48Ćbyte GDT table allocated by calling program On Return: AH = 00 = Successful move 01 = RAM parity error occurred 02 = Other exception occurred 03 = Gate address line 20 failed Carry = 0 = No error 1 = Error When called, two of the descriptors in the GDT table specify the source and desĆ tination addresses of the block to be moved. The BIOS builds the other four desĆ criptors. The calling program supplies the segment limits, base address of the data blocks, and the access rights for each location.

Page 222

Conversions and Interfaces

SECTION 6

INT 15h, Function AX = 90h: Device Busy BIOS 6. Conversions and Interfaces

Invoked by BIOS. Default handler returns with AH set to zero and carry flag clear. On Entry: AH = 90h AL = Device type: 00h = Fixed disk 01h = Diskette 02h = Keyboard 03h = Pointing device 80h = Network FCh = Fixed disk reset FDh = Diskette driver motor start FDh = Printer ES:BX = Points to request block (if AL = 80h-FFh) On Return: Carry = 0 = No wait performed - driver must complete own wait 1 = Wait performed (I/O complete or timeout) INT 15h, Function AX = 9002h: Pend On Keyboard BIOS, 4000API Invoked from the BIOS to indicate that it wants to pend until a key is pressed. On Entry: AX = 9002h On Return: None " NOTE:

INTERRUPT ROUTINES MUST NOT ISSUE THIS CALL.

INT 15h, Function AH = 91h: Interrupt Complete BIOS On Entry: AH = 91h AL = Device type 00h = Fixed disk 01h = Diskette 02h = Keyboard 03h = Pointing device 80h = Network FCh = Fixed disk reset FDh = Diskette driver motor start FEh = Printer ES:BX = Points to request block if AL = 80hćFFh On Return: Carry = 0 = No wait performed Driver completes own wait 1 = Wait was performed (I/O complete or timeout) 6-86

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 223

SECTION 6

Conversions and Interfaces

INT 15h, Function AH = C0h: Return System Configuration Parameters Addr

6. Conversions and Interfaces

BIOS On Entry: AH = C0h On Return: AH = 00h = Successful 86h = System model could not be determined Carry = 0 = No error 1 = Error ES:BX = Address of system configuration table INT 15h, Function AH = C1h: Return Extended BIOS Data Area Segment BIOS On Entry: AH = C1h On Return: AH = 00h = Successful 86h = No EBDA Carry = 0 = No error 1 = Error (no EBDA) ES = Segment address of EBDA

Keyboard Services: Interrupt 16h Scan Codes The following tables list the character codes for ATĆcompatible keyboards. The column in each of these tables labeled Codes In Hex" lists the codes offered to INT 09h by the keyboard controller through Port 60h. The first table shows the character codes returned in AX through the INT 16h standard functions 00h/01h. The second table shows the values returned in AX through the INT 16h extended functions 10h/11h. Scan codes containing the hidden key notation are used for the extended keys on the 101Ćstyle keyboards. Hidden key notation is defined as scan codes offered to INT 09h in the form E0Ćxx. Hidden key notaĆ tion is not used for the 83/84Ćstyle keyboards. The key number system for the 101Ćkey keyboard is defined in the following chart: 110

1

112 113 114

2

16

3 17

4 18

115

5 19

116 117

6 20

7 21

30

31

32

33

34

44

46

47

48

49

59

60

8 22

35

9 23

36 50 61

118

51

119

120 121

122

123

124

125 126

10

11

12

13

15

75

80

85

90

95

100 105

24

25

26

27

28

29

76

81

86

91

96

101

37

38

39

40

41

42

92

97

102

53

54

93

98

103

99

104

52

55 62

83

57 79

84

89

106

108

PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-87

Page 224

Conversions and Interfaces

SECTION 6

The states of the keys are defined as follows:

6. Conversions and Interfaces

Pressing Caps Lock shifts alphabetical keys. All other keys defined to return normal values return the normal value indicated in the chart. Pressing a shift key while in the Caps Lock state causes alphabetical keys to return nonshifted values. All other keys defined to return shifted values return their shifted value. Pressing Caps lock a second time reverses the action. Pressing Scroll Lock by itself causes no action other than the recording of the state in the shift flags. Applications must query the state of the flag to take adĆ vantage of Scroll Lock. Pressing Num Lock causes the numeric keypad keys to return numeric values. Pressing a shift key while in the Num Lock state causes these same keys to reĆ turn the normal values listed in the chart. Pressing Num Lock a second time reĆ verses the action. Holding the Alt down in combination with the numeric keypad keys lets you enĆ ter any ASCII code from 0 to 255 into the system. Register AH returns zero and register AL returns the entered code when the Alt key is released. If more than three digits are entered, the value returned is module-256. Combination of Alt, Ctrl, and shift key presses are given the following priority: Alt, Ctrl, Shift. The only valid combination is Ctrl-Alt used for system reset. Duplicate keys on the 101Ćstyle keyboard return the same 2Ćbyte character code as their equivalent 83/84Ćstyle keyboard value. These duplicates states are reĆ corded in the shift flags. Applications must query the shift flags to distinguish these duplicate keys.

Character Codes Returned by INT 16h, Functions 00h/01h When a 101Ćstyle keyboard is used: " " "

Return all standard 83/84 style keyboard character codes, as is. Mask duplicate keys to the same 2Ćbyte code as 83/84 style counterparts. Kill any character codes not compatible with the 83/84 key keyboard. Table 6-6 Character Codes Returned by INT 16h, Functions 00h/01h

6-88

101 Key No. 1 2 3 4

U.S. Keyboard Legend ` ~ 1 ! 2 @ 3 #

Scan Codes (Hex) 29 02 03 04

Unshifted (AH/AL) 29/60 02/31 03/32 04/33

Shifted Control Alt (AH/AL) (AH/AL) (AH/AL) 29/7e 02/21 78/00 03/40 03/00 79/00 04/23 7A/00

5 6 7 8

4 5 6 7

$ % ^ &

05 06 07 08

05/34 06/35 07/36 08/37

05/24 06/25 07/5E 08/26

9 10 11 12

8 9 0 -

* ( ) _

09 0A 0B 0C

09/38 0A/39 0B/30 0C/2D

09/2A 0A/28 0B/29 0C/5F

PEN*KEY R 6100 Computer Programmer’s Reference Guide

07/1E

0C/1F

7B/00 7C/00 7D/00 7E/00 7F/00 80/00 81/00 82/00

Page 225

SECTION 6

Conversions and Interfaces

Table 6-6 (Continued) Character Codes Returned by INT 16h, Functions 00h/01h U.S. Keyboard Legend

Scan Codes (Hex)

Unshifted (AH/AL)

Shifted (AH/AL)

13 15 16 17

= + Backspace Tab Q

0D 0E 0F 10

0D/3D 0E/08 0F/09 10/71

0D/2B 0E/08 0F/00 10/51

18 19 20 21

W E R T

11 12 13 14

11/77 12/65 13/72 14/74

22 23 24 25

Y U I O

15 16 17 18

26 27 28 29

P [ { ] } \

30 31 32 33

Control (AH/AL)

Alt (AH/AL)

6. Conversions and Interfaces

101 Key No.

83/00 0E/7F 10/11

10/00

11/57 12/45 13/52 14/54

11/17 12/05 13/12 14/14

11/00 12/00 13/00 14/00

15/79 16/75 17/69 18/6F

15/59 16/55 17/49 18/4F

15/19 16/15 17/09 18/0F

15/00 16/00 17/00 18/00

19 1A 1B 2B

19/70 1A/5B 1B/5D 2B/5C

19/50 1A/7B 1B/7D 2B/7C

19/10 1A/1B 1B/1D 2B/1C

19/00

Caps Lock A S D

3A 1E 1F 20

1E/61 1F/73 20/64

1E/41 1F/53 20/44

1E/01 1F/13 20/04

1E/00 1F/00 20/00

34 35 36 37

F G H J

21 22 23 24

21/66 22/67 23/68 24/6A

21/46 22/47 23/48 24/4A

21/06 22/07 23/08 24/0A

21/00 22/00 23/00 24/00

38 39 40 41

K L ;: '"

25 26 27 28

25/6B 26/6C 27/3B 28/27

25/4B 26/4C 27/3A 28/22

25/0B 26/0C

25/00 26/00

42 43 44 45

(102 Key) Enter L Shift (102 Key)

2B 1C 2A 56

1C/0D

1C/0D

1C/0A

PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-89

Page 226

Conversions and Interfaces

SECTION 6

Table 6-6 (Continued) Character Codes Returned by INT 16h, Functions 00h/01h

6. Conversions and Interfaces 6-90

101 Key No.

U.S. Keyboard Legend

Scan Codes (Hex)

Unshifted (AH/AL)

Shifted (AH/AL)

Control (AH/AL)

Alt (AH/AL)

46 47 48 49

Z X C V

2C 2D 2E 2F

2C/7A 2D/78 2E/63 2F/76

2C/5A 2D/58 2E/43 2F/56

2C/1A 2D/18 2E/03 2F/16

2C/00 2D/00 2E/00 2F/00

50 51 52 53

B N M ,<

30 31 32 33

30/62 31/6E 32/6D 33/2C

30/42 31/4E 32/4D 33/3C

30/02 31/0E 32/0D

30/00 31/00 32/00

54 55 57 58

.> /? R Shift L Ctrl

34 35 36 1D

34/2E 35/2F

34/3E 35/3F

60 61 62 64

L Alt Space R Alt R Ctrl

38 39 E0ć38 E0ć1D

39/20

39/20

39/20

39/20

75 76 79 80

Insert Delete Left Home

E0ć52 E0ć53 E0ć4B E0ć47

52/00 53/00 4B/00 47/00

52/00 53/00 4B/00 47/00

73/00 77/00

81 83 84 85

End Up Down Page Up

E0ć4F E0ć48 E0ć50 E0ć48

4F/00 48/00 50/00 49/00

4F/00 48/00 50/00 49/00

75/00

86 89 90 91

Page Down Right Num Lock 7 Home

E0ć51 E0ć4D 45 47

51/00 4D/00

51/00 4D/00

76/00 74/00

47/00

47/37

77/00

92 93 95 96

4 Left 1 End / 8 Up

4B 4F E0ć35 48

4B/00 4F/00 35/2F 48/00

4B/34 4F/31 35/2F 48/38

73/00 75/00

PEN*KEY R 6100 Computer Programmer’s Reference Guide

84/00