linux 0.11 内核学习 -- rs_io.s,串口汇编代码
来源:互联网 发布:柯林斯词典下载mac 编辑:程序博客网 时间:2024/05/18 03:45
/*
* 该文件实现rs232 串行通信中断处理
*/
/*
* linux/kernel/rs_io.s
*
* (C) 1991 Linus Torvalds
*/
/*
*rs_io.s
*
* This module implements the rs232 io interrupts.
*/
.text
.globl _rs1_interrupt,_rs2_interrupt
/* 读写队列缓冲区的长度 */
size= 1024/* must be power of two !
and must match the value
in tty_io.c!!! */
/* these are the offsets into the read/write buffer structures */
/* 读写缓冲结构中的偏移量tty_queue */
rs_addr = 0
head = 4
tail = 8
proc_list = 12
buf = 16
/* 当写队列里还剩256 个字符空间(WAKEUP_CHARS)时,我们就可以写 */
startup= 256/* chars left in write queue when we restart it */
/*
* These are the actual interrupt routines. They look where
* the interrupt is coming from, and take appropriate action.
*/
.align 2
/* 串行端口1 中断处理程序入口点 */
_rs1_interrupt:
// tty 表中对应串口1 的读写缓冲指针的地址入栈
pushl $_table_list+8// table_list定义在文件tty_io.c文件中
jmp rs_int
/* 串行端口2 中断处理程序入口点 */
.align 2
_rs2_interrupt:
pushl $_table_list+16// 同上
rs_int:
pushl %edx
pushl %ecx
pushl %ebx
pushl %eax
push %es
push %ds/* as this is an interrupt, we cannot */
/* 让ds、es 指向内核数据段 */
pushl $0x10/* know that bs is ok. Load it */
pop %ds
pushl $0x10
pop %es
movl 24(%esp),%edx// 将缓冲队列指针地址存入edx 寄存器
movl (%edx),%edx// 取读队列指针(地址)
- linux 0.11 内核学习 -- rs_io.s,串口汇编代码
- linux-rs_io.s
- linux 内核启动 arm64 汇编 head.s
- linux 0.11 内核学习 -- setup.s
- linux 0.11 内核学习 -- head.s
- linux 0.11 内核学习 -- head.s
- linux 0.11 内核学习 -- setup.s
- Linux 0.11内核bootsect.s和loader.s的移植为AT&T汇编
- Linux内核---4.产生内核head.s反汇编文件
- Linux内核分析【1】--分析汇编代码
- (转)gas汇编小手册 学习Linux内核代码的必备
- linux内核代码分析之asm.s
- linux 0.11 内核学习 -- bootsect.s, 万里长征第一步
- linux 0.11 内核学习 -- asm.s,机器难免出故障。
- linux 0.11 内核学习 -- system_call.s,系统调用仅是如此。
- 汇编+内核+代码阅读
- Linux内核分析,c程序汇编代码分析--第一周
- 从高级语言到汇编代码 《Linux内核分析》笔记
- DIV的滚动条,
- replace方法
- struts2 HelloWorld 应该注意的地方
- linux 下通过wine 运行windows程序包括IE
- 直接选择排序
- linux 0.11 内核学习 -- rs_io.s,串口汇编代码
- ubuntu放我的电脑
- 面试感悟--真诚得意!!!!!
- SQL SERVER 2005 同步复制技术
- 写在三十岁到来这一天
- [转]wince 蓝牙
- AIX学习资料收藏
- ACM HDU 1003
- TortoiseSvn 分支合并