------------------------------------------------------------------------------------------------------------------ CHAPTER 1. BIOS AND SYSTEM FUNCTIONS ...5 NTERRUPT ECTOR ISPLAY UNCTIONS 2.4.1 Select Large Font ...5 2.4.2 Select Small Font ...5 2.4.3 Set Font Type...6 2.4.4 Get Font Type ...6 2.4.5 Set User-Defined Font for All Characters...6 2.4.6 Get Font Data for All Characters ...7 2.4.7 Set User-Defined Font for One Character ...7 2.4.8...
Page 3
------------------------------------------------------------------------------------------------------------------ 2.4.31 Set MULTIPOINT Address ...27 2.4.32 Set File-Uploading Message ON/OFF ...27 2.4.33 Set Terminal ID...28 2.4.34 Set ONLINE/LOCAL in Terminal Mode ...28 2.4.35 Set ECHO ON/OFF in Terminal Mode...28 2.4.36 Set AUTOLF ON/OFF in Terminal Mode...29 2.4.37 Set CHARACTER/BLOCK in Terminal Mode ...29 2.4.38 Define LINE Character in Terminal Mode ...29 2.4.39...
Page 4
2.4.4 Data Conversion Rules in Packet...60 2.4.5 Data Checksum Calculation in Packet...60 2.4.6 Example packet of command to send the file named A.EXE to PT630 with address ‘A’...60 OMMUNICATION IN 2.2.1 Host Send Data to PT630 (ESC 0)...62 2.2.2 Host Requests Data from the PT630 ( Polling ) ...62 OMMUNICATION IN 2.3.1...
------------------------------------------------------------------------------------------------------------------ Chapter 1. BIOS and System Functions The PT630 operating system supports DOS/BIOS function calls that a programmer can access when developing an application for the portable. Interrupt Vector Assignment for I/Os Vector BIOS Function 09 H Display Font 0F H...
------------------------------------------------------------------------------------------------------------------ 1.2.3 Set Font Type Entry Parameter: AH= 2 AL= 0/1 ; set to large/small font Return Value: None void TL_font(int status) regs.h.ah = (unsigned char)status; regs.h.al = 2; int86(0x09,®s,®s); 1.2.4 Get Font Type Entry Parameter: AH= 3 Return Value: AL= 0/1 ;...
------------------------------------------------------------------------------------------------------------------ 1.2.6 Get Font Data for All Characters Entry Parameter: 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); int86x(0x9,®s,®s,&segregs); 1.2.7 Set User-Defined Font for One Character Entry Parameter: Return Value: None Example:...
Kermit Server Function ( INT 0FH ) Entry Parameter: None Return Value: When INT 0FH is called in user application, PT630 will enter Kermit server. Pressing [CMD] key then [Exit] key to leave it and return to user application. Example : void TC_kermit_mode() int86(0x0F,®s,®s);...
------------------------------------------------------------------------------------------------------------------ 1.4.8 Display Character Entry Parameter: Return Value: None Example regs.h.ah = 0x0A; regs.h.al = cc; int86(0x10,®s,®s); 1.4.9 Display 16*16 Bitmap at Current Cursor Position Entry Parameter: Return Value: None Note: This function is available only in large font. Example : void TL_display_16x16(unsigned char *str) regs.h.ah=0x4F;...
------------------------------------------------------------------------------------------------------------------ 1.5.12.6 Set Keypad Language Entry Parameter: Return Value: None Note: The functions defines input characters in ALPHA mode for key [0]: Language 0.English 1.Sweden/Finland ALPHA-2 2.Danish 3.Spanish 4.French 5.German 6.Italian ‘¥’ (9DH) in ASCII is replaced with ‘Ø’ when Danish is selected. Example: void TD_key_language(int status) regs.h.ah= 0x1A;...
------------------------------------------------------------------------------------------------------------------ Non-ALPHA Mode ALPHA-1 Mode byte byte name code Seq. name ENTER ENTER LCD Backlight LCD Contrast Beeper Volume Keyname and Hexcode with ... means DON’T CARE. 1.5.16 Get System Key-map Entry Parameter: Return Value: Key-map in buffer Example: void TD_get_key_map(unsigned char *str) segregs.ds = FP_SEG(str);...
------------------------------------------------------------------------------------------------------------------ 1.5.26 Get Interrupt Vector Entry Parameter: AL = interrupt number Return Value: DS:BX = address of interrupt routine Example: void TS_get_interrupt_vector(int vect,unsigned int *es,unsigned int *bx) regs.h.ah= 0x35; regs.h.al= (unsigned char)vect; int86x(0x21,®s,®s,&segregs); *es = segregs.es; *bx = regs.x.bx; 1.5.27 Get Free Disk Cluster Entry Parameter: Return Value: AX = 1 (number of sectors per cluster) BX = number of available clusters...
------------------------------------------------------------------------------------------------------------------ 1.5.28.2 Open File with Handle Entry Parameter: AL = 0 DS:DX Return Value: if success, AX = Handle and CARRY flag is cleared if failed , AX = 2 and CARRY flag is set Example: int TS_open_file(char *fn,int mode) regs.h.ah=0x3Dh;...
------------------------------------------------------------------------------------------------------------------ 1.5.28.6 Delete File Entry Parameter: DS:DX Return Value: if success, CARRY flag is cleared if failed, AX = 2 and CARRY flag is set Example: int TS_delete_file(char *fn) TD_intdos_O(0x41,0,fn); if ((regs.x.cflag & 0x01) == 0) return(1); else return(-1); 1.5.28.7 Move File Pointer Entry Parameter: AL = 0...
------------------------------------------------------------------------------------------------------------------ 1.5.28.8 Search Character Beginning at the Current File Position Entry Parameter: AL = 3 BX = file handle CX = n DL = character Return Value: 1) If character is found: Carry flag = clear DX:AX = pointer to current file position (at the position of If character is not found: Carry flag = set CX = total matched times...
------------------------------------------------------------------------------------------------------------------ 1.5.28.10 Insert / Delete Data Block to / from File at the Current Position Entry Parameter: Return Value: 1) If the function is successful: 2) If the function fails: Carry flag = set DX:AX = pointer to current file position (not changed) Note: For insertion, the content of the inserted data block is undefined.
------------------------------------------------------------------------------------------------------------------ 1.5.31 Modify Allocated Memory Block Entry Parameter: Returned Value: Example: int TS_modify_alloc_mem(unsigned int size,unsigned char far *str,int *free) unsigned long aa; regs.h.ah=0x4a; regs.x.bx=size; segregs.ds = FP_SEG(str); int86(0x21,®s,®s); *free = regs.x.bx; if ((regs.x.cflag & 0x01) == 0) return(1); else return(-1); 1.5.32 Run specified program Entry Parameter: Return Value: if success, AX = Handle and CARRY flag is cleared...
1.5.37 Send Data to RS232 Port in MULTIPOINT Protocol (Buffered Output) Entry Parameter: Return Value: Note: 1) Only for MULTIPOINT communication protocol 2) PT630 will send data out when polled by Host computer Example: int TC_str_O(unsigned char *str,int wait) do { segregs.ds = FP_SEG(str);...
------------------------------------------------------------------------------------------------------------------ 1.5.38 Check RS232 Output Buffer Status in MULTIPOINT Protocol Entry Parameter: Returned Value: Note: 1) Only for MULTIPOINT communication protocol 2) The function can be used to check if data has been sent to Host computer. Example: int TC_ready(int wait) do { regs.h.ah= 0x5E;...
------------------------------------------------------------------------------------------------------------------ Power Management Function ( INT 22H ) Entry Parameter: Return Value: AX = The system will enter HALT power saving mode from this BIOS call, on return the value in AX register will define the type of device that awakes the system back to ACTIVE mode. Sample C program with INT22 int get_barcode(char * str_bar) union REGS regs;...
------------------------------------------------------------------------------------------------------------------ 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 = 0; regs.h.al = cc; int86(0x33,®s,®s); 1.8.2 Get Character from RS232 Port Entry Parameter: Return Value: 1) AL = character...
------------------------------------------------------------------------------------------------------------------ 1.8.6 Set RTS/DTR Signal of RS232 Port Entry parameter: AL = DH = Return Value: None Note: 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®s,®s); void TC_232_DTR(int dtr) regs.h.ah = 5;...
Page 56
------------------------------------------------------------------------------------------------------------------ COM2 (internal COM port) RS232 Control Functions ( INT 14H ) 1.9.1 Set Communication Parameters Entry Parameter: AH = 0 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;...
Page 57
------------------------------------------------------------------------------------------------------------------ 1.9.2 Get Character from COM 2 RS232 Port Entry Parameter: Return Value: 1) 2) AH = 1 Note: Only for NONE communication protocol Example: unsigned char TC_232_char_I() regs.h.ah = 1; int86(0x14,®s,®s); if (regs.h.ah == 0) return(regs.h.al); return(255); 1.9.3 Send Character to COM2 RS232 Port Entry Parameter: Return Value: None Note:...
Page 58
------------------------------------------------------------------------------------------------------------------ 1.9.6 Set RTS/DTR Signal of RS232 Port Entry parameter: AL = DH = Return Value: None Note: 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(0X14,®s,®s); void TC_232_DTR(int dtr) regs.h.ah = 5;...
MULTIPOINT protocol is an asynchronous serial multi-drop protocol for communication with the host computer. One host computer can be connected up to 32 PT630 terminals, while each PT630 has a unique address. The address is an ASCII character ( ‘A’ – ‘Y’ or ‘0’ – ‘6’) plus 80H.
2) CS1 = high nibble of CS + 40H 3) CS2 = low nibble of CS + 40H 2.1.7 Example packet of command to send the file named A.EXE to PT630 with address ‘A’ Packet: STX ESC CMD <parameters> CS1 CS2 ADDR = ‘L’...
STX ESC ‘0’ <data> CS1 CS2 ADDR ACK or NAK Description: PT630 will put the received data in the buffer. The application on PT630 can: Use system call INT 21H/AH=5CH to get data. Use system call INT 21H/AH=5EH to check the buffer status.
Description: For uploading, the host must know the filename on PT630. Get Directory Command (ESC ‘D’) can be used to view all filenames on PT630 (see 4.4 Host Commands). 2.3.5 Host Requests File from the PT630 ( Upload ) from specified file positon ⇒...
Format: ⇐ ACK or NAK Description: The command causes PT630 stop program execution and return to Ready Mode. Programs and data that have been stored in the PT630 RAM space are preserved. The system parameters remain unchanged. The equivalent keypad invoking sequence is pressing CMD and then the ALPHA key.
For Example, if the command instructs the RS-232 port to change the baud rate from 9600 to 1200 the PT630 will switch to 1200 right after the command has been received. The next host communication will use 1200 baud rate.
Format: ⇐ ACK or NAK Description: The command clears all PT630 RAM memory content. It performs tests on all major hardware devices. Programs or data that have previously accumulated in the PT630 or previously been downloaded by the host will be purged from the memory.
⇐ STX ESC’ M’ <retcode> CS1 CS2 ETX ;<retcode>= 00H success ⇒ ACK or NAK Description: This command allows the host system to set PT630 real time clock. The parameter <datetime> is an ASCII character string. The first four characters represent the year.
Get Portable Model Number and BIOS Version Number (ESC v) ⇒ STX ESC ‘v’ CS1 CS2 ADDR Format: ⇐ STX ESC ‘v’ ‘PT630 V5.00’ CS1 CS2 ETX ⇒ ACK or NAK Description: The model and BIOS version numbers are separated by a space character.
Page 71
------------------------------------------------------------------------------------------------------------------ Chapter 3. Update Note Correct error return value on BX on section 1.5.25Get DOS and Firmware Version Number Entry Parameter: AL = 0/1 Return Value: if AL = AL= major DOS version number (=2) AH= minor DOS version number (=10) CL= major firmware version number CH= minor firmware version number BX= OEM firmware version code (=0 for standard version)
Page 72
------------------------------------------------------------------------------------------------------------------ Error entry value on 1.8.8 Flush RS232 RX buffer Entry Parameter: Return Value: None Add COM2 RS232 function call on section Add reverse display under small font mode on Keymap table error on 1.5.15 Set User-defined Key-map Entry Parameter: Return Value: None Example: void TD_key_map(unsigned char *str)
Page 73
------------------------------------------------------------------------------------------------------------------ Add Multi-protocol command “Bell” on section Add Aim mode for long range engine on 1.5.12.13 Set Aim mode for Long Range engine 10. Add alpha lower/upper case mode on 1.5.12.14 Set Alpha input mode 11. Add Code 32 function call on 1.5.17.10 2.4.24...
Need help?
Do you have a question about the PT630 and is the answer not in the manual?
Questions and answers