- 2


sport(PORT, '.'); /* p */

for(; cnt.count; cnt.count--)

ch = rport(PORT);

putc(ch, fp);

if(ferror(fp))

printf(" ");

exit(1);

sport(PORT, '.'); /* p */

fclose(fp);

/* p */

void send_file_name(f)

char *f;

do

sport(PORT, '?');

while(!kbhit() && !(check_stat(PORT)&256));

if(kbhit())

getch();

exit(1);

wait(PORT);

while(*f)

sport(PORT, *f++);

wait(PORT);

sport(PORT, '\0'); /* p */

wait(PORT);

/* (p)*/

void wait(port)

int port;

if(rport(port)!='.')

printf(" \n");

exit(1);

/* p p */

void sport(port, c)

int port; /* p / */

char c; /* p */

union REGS r;

r.x.dx = port; /* p */

r.h.al = c; /* p */

r.h.ah = 1; /* p */

int86(0x14, &r, &r);

if(r.h.ah & 128) /* p 7- */

printf("p p p "); printf("%d",r.h.ah);

exit(1);

/* p */

rport(port)

int port; /* p / */

union REGS r;

/* p */

while(!(check_stat(port)&256))

if(kbhit())

getch();

exit(1);

r.x.dx = port; /* p */

r.h.ah = 2; /* */

int86(0x14, &r, &r);

if(r.h.ah & 128)

printf(" p p "); return r.h.al;

/* pp p */

check_stat(port)

int port; /* p / */

union REGS r;

r.x.dx = port; /* p */

r.h.ah = 3; /* */

int86(0x14, &r, &r);

return r.x.ax;

/* p pp:

p p 9600 , -,

p ., 8 .

*/

void port_init(port)

int port;

union REGS r;

r.x.dx = port; /* p */

r.h.ah = 0; /* p*/

r.h.al = 231; /* - . */

int86(0x14, &r, &r);