I wrote simple paging according to
this tutorial, and i have some trouble.
When i run my OS , the text on a screen begins to appear and disappear. I don't know what's going on, but if i don't call switch_page_directory() (see -
https://github.com/s04v/locOS/blob/mast ... ing.c#L143). All works correctly.
What is the problem??
+ dump of switch_page_directory
Code:
319: 55 push %ebp
31a: 89 e5 mov %esp,%ebp
31c: 83 ec 10 sub $0x10,%esp
31f: 8b 45 08 mov 0x8(%ebp),%eax
322: a3 00 00 00 00 mov %eax,0x0
323: R_386_32 current_directory
327: 8b 45 08 mov 0x8(%ebp),%eax
32a: 05 00 10 00 00 add $0x1000,%eax
32f: 0f 22 d8 mov %eax,%cr3
332: 0f 20 c0 mov %cr0,%eax
335: 89 45 fc mov %eax,-0x4(%ebp)
338: 81 4d fc 00 00 00 80 orl $0x80000000,-0x4(%ebp)
33f: 8b 45 fc mov -0x4(%ebp),%eax
342: 0f 22 c0 mov %eax,%cr0
345: c9 leave
346: c3 ret