Import backup from 2004-01-18

This commit is contained in:
Josh Holtrop 2004-01-18 22:00:00 -05:00
parent 7de4f94423
commit 10fd7102ca
2 changed files with 32 additions and 0 deletions

18
idt.inc
View File

@ -67,6 +67,9 @@ isr_label 48
isr_label 49 isr_label 49
isr_main: isr_main:
cmp eax, 0x30
jz isr_syscall
pusha pusha
push ds push ds
push es push es
@ -85,6 +88,21 @@ isr_main:
iret iret
isr_syscall:
pop eax ;syscall function number
pusha
push ds
push es
push ebx
call _putc
pop es
pop ds
popa
iret

View File

@ -82,6 +82,20 @@ void k_init()
printf("Memory available to OS: %u MB (%u bytes)\n", mm_megabytes, mm_totalmem); printf("Memory available to OS: %u MB (%u bytes)\n", mm_megabytes, mm_totalmem);
printf("Free memory: %u bytes (%u pages)\n", mm_freemem(), mm_freemem()>>12); printf("Free memory: %u bytes (%u pages)\n", mm_freemem(), mm_freemem()>>12);
printf("Root Directory: %s/\n", rootDevice->id); printf("Root Directory: %s/\n", rootDevice->id);
// int a;
// byte *addr = 0;
// for (a = 0; a < 2; a++)
// {
// byte *app = mm_palloc();
// vmm_map1((dword)addr, (dword)app);
// addr += 4096;
// }
// addr = vfs_readFile("/bin/hash.hos");
// memcpy(0, addr, 8192);
// asm("call 0");
dword key = 0; dword key = 0;