/* Main.c file generated by New Project wizard
*
* Created: 周二 三月 15 2016
* Processor: USB8086
* Compiler: Digital Mars C
* StudentID: XXXXXXXXXX
* Name: XXXXXXXXXX
*
*/
#define IN245 0D000H
#define OUT373 8000H
// Write a byte to the specified I/O port
void outp(unsigned int addr, char data) {
__asm {
mov dx, addr
mov al, data
out dx, al
}
}
// Read a byte from the specified I/O port
char inp(unsigned int addr) {
char result;
__asm {
mov dx, addr
in al, dx
mov result, al
}
return result;
}
char tmp;
/*
* NOTE: Before starting simulation set Internal Memory Size
* in the 8086 model properties to 0x10000
*/
void main(void) {
while (1) {
// Write your code here
;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Exp1_IO口读写.zip (16个子文件)
Exp1_IO
8086
Debug
Makefile 1KB
Debug.exe 2KB
main.obj 774B
rtl.obj 190B
main.c 752B
rtl.asm 561B
Exp1_IO.pdsprj.ZALUS.Ben Zalus.workspace 4KB
Last Loaded Exp1_IO.pdsbak 21KB
Exp1_IO.pdsprj 21KB
USB8086
Debug
Makefile 1KB
Debug.exe 2KB
main.obj 762B
rtl.obj 190B
main.c 809B
rtl.asm 564B
Backup Of Exp1_IO.pdsbak 21KB
共 16 条
- 1
资源评论
ben_zalus
- 粉丝: 5
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功