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 = 0;
regs.h.al = cc;
int86(0x33,®s,®s);
}
01
Get Character from RS232 Port
Entry Parameter:
AH = 1
Return Value: 1)
AH = 0
; has character input
AL = character
2) AH = 1
; no character input
Note:
Only for NONE communication protocol
Summary of Contents for PT600
Page 1: ...PT600 Portable Terminal Programming Reference Guide Document number 3506000120...
Page 7: ......
Page 16: ......
Page 20: ...regs h bh 5 regs h al unsigned char type regs h bl unsigned char status int86 0x21 regs regs...
Page 57: ......
Page 66: ...Host Command STX ESC CMD parameters CS1 CS2 ADDR Acknowledgement ACK Negative ACK NAK...