limine/lib/real.h
iiSaLMaN 7506fcb820 Add simple disk library (#2)
* Simple disk library

* Simple disk library

* add rm_seg and rm_off

* Make interrupt call per 128 sectors

* Matching code style + some modifies

* change max count to 127 + slight modifies 

max count of sectors to make a call with is 127 instead of 128

* make setup_dap static

* Matching actual code style + slight modifies
2019-06-01 23:34:24 +02:00

22 lines
394 B
C

#ifndef __REAL_H__
#define __REAL_H__
#include <stdint.h>
#define rm_seg(x) (unsigned short)(((int)x & 0xFFFF0) >> 4)
#define rm_off(x) (unsigned short)(((int)x & 0x0000F) >> 0)
struct rm_regs {
uint32_t ebp;
uint32_t edi;
uint32_t esi;
uint32_t edx;
uint32_t ecx;
uint32_t ebx;
uint32_t eax;
};
void rm_int(uint8_t, struct rm_regs *, struct rm_regs *);
#endif