X-Git-Url: https://git.wirehaze.ovh/BOS.git/blobdiff_plain/5e144deaab35e84b572c5374dcda25490dd5c737..63a43d51d088c206975b642c77c2928a04044de9:/kernel/16bit/mem.asm?ds=inline diff --git a/kernel/16bit/mem.asm b/kernel/16bit/mem.asm index 0446e02..7057d93 100755 --- a/kernel/16bit/mem.asm +++ b/kernel/16bit/mem.asm @@ -12,40 +12,40 @@ ; out: eax = mem in bytes, 0 = error ; ;-----------------------------------------; getmem: - push dx - push cx - push ebx + push dx + push cx + push ebx - xor eax, eax - xor ebx, ebx - mov ax, 0xE801 - xor dx, dx - xor cx, cx - int 0x15 - jnc .cont1 - xor eax, eax - jmp .end ; failed! :'( + xor eax, eax + xor ebx, ebx + mov ax, 0xE801 + xor dx, dx + xor cx, cx + int 0x15 + jnc .cont1 + xor eax, eax + jmp .end ; failed! :'( - .cont1: - mov si, ax - or si, bx - jne .cont - mov ax, cx - mov bx, dx + .cont1: + mov si, ax + or si, bx + jne .cont + mov ax, cx + mov bx, dx - .cont: - cmp ax, 0x3C00 - jb .below_16 - movzx eax, bx - add eax, 0x100 - shl eax, 16 ; eax = eax * 65536 - jmp .end + .cont: + cmp ax, 0x3C00 + jb .below_16 + movzx eax, bx + add eax, 0x100 + shl eax, 16 ; eax = eax * 65536 + jmp .end - .below_16: - shl eax, 10 ; eax = eax * 1024 + .below_16: + shl eax, 10 ; eax = eax * 1024 .end: - pop ebx - pop cx - pop dx - ret \ No newline at end of file + pop ebx + pop cx + pop dx + ret \ No newline at end of file