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 4 of 9

PT630 Portable Terminal Programming Reference Guide: BIOS and System Functions, pages 23 to 31

Pages 23 to 31 of 73, from PT630 Portable Terminal Programming Reference Guide

The original document is the PDF (2.0 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 Unitech PT630

Page 23

PT630 Programming Reference Guide Page 23 of 59 -----------------------------------------------------------------------------------------------------------------1.5.12.14 Set Alpha input mode Entry Parameter: AH = 1AH BH = 0x11H 1.5.12.15 Set keypad input statusr Entry Parameter: AH = 1AH BH = 0x12H AL = 0 1 1.5.12.16 Get Scanner Port Status Entry Parameter: AH = 1BH BH = 5 Return values: AL = 0 1 Example: int TD_get_bar_type() { regs.h.ah = 0x1B; regs.h.bh = 5; int86(0x21,&regs,&regs); return(regs.h.al); } 1.5.13 General Communication Setting 1.5.13.1 Get MULTIPOINT Address Entry Parameter: AH = 1BH BH = 6 Returned Value: AL = Address Example: char TC_get_address() { regs.h.ah = 0x1B; regs.h.bh = 6; int86(0x21,&regs,&regs); return((char)regs.h.al); }

; Alpha mode ; Non-Aplha mode

; Scanner port is disabled ; Scanner port is enabled

; ASCII character

‘A’ -

’Y’ or

’0’ - ’6’

Page 24

PT630 Programming Reference Guide Page 24 of 59 -----------------------------------------------------------------------------------------------------------------1.5.13.2 Set Communication Parameters Entry Parameter: AH = 1CH BH = 1 AL bits 7-4:

bits 3-2:

Return Value:

bit

1:

bit

0:

None

Example: int TC_232_parameter(long baud,int parity,int stop,int data) { unsigned char cc=0; unsigned int i_baud; i_baud = (int)(baud / 10L); switch (i_baud) { case 11 : cc=0x00; break; case 15 : cc=0x10; break; case 30 : cc=0x20; break; case 60 : cc=0x30; break; case 120 : cc=0x40; break; case 240 : cc=0x50; break; case 480 : cc=0x60; break; case 1920 : cc=0x80; break; case 3840 : cc=0x90; break; case 5760 : cc=0xA0; break; default: cc=0x70; break; } switch (parity) { case 0 : break; case 1 : cc=cc|0x04; break; case 2 : cc=cc|0x0c; break; } switch (stop) { case 1 : break; case 2 : cc=cc|0x02; break; } switch (data) { case 7 : break; case 8 : cc=cc|0x01; break; } regs.h.ah = 0x1C; regs.h.bh = 1; regs.h.al = cc; int86(0x21,&regs,&regs); }

0001xxxx 0010xxxx 0011xxxx 0100xxxx 0101xxxx 0110xxxx 0111xxxx 1000xxxx 1001xxxx 1010xxxx xxxx00xx xxxx01xx xxxx11xx xxxxxx0x xxxxxx1x xxxxxxx0 xxxxxxx1 baud 150 baud 300 baud 600 baud 1200 baud 2400 baud 4800 baud 9600 baud 19200 baud 38400 baud 57600 none parity odd parity even parity one stop bit two stop bits 7 data bits 8 data bits

Page 25

PT630 Programming Reference Guide Page 25 of 59 -----------------------------------------------------------------------------------------------------------------1.5.13.3

Software Control Flow Entry Parameter: AH = 1CH BH = 2 AL = 0 ; Enable XON/XOFF control flow 1 ; Disable XON/XOFF control flow Return Value: None Note: Only for NONE communication protocol Example: void TC_flow_ctrl(int status) { if (status == 0) // Set flow control to none { regs.h.ah = 0x1C; regs.h.bh = 2; regs.h.al = 1; int86(0x21,&regs,&regs); regs.h.ah = 0x1C; regs.h.bh = 3; regs.h.al = 1; int86(0x21,&regs,&regs); } else if (status == 1) { regs.h.ah = 0x1C; regs.h.bh = 2; regs.h.al = 0; int86(0x21,&regs,&regs); } else { regs.h.ah = 0x1C; regs.h.bh = 2; regs.h.al = 1; int86(0x21,&regs,&regs); }

Page 26

PT630 Programming Reference Guide Page 26 of 59 -----------------------------------------------------------------------------------------------------------------1.5.13.4

Hardware Control Flow Entry parameters: AH = 1CH BH = 3 AL = 0 ; Enable CTS/RTS control flow 1 ; Disable CTS/RTS control flow Return Value: None Note: Only for NONE communication protocol

1.5.13.5

Set Communication Protocol Entry Parameter: AH = 1CH BH = 4 AL = 2 ; Set to MULTIPOINT protocol 3 ; Set to NONE protocol Return Value: None Example: void TC_protocol(int status) { regs.h.ah = 0x1C; regs.h.bh = 4; regs.h.al = (unsigned char)status; int86(0x21,&regs,&regs); }

1.5.13.6

Get MULTIPOINT Address Entry Parameter: AH = 1CH BH = 5 Returned Value: AL = Address Example: char TC_get_address() { regs.h.ah = 0x1C; regs.h.bh = 5; int86(0x21,&regs,&regs); return((char)regs.h.al); }

; ASCII character

‘A’ -

’Y’ or

’0’ - ’6’

Page 27

PT630 Programming Reference Guide Page 27 of 59 -----------------------------------------------------------------------------------------------------------------1.5.13.7

Set MULTIPOINT Address Entry Parameter: AH = 1CH BH = 6 AL = Address ; ASCII character ‘A’ - ’Y’ or Return Value: AL = 0 ; if successful 1 ; if failed

’0’ - ’6’

Example: int TC_set_address(char status) { regs.h.ah = 0x1C; regs.h.bh = 6; regs.h.al = status; int86(0x21,&regs,&regs); return((char)regs.h.al); }

1.5.13.8

Set File-Uploading Message ON/OFF Entry Parameter: AH = 1CH BH = 0AH AL = 0 ; Not display message while uploading file AL = 1 ; Display message while uploading file Return Value: None Example: void TD_upload_message(int status) { regs.h.ah= 0x1C; regs.h.bh= 0x0A; regs.h.al= (unsigned char)status; int86(0x21,&regs,&regs); }

Page 28

PT630 Programming Reference Guide Page 28 of 59 -----------------------------------------------------------------------------------------------------------------1.5.14 Terminal mode setting function 1.5.14.1 Set Terminal ID Entry Parameter: AH = 1DH BH = 0 DS:DX ; pointer to buffer of Return Value: None Example: void TT_id(unsigned char *str) { segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); regs.h.ah=0x1D; regs.h.bh=0; int86x(0x21,&regs,&regs,&segregs); return(regs.h.al); }

1.5.14.2

Set ONLINE/LOCAL in Terminal Mode Entry Parameter: AH = 1DH BH = 1 AL = 0/1 ; ONLINE/LOCAL Return Value: None Example: void TT_online_local(int status) { regs.h.ah=0x1D; regs.h.bh=1; regs.h.al=(unsigned char)status; int86x(0x21,&regs,&regs,&segregs); }

1.5.14.3

Set ECHO ON/OFF in Terminal Mode Entry Parameter: AH = 1DH BH = 2 AL = 0/1 ; ECHO ON/OFF Return Value: None Example: void TT_echo(int status) { regs.h.ah=0x1D; regs.h.bh=2; regs.h.al=(unsigned char)status; int86x(0x21,&regs,&regs,&segregs); }

8 characters ID string

Page 29

PT630 Programming Reference Guide Page 29 of 59 -----------------------------------------------------------------------------------------------------------------1.5.14.4

Set AUTOLF ON/OFF in Terminal Mode Entry Parameter: AH = 1DH BH = 3 AL = 0/1 ; AUTOLF ON/OFF Return Value: None Example: void TT_auto_LF(int status) { regs.h.ah= 0x1D; regs.h.al= (unsigned char)status; regs.h.bh= 3; int86(0x21,&regs,&regs); }

1.5.14.5

Set CHARACTER/BLOCK in Terminal Mode Entry Parameter: AH = 1DH BH = 4 AL = 0 ; CHARACTER mode 1 ; BLOCK mode DX = 0 ; block = LINE 1 ; block = PAGE 2 ; block = LINE or PAGE Return Value: None Example: void TT_mode(int status,int status1) { regs.h.ah= 0x1D; regs.h.bh= 4; regs.h.al= (unsigned char)status; regs.x.dx = (unsigned char)status1; int86(0x21,&regs,&regs); }

1.5.14.6

Define LINE Character in Terminal Mode Entry parameters: AH = 1DH BH = 5 AL = 0 – 255 ; ASCII character Return Value: None Example: void TT_line_terminal(unsigned char status) { regs.h.ah= 0x1D; regs.h.bh= 5; regs.h.al = status; int86(0x21,&regs,&regs); }

Page 30

PT630 Programming Reference Guide Page 30 of 59 -----------------------------------------------------------------------------------------------------------------1.5.14.7

Define Page Character in Terminal Mode Entry Parameter: AH = 1DH BH = 6 AL = 0 – 255 ; ASCII character Return Value: None Example: void TT_page_terminal(unsigned char status) { regs.h.ah= 0x1D; regs.h.bh= 6; regs.h.al= status; int86(0x21,&regs,&regs); }

1.5.14.8

Get Terminal ID Entry Parameter: AH = 1DH BH = 0x10 Returned Value: DS:DX = output buffer pointer

1.5.15 Set User-defined Key-map Entry Parameter: AH = 1EH AL = 0 DS:DX

; pointer to Key-map buffer with 5*32 characters ; corresponding to keypad in 5 input modes

Return Value: None Example: void TD_key_map(unsigned char *str) { segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); regs.h.ah=0x1E; regs.h.al=0; int86x(0x21,&regs,&regs,&segregs); }

Note:

Default system key-map:

Page 31

PT630 Programming Reference Guide Page 31 of 59 -----------------------------------------------------------------------------------------------------------------Non-ALPHA Mode byte Seq 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 key name 7 4 1 CLR F1 ENTER 8 5 2 0 3 5 F2 9 6 3 . 4 6 F3

SP F4

31

: |: }:

ALPHA-1 Mode hex code 37 34 31 08 0 86 0D 0 38 35 32 30 11 13 87 0 39 36 33 2E 10 12 88 0 0 0 0 84 20 80 89 byte Seq. 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

0

63 key name S J A CLR F1 ENTER V M D @ 3 5 F2 Y P G ; 4 6 F3

SP F4

ALPHA-2 Mode hex code 53 4A 41 08 0 86 0D 0 56 4D 44 40 11 13 87 0 59 50 47 3B 10 12 88 0 0 0 0 84 20 00 89 byte Seq. 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

0

95 key name T K B CLR F1 ENTER W N E ? 3 5 F2 Z Q H . 4 6 F3

SP F4

ALPHA-3 Mode hex code 54 4B 42 08 0 86 0D 0 57 4E 45 3F 11 13 87 0 5A 51 48 2E 10 12 88 0 0 0 0 84 20 00 89 byte Seq. 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126

0

127 key name U L C CLR F1 ENTER X Q F & 3 5 F2 R I , 4 6 F3

SP F4

CMD Mode hex code 55 4C 43 08 0 86 0D 0 58 4F 46 26 11 13 87 0 5F 52 49 2C 10 12 88 0 0 0 0 84 20 00 89 byte Seq. 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158

0

159

LCD Backlight LCD Contrast Beeper Volume

Keyname and Hexcode with ... means DON’T CARE. 1.5.16 Get System Key-map Entry Parameter: AH = 1EH AL = 1 DS:DX Return Value: Key-map in buffer

; pointer to 120 bytes buffer

Example: void TD_get_key_map(unsigned char *str) { segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); regs.h.ah=0x1E; regs.h.al=1; int86x(0x21,&regs,&regs,&segregs); return(regs.h.al); } key name : # \ F5 ENTER + =3D $ ‘ 3 PgDn F6 * / % ! 4 PgUp F7

SP F8 hex code 2D 3A 23 5c 84 8A 0D 0 2B 24 24 27 11 93 8B 00 2A 2F 25 21 10 92 8C 0 0 0 0 84 20 80 8D 0