Make cursor-off use a system call
This commit is contained in:
parent
3010630796
commit
64c8e85324
@ -665,6 +665,19 @@ static int sys_sysfunc(int fn, char ** args) {
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
/*
|
||||
* Set VGA text-mode cursor location
|
||||
* (Not actually used to place a cursor, we use this to move the cursor off screen)
|
||||
*/
|
||||
PTR_VALIDATE(args);
|
||||
outportb(0x3D4, 14);
|
||||
outportb(0x3D5, (unsigned int)args[0]);
|
||||
outportb(0x3D4, 15);
|
||||
outportb(0x3D5, (unsigned int)args[1]);
|
||||
|
||||
return 0;
|
||||
|
||||
default:
|
||||
debug_print(ERROR, "Bad system function %d", fn);
|
||||
break;
|
||||
|
@ -1,11 +1,6 @@
|
||||
static void outb(unsigned char _data, unsigned short _port) {
|
||||
__asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));
|
||||
}
|
||||
#include <syscall.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
/* This should remove the hardware cursor. */
|
||||
outb(14, 0x3D4);
|
||||
outb(0xFF, 0x3D5);
|
||||
outb(15, 0x3D4);
|
||||
outb(0xFF, 0x3D5);
|
||||
int x[] = {0xFF,0xFF};
|
||||
return syscall_system_function(13, (char **)x);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user