/* Main.c file generated by New Project wizard
*
* Created: 周五 12月 9 2016
* Processor: 8086
* Compiler: Digital Mars C
*
* Before starting simulation set Internal Memory Size
* in the 8086 model properties to 0x10000
*/
#define OUT373 7000H
// Write a byte to the specified I/O port
void outp(unsigned int addr, unsigned char data) {
__asm {
mov dx, addr
mov al, data
out dx, al
}
}
void delay(){
for(int i=0;i<500;++i){
for(int j=0;j<120;++j)
;
}
}
void main(void) {
int i=0;
while (1) {
// Write your code here
outp(OUT373, ~(1<<i++%8));
delay();
}
}