background image

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

06 

Direct Console I/O  

 

 

Entry Parameter: 

AH =  

 

 

DL =  0 – 254 

; write ASCII  character in DL to LCD 

 

 

 

255 

; read ASCII character from keypad  

 

Return Value:  1) When read (DL <> 255): 

 

 

     Character in AL if ZERO flag is cleared   

 

 

     No input if ZERO flag is set 

 

 

2)  When write (DL= 255): 

 

 

     None 

 

 

Example: 

unsigned char TS_stdin_out(unsigned char ch) 

   regs.h.ah= 6; 
   regs.h.dl= ch; 
   int86(0x21,&regs,&regs); 
   if (ch == 0xFF) 
   { 
      if ((regs.x.cflag & 0x40) == 0) return(regs.h.al); 
      else return(0); 
   } 
   return(0); 

 
 

07 

Read Keypad (wait if no key)

 

 

Entry Parameter: 

AH = 7 

 

Return Value:  AL = 0 – 255   

; ASCII character 

 

 

Example: 

unsigned char TS_stdin_noecho() 

   regs.h.ah= 7; 
   int86(0x21,&regs,&regs); 
   return(regs.h.al); 

 
 

08 

Read Keypad (wait if no key)

 

 

Entry Parameter: 

AH = 8 

 

Return Value:  AL = 0 – 255   

; ASCII character 

 

Содержание PT600

Страница 1: ...PT600 Portable Terminal Programming Reference Guide Document number 3506000120...

Страница 2: ...1 4 LCD Control Functions INT 10H 5 1 5 System Functions INT 21H 9 1 6 Power Management Function INT 22H 47 1 7 Beeper Control INT 31H 48 1 8 RS232 Control Functions INT 33H 48 Chapter 2 Multipoint Co...

Страница 3: ...CD Control 21 H System Functions 22 H Power Manager 31 H Beeper Control 33 H RS232 Control 1 2 Display Font Functions INT 09H 00 Select Large Font Entry Parameter AH 0 1 select 8 16 dot character font...

Страница 4: ...int86 0x09 regs regs 03 Get Font Type Entry Parameter AH 3 Return Value AL 0 1 large small font Example int TL_get_font_type regs h ah 3 int86 0x09 regs regs return regs h al 04 Set User Defined Font...

Страница 5: ...6 256 1536 bytes Return Value Font data in the buffer Example void TL_get_all_ASCII_font int type unsigned char str regs h ah 5 regs h al unsigned char type segregs ds FP_SEG str regs x dx FP_OFF str...

Страница 6: ...6 bytes Return Value Font data in the buffer Example void TL_get_one_ASCII_font int type int ascii_code unsigned char str regs h ah 7 regs h al unsigned char type regs h cl unsigned char ascii_code se...

Страница 7: ......

Страница 8: ...le Disable Screen Scroll Entry Parameter AH 1 AL 0 1 disable enable screen scroll Return Value None Example void TL_scroll int status regs h ah 1 regs h al unsigned char status int86 0x10 regs regs 02...

Страница 9: ...regs regs y regs h dh x regs h dl 04 Display 16x16 Bitmap Entry Parameter AH 4 DH Row DL Column DS BX pointer to bitmap 32 bytes pattern data Return Value None Note This function is available only in...

Страница 10: ...25 26 27 28 29 30 31 32 Content FF FF FF FE FC F9 F3 E7 CF CF E7 F3 F9 F3 E7 CF include stdio h include stdlib h include dos h include conio h unsigned char logo 32 0xFF 0xFF 0x3E 0x1C 0xC9 0xE3 0xF7...

Страница 11: ...10 regs regs sregs getch 05 Set Cursor On Off Entry Parameter AH 5 AL 0 1 set cursor OFF ON Return Value None Example void TL_cursor_type int status regs h ah 5 regs h al unsigned char status int86 0x...

Страница 12: ...to bitmap 32 bytes pattern data Return Value None Note This function is available only in large font Example void TL_display_16x16 unsigned char str regs h ah 0x4F segregs ds FP_SEG str regs x bx FP_...

Страница 13: ...er Return Value None Example void TS_stdout unsigned char ch regs h ah 2 regs h dl ch int86 0x21 regs regs return 03 Read RS232 wait if no character Entry Parameter AH 3 Return Value AL 0 255 ASCII ch...

Страница 14: ...Return Value None Note Only for NONE communication protocol Example void TS_stdaux_out unsigned char ch regs h ah 4 regs h dl ch int86 0x21 regs regs return...

Страница 15: ...None Example unsigned char TS_stdin_out unsigned char ch regs h ah 6 regs h dl ch int86 0x21 regs regs if ch 0xFF if regs x cflag 0x40 0 return regs h al else return 0 return 0 07 Read Keypad wait if...

Страница 16: ......

Страница 17: ...er to data buffer Return value DS DX pointer to data buffer Data format in buffer Input buffer with CR at last number of characters actual input number of characters requested to be input n m Example...

Страница 18: ...regs h ah 0x1A regs h bh 0 regs h al unsigned char status int86 0x21 regs regs 1A Buzzer ON OFF Control Entry Parameter AH 1AH BH 1 AL 0 1 set Buzzer OFF ON Return Value None Example void TD_buzzer in...

Страница 19: ...le void TD_serial int status regs h ah 0x1A regs h bh 4 regs h al unsigned char status int86 0x21 regs regs 1A Enable Disable Key or Key Function Entry Parameter AH 1AH BH 5 AL 0 All keys 1 Supervisor...

Страница 20: ...regs h bh 5 regs h al unsigned char type regs h bl unsigned char status int86 0x21 regs regs...

Страница 21: ...put characters in ALPHA mode for key 0 Language Mode Hex Code Display ALPHA 1 5B 0 English ALPHA 2 5C ALPHA 3 5D ALPHA 1 8F 1 Sweden Finla nd ALPHA 2 8E ALPHA 3 99 ALPHA 1 92 2 Danish ALPHA 2 9D ALPHA...

Страница 22: ...atus Entry Parameter AH 1AH BH 8 Return Value AL 0 1 Normal Battery low Example int TS_battery regs h ah 0x1A regs h bh 8 int86 0x21 regs regs return regs h al 1A Check Backup Battery Status Entry Par...

Страница 23: ...FF 1 Set the Good read LED green light ON 2 Set the Good read LED controlled by system Return Value None Note If the function is called by AL 0 or AL 1 the system will not control Good read LED ON OFF...

Страница 24: ...void TD_flash_trigger int status regs h ah 0x1A regs h bh 0x0B regs h al unsigned char status int86 0x21 regs regs 1A Enable Disable Double Verification When Read Bar Code Label Entry Parameter AH 1A...

Страница 25: ...sable Enable Default Disable b Fuction Call INT 0x21 AH 0x1A BH 0x0F Call AL 0 1 disable enable Return none 1A Support Keypad Input in Lower Upper Case a Manual setting USER MENU 8 SET 4 KEYPAD ALPHA...

Страница 26: ...d Value AL Address ASCII character A Y or 0 6 Example char TC_get_address regs h ah 0x1B regs h bh 6 int86 0x21 regs regs return char regs h al 1C Set Communication Parameters Entry Parameter AH 1CH B...

Страница 27: ...ts Return Value 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...

Страница 28: ...cc int86 0x21 regs regs 1C 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 protoc...

Страница 29: ...s 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 1C Set Communication Protocol Entry Parameter AH 1CH BH 4 AL 2...

Страница 30: ...meter AH 1CH BH 6 AL Address ASCII character A Y or 0 6 Return Value AL 0 if successful 1 if failed Example int TC_set_address char status regs h ah 0x1C regs h bh 6 regs h al status int86 0x21 regs r...

Страница 31: ...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 1D Set ONLINE LOCAL in Terminal Mode Entry Parameter AH 1D...

Страница 32: ...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 1D Set CHARACTER B...

Страница 33: ...atus1 int86 0x21 regs regs 1D 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 a...

Страница 34: ...h bh 6 regs h al status int86 0x21 regs regs 1E Set User defined Key map Entry Parameter AH 1EH AL 0 DS DX pointer to Key map buffer with 5 24 characters corresponding to keypad in 5 input modes Retu...

Страница 35: ...PHA 74 ALPHA 98 ALPHA 3 7 37 27 A 41 51 B 42 75 C 43 99 4 4 34 28 J 4A 52 K 4B 76 L 4C 100 3A 5 1 31 29 S 53 53 T 54 77 U 55 101 2D 6 CLR 08 30 CLR 08 54 CLR 08 78 CLR 08 102 CLR 08 7 31 55 79 103 8 F...

Страница 36: ...e symbology BL 0 All supported bar code symbologies 1 Code 39 2 I 2 of 5 3 Codabar 4 EAN UPC 5 Code 128 6 EAN 128 Return Value None Example void TD_set_decode_status int type int status regs h ah 0x1F...

Страница 37: ...0 0 1 disable enable Code 39 decoding 1 0 1 disable enable Check Digit verification 2 0 1 no send send Check Digit 3 0 1 no send send Start Stop characters 4 0 1 Full ASCII OFF ON Return Value None Ex...

Страница 38: ...BL 3 AL bit 0 0 1 disable enable Codebar decoding 1 0 1 disable enable Check Digit verification 2 0 1 no send send Check Digit 3 0 1 no send send Start Stop characters Return Value None 1F Code 128 Se...

Страница 39: ...UPC A Settings Entry Parameter AH 1FH BH 3 BL 11H AL bit 0 0 1 disable enable UPC A decoding 2 0 1 no send send Check Digit 3 0 1 no send send Leading Digit Return Value None Example Same with Code 3...

Страница 40: ...d send Leading Digit Return Value None Example Same with Code 39 s example 1F EAN 8 Settings Entry Parameter AH 1FH BH 3 BL 14H AL bit 0 0 1 disable enable UPC E decoding 2 0 1 no send send Check Digi...

Страница 41: ...t Interrupt Vector Entry Parameter AH 25H AL interrupt number DS BX address of interrupt routine Return Value None Example void TS_set_interrupt_vector int vect unsigned int ds unsigned int dx regs h...

Страница 42: ...OK Setting error Example int TS_set_date int year int month int day regs h ah 0x2b regs x cx year regs h dh month regs h dl day int86 0x21 regs regs return int regs h al 2C Get System Time Entry Param...

Страница 43: ...int86 0x21 regs regs return int regs h al 2E Set Alarm Date Entry Parameter AH 2EH AL 0 disable alarm 1 enable alarm everyday 2 enable alarm by date If AL 2 CX year 1980 2079 DH month 1 12 DL day 1 31...

Страница 44: ...Get DOS and Firmware Version Number Entry Parameter AH 30H AL 0 1 with without OEM version code Return Value if AL 0 when call AL major DOS version number 2 AH minor DOS version number 10 CL major fi...

Страница 45: ...pt_vector int vect unsigned int es unsigned int bx regs h ah 0x35 regs h al unsigned char vect int86x 0x21 regs regs segregs es segregs es bx regs x bx 36 Get Free Disk Cluster Entry Parameter AH 36H...

Страница 46: ...x dx FP_OFF fn int86x 0x21 regs regs segregs if regs x cflag 0x01 1 return 1 else return regs x ax 3D Open File with Handle Entry Parameter AH 3DH AL 0 read only 1 write only 2 read and write DS DX po...

Страница 47: ...e with Handle Entry Parameter AH 3FH BX Handle of file CX number of bytes to read DS DX pointer to data buffer Return Value if success AX number of bytes read and CARRY flag is cleared data in buffer...

Страница 48: ...F str regs h ah 0x40 regs x bx hdl regs x cx cnt int86x 0x21 regs regs segregs if regs x cflag 0x01 0 return regs x ax else return 1 41 Delete File Entry Parameter AH 41H DS DX pointer to file name bu...

Страница 49: ...char type regs x bx hdl aa l ll loc regs x cx aa i ii2 regs x dx aa i ii1 int86 0x21 regs regs aa i ii2 regs x dx aa i ii1 regs x ax if regs x cflag 0x01 0 return aa l ll else return 1L 42 Search Cha...

Страница 50: ...ta file String length 1 byte String without 0 terminator N bytes 0x00 1 byte Field separator character 1 byte Structure of parameter block for fixed length record data file String length 1 byte String...

Страница 51: ...eturn Value if success CARRY flag is cleared AX segment address of block allocated if failed CARRY flag is set AX error code BX largest available memory block in paragraphs Example int TS_alloc_mem un...

Страница 52: ...the block to resize BX new block size in paragraphs 16 bytes Returned Value if success CARRY flag is cleared if failed CARRY flag is set AX error code Example int TS_modify_alloc_mem unsigned int siz...

Страница 53: ...nter to input data string BL 1 Code 39 2 Interleaved 2 of 5 3 Codabar 5 Code 128 6 EAN 128 7 Code 93 11H UPC A 12H UPC E 13H EAN 13 14H EAN 8 21H User Code 1 TRIOPTIC 22H User Code 2 TOSHIBA CL 0 scan...

Страница 54: ...gs regs 56 Rename File Entry Parameter AH 56H DS DX pointer to old file name string ES DI pointer to new file name string Return Value if success AH 0 and CARRY flag is cleared if failed AH 1 and CARR...

Страница 55: ...OFF fn if regs x cflag 0x01 1 return 1 else return regs x ax 5C Receive Data from RS232 Port in MULTIPOINT Protocol for Host Port Control Entry Parameter AH 5CH DS DX pointer to data buffer max 256 by...

Страница 56: ...signed char str int wait do segregs ds FP_SEG str regs x dx FP_OFF str regs h ah 0x5D int86x 0x21 regs regs segregs return regs h al while wait regs h al return regs h al 5E Check RS232 Output Buffer...

Страница 57: ......

Страница 58: ...back to ACTIVE mode Sample C program with INT22 int get_barcode char str_bar union REGS regs struct SREGS sregs regs x dx int str_bar segread sregs regs h ah 0x50 intdosx regs regs sregs if regs x ax...

Страница 59: ...frequency BX time duration AX Frequency Hz BX Time Duration ms 0 200 0 10 1 400 1 50 2 600 2 100 3 800 3 200 4 1K 4 500 5 2K 5 800 6 2 5K 6 1K 7 3K 7 1 5K 7 5K 8 2K Return Value None Example void TD_b...

Страница 60: ...600 1000xxxx baud 19200 1001xxxx baud 38400 1010xxxx baud 57600 bits 3 2 xxxx00xx none parity xxxx01xx odd parity xxxx11xx even parity bit 1 xxxxxx0x one stop bit xxxxxx1x two stop bits bit 0 xxxxxxx0...

Страница 61: ...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...

Страница 62: ...ter AH 2 AL character Return Value None Note Only for NONE communication protocol Example void TC_232_char_O unsigned char ch regs h ah 2 regs h al ch int86 0X33 regs regs 03 Enable RS 232 Port Entry...

Страница 63: ...Only for NONE communication protocol Example void TC_232_RTS int rts regs h ah 5 regs h al 2 regs h dh unsigned char rts int86 0X33 regs regs void TC_232_DTR int dtr regs h ah 5 regs h al 1 regs h dh...

Страница 64: ...Example int TC_232_CTS regs h ah 6 regs h al 2 int86 0X33 regs regs return int regs h dh int TC_232_DSR regs h ah 6 regs h al 1 int86 0X33 regs regs return int regs h dh...

Страница 65: ...computer in data packet according to MULTIPOINT protocol MULTIPOINT protocol is an asynchronous serial multi drop protocol for communication with the host computer One host computer can be connected u...

Страница 66: ...Host Command STX ESC CMD parameters CS1 CS2 ADDR Acknowledgement ACK Negative ACK NAK...

Страница 67: ...transmitted as original data without converting all codes not in 1 including DC hex Data Checksum Calculation in Packet 1 CS sum of all characters excluding STX and ETX packet length excluding STX an...

Страница 68: ...ata in the buffer The application on PT600 can 1 Use system call INT 21H AH 5CH to get data 2 Use system call INT 21H AH 5EH to check the buffer status 2 Host Requests Data from the PT600 Polling Form...

Страница 69: ...ut itself into file receiving state The host system may start transmission of the file as soon as the ACK response has arrived 2 Cancel Current Downloading File Command ESC z Format STX ESC z CS1 CS2...

Страница 70: ...7 Description The command will change PT600 MULTIPOINT address 2 Warm Start ESC A Format STX ESC A CS1 CS2 ADDR ACK or NAK Description The command causes PT600 stop program execution and return to Re...

Страница 71: ...C Format STX ESC C comtable CS1 CS2 ADDR STX ESC C retcode CS1 CS2 ETX retcode 00H successful 01H error Description The command writes comtable to PT600 communication control table comtable is defined...

Страница 72: ...ESC D Format STX ESC D CS1 CS2 ADDR STX ESC D filename filename CS1 CS2 ETX Description PT600 will send its file directory to the host 6 Get Program Name in FLASH Memory ESC D ROM Format STX ESC D RO...

Страница 73: ...s1 s2 CS1 CS2 ETX s1 total FLASH memory size in 4 ASCII digits s2 free FLASH memory size in 4 ASCII digits 11 Cold Start ESC H Format STX ESC H CS1 CS2 ADDR ACK or NAK Description The command clears a...

Страница 74: ...de if the command is received The MULTIPOINT protocol will be disabled until BYE or EXIT command is issued in Kermit Server Mode 15 Set Date Time ESC M Format STX ESC M datetime CS1 CS2 ADDR datetime...

Страница 75: ...X ESC P password CS1 CS2 ADDR password 10 characters maximum STX ESC P retcode CS1 CS2 ETX retcode 00H success 01H error Description The command changes the password for PT600 Supervisor Mode 18 Get T...

Страница 76: ...fully received 20 Device Configuration ESC V Format STX ESC V devtable CS1 CS2 ADDR STX ESC V retcode CS1 CS2 ETX retcode 00H success 01H error Description The command sets configuration of PT600 devi...

Страница 77: ...ers are separated by a space character 22 Run Program in RAM or FLASH memory ESC X Format STX ESC X prg name CS1 CS2 ADDR STX ESC X retcode CS1 CS2 ETX retcode 00H run from RAM 01H no program 02H run...

Отзывы: