![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/1/16/1166c9bc-dac0-4b08-8c8b-1041b20f9e08/1166c9bc-dac0-4b08-8c8b-1041b20f9e08-bg79.png)
IrDA Lite Plus 107
E-EQ-MX3RG-J-ARC MX3 Reference Guide
if (comPort < 0) {
fprintf(stderr, "IrPlus is not installed.\n");
return;
}
if (argc <= 1) {
fprintf(stderr, "enter a filename.\n");
return;
}
#if 0
/* comPort 0 for COMM1 */
if (((status = _bios_serialcom(_COM_STATUS, comPort, 0)) <
0)) {
fprintf(stderr, "IrPlus does not exit, status %x\n",
status);
return;
}
#endif
fh = -1;
if (_dos_creat((const char *)argv[1], _A_NORMAL, &fh) != 0)
{
fprintf(stderr, "cannot create a file %s\n",
argv[1]);
return;
}
if (fh < 0){
fprintf(stderr, "cannot open a file %s\n", argv[1]);
return;
}
/* open connection */
fprintf(stderr, "connecting...\n");
__asm {
mov ax, 0fffeH
mov dx, comPort
int 14H
mov status, ax
}
if (status < 0) { /* cannot open connection */
close(fh);
fprintf(stderr, "connection timeout\n");
goto CLOSE_CONN; //return;
}
else
fprintf(stderr, "write to file %s\n", argv[1]);
/* read data */
for (i = 0, c = buf; (1); bytesRecvd++) {
#if 1
if (stopExec())
break;
#endif
if (! (bytesRecvd & 0x00ff))
putch('.');
status = _bios_serialcom(_COM_RECEIVE, comPort, 0);
if (status < 0)
{ /* timeout */
if (i) {
putch('|');