英特尔80386在哪里保存寄存器? [英] Where does intel 80386 save registers?

查看:63
本文介绍了英特尔80386在哪里保存寄存器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发自己的基本内核以用于教育目的.我正在阅读Intel 80386,并阅读有关中断0的信息:-除以零异常.

I am trying to develop my own basic kernel for educational purpose. I was reading the Intel 80386 and reading about the the interrupt 0 :- Divide by zero exception.

里面写着:-

已保存的指令指针 CS和EIP寄存器的已保存内容指向生成异常的指令.

Saved Instruction Pointer Saved contents of CS and EIP registers point to the instruction that generated the exception.

我的问题是这些寄存器保存在哪里.我如何才能访问这些寄存器?

My question is where are these registers saved. How, can I access these registers ?

推荐答案

中断将EFLAGS,CS和EIP寄存器的当前内容(按此顺序)压入堆栈.在某些例外情况下,CPU在EIP之后推送错误代码,但不将其除以零.

An Interrupt pushes the current contents of the EFLAGS, CS, and EIP registers (in that order) on the stack. For some exceptions the CPU push an error code after EIP but not for Divide by zero.

如果您开发自己的内核,则应该真正查看

If you develop your own kernel you should really take a look into the Intel Software Developer Manual. There is a chapter about Interrupts and Exceptions (6.4 in the actual version) and this includes a complete description what is when pushed.

这篇关于英特尔80386在哪里保存寄存器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆