]> git.lizzy.rs Git - nyax.git/blobdiff - stage2/mmap.asm
Finish paging driver
[nyax.git] / stage2 / mmap.asm
index 15c81f86b41a6f395d039b7e5ca34b6af6d5fc43..b5cbe79949f5bd5602eb4915b89576b3c29979f3 100644 (file)
@@ -17,36 +17,32 @@ mmap:
        cmp eax, MAPMAGIC ; detect failure
        jne .fail
 
-       mov eax, [di+16]
-       cmp eax, 2
-       ja .next
+       cmp dword[di+16], 1
+       jne .next
 
-       mov eax, [di+4]
-       cmp eax, 0
+       cmp dword[di+4], 0
        jne .keep
 
-       mov eax, [di+0]
-       cmp eax, 0x100000
+       cmp dword[di+0], 0x100000
        jb .next
 
 .keep:
+       mov dword[di+20], 0
        add di, 24
 
 .next:
        cmp ebx, 0
        jne .loop
 
-       mov ax, di
-       sub ax, MEMMAP
-       xor dx, dx
-       mov bx, 24
-       div bx
-       mov [MEMMAPCNT], ax
-
-       mov eax, MEMMAPCNT
-       call print_dec
-       call newline
-       ;jmp $
+       mov dword[di+0], 0
+       mov dword[di+4], 0
+
+       ;mov ax, di
+       ;sub ax, MEMMAP
+       ;xor dx, dx
+       ;mov bx, 24
+       ;div bx
+       ;mov [MEMMAPCNT], ax
 
        ret