regs.h.ah = (unsigned char)port;
regs.h.al = (unsigned char)type;
int86(0x08,®s,®s);
return((int)regs.h.al);
}
Activate/Deactivate Relay ports INT 09H
Entry Parameters: | AH = 0 | ;select Relay #1 |
| 1 | ;select Relay #2 |
| AL = 0 | ;deactivate selected Relay contact |
|
| OPEN |
| 1 | ;activate selected Relay contact |
Returned Values: | None | CLOSE |
|
void TD_relay(int port,inttatus)
{
regs.h.ah=(unsigned char)port; regs.h.al= (unsigned char)status; int86(0x09,®s,®s); return(regs.h.al);
} |
|
|
1A Buzzer On/Off | INT 21H |
|
Entry Parameters: | AH = 0x1A |
|
| BH = 1 |
|
| AL = 0 | ;disable buzzer |
| 1 | ;enable buzzer |
Returned Values: | None |
|
void TD_buzzer(int status)
{
regs.h.ah=0x1A;
regs.h.al= (unsigned char)status; regs.h.bh=1; int86(0x21,®s,®s); return(regs.h.al);
}