sets up the PIC
This commit is contained in:
@ -1,24 +0,0 @@
|
||||
#ifndef ARCH_IO_H
|
||||
#define ARCH_IO_H
|
||||
|
||||
/**
|
||||
* outb:
|
||||
* Sends the given data to the I/O port. Defined in io.s
|
||||
*
|
||||
* @param port The I/O port to send the data to
|
||||
* @param data TThe data to send to the I/O port
|
||||
*/
|
||||
void outb(unsigned short port, unsigned char data);
|
||||
|
||||
/**
|
||||
* inb:
|
||||
* Read a byte from an I/O port
|
||||
*
|
||||
* @param port The address of the I/O port
|
||||
* @return The read byte
|
||||
*/
|
||||
unsigned char inb(unsigned short port);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -18,3 +18,9 @@ inb:
|
||||
in al, dx ; read a byte from the I/O port and store it in the al register
|
||||
ret ; return the read byte
|
||||
|
||||
|
||||
global io_wait
|
||||
io_wait:
|
||||
mov al, 0x0
|
||||
out 0x80, al
|
||||
ret
|
||||
|
@ -3,9 +3,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <kernel/serial.h>
|
||||
|
||||
|
||||
#include "io.h"
|
||||
#include <kernel/x86/io.h>
|
||||
|
||||
/* I/O ports */
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <kernel/tty.h>
|
||||
#include <kernel/x86/io.h>
|
||||
|
||||
#include "vga.h"
|
||||
#include "io.h"
|
||||
|
||||
/* I/O ports */
|
||||
#define VGA_COMMAND_PORT 0x3D4
|
||||
|
Reference in New Issue
Block a user