![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/1/16/1166c9bc-dac0-4b08-8c8b-1041b20f9e08/1166c9bc-dac0-4b08-8c8b-1041b20f9e08-bg76.png)
104 IrDA Lite Plus
MX3 Reference Guide E-EQ-MX3RG-J-ARC
unsigned long bytesSend = 0;
unsigned char *c;
clock_t start, tmp;
/* IS.EXE filename */
fprintf(stderr, "\nIrPlus Version 1.00, write size %d
bytes.\n", BUF_SIZE);
// check which COM port
__asm {
mov ax, 0ffffH
mov dx, 0ffffH
int 14H
cmp ax, dx
jz COMM
jmp DONE
COMM:
mov comPort, ax
DONE:
}
if (comPort < 0) {
fprintf(stderr, "IrPlus is not installed.\n");
return;
}
if (argc <= 1) {
fprintf(stderr, "enter a filename to send.\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
/* open file */
if ((fh = open(argv[1], O_RDONLY|O_BINARY)) == -1) {
fprintf(stderr, "cannot open the %s file.\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, "sending file %s \n", argv[1]);
//delay_ms(2000);
start = clock();
status = 0;
while (status >= 0) {
if (stopExec())
break;
putchar('|');