{

regs.h.ah= 0x1C; regs.h.al= status; regs.h.bh= 9; int86(0x21,®s,®s);

 

}

 

 

5F

Read host port

 

 

 

Entry Parameters:

AH = 0x5F

 

 

Returned Values:

DS:DX = buffer pointer

 

 

AL = 0

;output succeed

 

 

1

;no data

int TC_str_I(unsigned char *str,int wait)

{

do { regs.h.ah=0x5F; segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); int86x(0x21,®s,®s,&segregs);

}while (wait && regs.h.al); return(regs.h.al);

 

}

 

 

60

Output data

 

 

 

Entry parameters:

AH = 0x60

 

 

 

DS:DX = buffer pointer

 

Returned Values:

AL = 0

;output succeed

 

 

1

;buffer busy now

int TC_str_O(unsigned char *str,int wait)

{

do { regs.h.ah=0x60; segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); int86x(0x21,®s,®s,&segregs);

}while (wait && regs.h.al); return(regs.h.al);

}

61 Check if Busy-port

Entry Parameters:

AH = 0x61

3-25

Page 26
Image 26
Unitech MR350MKII manual Read host port, Output data, Check if Busy-port