feat: implemented ide read write operations

This commit is contained in:
2021-02-05 23:23:26 +01:00
parent b156509da1
commit a4651ca9d9
9 changed files with 286 additions and 62 deletions

View File

@@ -41,6 +41,13 @@ void port_double_word_out(unsigned short port, unsigned int data) {
__asm__("out %%eax, %%dx" : : "a" (data), "d" (port));
}
void port_word_out_repeat(unsigned short port, unsigned short *data, int buffer_size) {
asm("rep outsw"
: "+S"(data), "+c"(buffer_size)
: "d"(port)
: "memory");
}
void port_word_in_repeat(unsigned short port, unsigned short *data, int buffer_size) {
asm("rep insw"
: "+D"(data), "+c"(buffer_size)