PDT mirror in nasm
Posted: Sun Sep 04, 2016 2:05 pm
Hi.
I managed to get PDT mirror working in C.
I'm trying now to put it in the initial loader assembly code but I run in to trouble with nasm.
The code is :
On compilation I get the following error that points to the last line in the code snippet.
Is there any way to get it working, or do I need to do it in code later on.
Thanks,
Ramon
I managed to get PDT mirror working in C.
I'm trying now to put it in the initial loader assembly code but I run in to trouble with nasm.
The code is :
Code: Select all
section .data
align 0x1000
pdt:
dd 0x00000083
times (KERNEL_PAGE_NUMBER - 1) dd 0 ; Pages before kernel space.
dd 0x00000083
times (1024 - KERNEL_PAGE_NUMBER - 2) dd 0 ; Pages after the kernel image.
dd (pdt|0x3)
According to google, It appears that the location of pdt is not constant during assembly.boot/loader.s:96: error: `|' operator may only be applied to scalar values
Is there any way to get it working, or do I need to do it in code later on.
Thanks,
Ramon