2014-12-11 21:14:23 +01:00
|
|
|
#include "defines.h"
|
|
|
|
|
2014-12-14 18:05:58 +01:00
|
|
|
// Enable scancodes for event loop
|
2014-12-11 21:14:23 +01:00
|
|
|
inline void enable_scancode() {
|
|
|
|
__asm__ __volatile__("int $0x40"::"a"(66),"b"(1),"c"(1));
|
|
|
|
}
|
|
|
|
|
2014-12-14 18:05:58 +01:00
|
|
|
// Clear key buffer
|
2014-12-11 21:14:23 +01:00
|
|
|
inline void clear_key_buffer() {
|
|
|
|
int i = 0;
|
|
|
|
for (i = 0; i < 120; i++)
|
|
|
|
__menuet__getkey();
|
|
|
|
}
|
|
|
|
|
2014-12-14 18:05:58 +01:00
|
|
|
// Wait for screen draw (vertical sync)
|
2014-12-11 21:14:23 +01:00
|
|
|
inline void vsync() {
|
|
|
|
__asm__ __volatile__("int $0x40"::"a"(18),"b"(14));
|
|
|
|
}
|