/* 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();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Exp0_流水灯.zip (10个子文件)
Exp0_LED
Exp0_LED.pdsprj 17KB
Last Loaded Exp0_LED.pdsbak 19KB
8086
main.c 662B
rtl.asm 564B
Debug
main.obj 775B
Debug.exe 2KB
rtl.obj 190B
Makefile 1KB
Backup Of Exp0_LED.pdsbak 19KB
Exp0_LED.pdsprj.ZALUS.Ben Zalus.workspace 5KB
共 10 条
- 1
资源评论
ben_zalus
- 粉丝: 5
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功