Questions about Higher Half Kernel
Posted: Sat Nov 04, 2017 7:37 pm
1. How I implement the code of http://wiki.osdev.org/Higher_Half_x86_Bare_Bones to the old one?
2. I have a error when compiling, all ASM methods seens wrong, but the old file works fine, what's happen?
3. For the last, I need a direction to go, I don't know where I start but I'm learning using the "Diff metter" in wiki.
2. I have a error when compiling, all ASM methods seens wrong, but the old file works fine, what's happen?
Code: Select all
kernel/loader.s: Assembler messages:
kernel/loader.s: Warning: end of file not at end of a line; newline inserted
kernel/loader.s:1: Error: no such instruction: `global _loader'
kernel/loader.s:2: Error: no such instruction: `extern kernel_main'
kernel/loader.s:4: Error: no such instruction: `modulealign equ 1<<0'
kernel/loader.s:5: Error: no such instruction: `meminfo equ 1<<1'
kernel/loader.s:6: Error: no such instruction: `flags equ MODULEALIGN|MEMINFO'
kernel/loader.s:7: Error: no such instruction: `magic equ 0x1B4DB002'
kernel/loader.s:8: Error: no such instruction: `checksum equ -(MAGIC+FLAGS)'
kernel/loader.s:10: Error: no such instruction: `kernel_virtual_base equ 0xC0000000'
kernel/loader.s:11: Error: no such instruction: `kernel_page_number equ (KERNEL_VIRTUAL_BASE>>22)'
kernel/loader.s:13: Error: no such instruction: `section .data'
kernel/loader.s:14: Error: no such instruction: `align 0x1000'
kernel/loader.s:16: Error: no such instruction: `dd 0x00000083'
kernel/loader.s:17: Error: no such instruction: `times (KERNEL_PAGE_NUMBER - 1)dd 0'
kernel/loader.s:18: Error: no such instruction: `dd 0x00000083'
kernel/loader.s:19: Error: no such instruction: `times (1024 - KERNEL_PAGE_NUMBER - 1)dd 0'
kernel/loader.s:21: Error: no such instruction: `section .text'
kernel/loader.s:22: Error: no such instruction: `align 4'
kernel/loader.s:24: Error: no such instruction: `dd MAGIC'
kernel/loader.s:25: Error: no such instruction: `dd FLAGS'
kernel/loader.s:26: Error: no such instruction: `dd CHECKSUM'
kernel/loader.s:28: Error: no such instruction: `stack_size equ 0x4000'
kernel/loader.s:29: Error: no such instruction: `loader equ (_loader - 0xC0000000'
kernel/loader.s:30: Error: no such instruction: `global loader'
kernel/loader.s:33: Error: too many memory references for `mov'
kernel/loader.s:34: Error: too many memory references for `mov'
kernel/loader.s:36: Error: too many memory references for `mov'
kernel/loader.s:37: Error: too many memory references for `or'
kernel/loader.s:38: Error: too many memory references for `mov'
kernel/loader.s:40: Error: too many memory references for `mov'
kernel/loader.s:41: Error: too many memory references for `or'
kernel/loader.s:42: Error: too many memory references for `mov'
kernel/loader.s:44: Error: invalid char '[' beginning operand 2 `[StartInHH]'
kernel/loader.s:48: Error: junk `[BootPageDirectory]' after expression
kernel/loader.s:48: Error: too many memory references for `mov'
kernel/loader.s:49: Error: no such instruction: `invpg [0]'
kernel/loader.s:50: Error: too many memory references for `mov'
kernel/loader.s:57: Error: no such instruction: `section .bss'
kernel/loader.s:58: Error: no such instruction: `align 32'
kernel/loader.s:60: Error: no such instruction: `resb STACK_SIZE'