io_port.asm.svn-base
来自「德国Erlangen大学教学操作系统源码。」· SVN-BASE 代码 · 共 77 行
SVN-BASE
77 行
; $Id: io_port.asm,v 1.1.1.1 2002/09/20 20:40:32 gal Exp $;*****************************************************************************;* Betriebssysteme *;*---------------------------------------------------------------------------*;* *;* I O _ P O R T *;* *;*---------------------------------------------------------------------------*;* Die hier definierten Funktionen stellen die Maschinebefehle 'in' und *;* 'out' fuer die Klasse IO_Port zur Verfuegung. *;*****************************************************************************; EXPORTIERTE FUNKTIONEN[GLOBAL outb][GLOBAL outw][GLOBAL inb][GLOBAL inw]; IMPLEMENTIERUNG DER FUNKTIONEN[SECTION .text] ; OUTB: Byteweise Ausgabe eines Wertes ueber einen I/O-Port.;; C-Prototyp: void outb (int port, int value);outb: push ebp mov ebp,esp mov edx,[8+ebp] mov eax,[12+ebp] out dx,al pop ebp ret; OUTW: Wortweise Ausgabe eines Wertes ueber einen I/O-Port.;; C-Prototyp: void outw (int port, int value);outw: push ebp mov ebp,esp mov edx,[8+ebp] mov eax,[12+ebp] out dx,ax pop ebp ret; INB: Byteweises Einlesen eines Wertes ueber einen I/O-Port.;; C-Prototyp: int inb (int port);inb: push ebp mov ebp,esp mov edx,[8+ebp] xor eax,eax in al,dx pop ebp ret; INW: Wortweises Einlesen eines Wertes ueber einen I/O-Port.;; C-Prototyp: int inw (int port);inw: push ebp mov ebp,esp mov edx,[8+ebp] xor eax,eax in ax,dx pop ebp ret
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?