3-35
regs.h.ah = (unsigned char)port;
regs.h.al = (unsigned char)type;
int86(0x08,&regs,&regs);
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
CLOSE
Returned Values: None
void TD_relay(int port,int status)
{
regs.h.ah= (unsigned char)port;
regs.h.al= (unsigned char)status;
int86( 0x09 ,&regs,&regs);
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,&regs,&regs);
return(regs.h.al);
}