* kernel.asm: 18.1 is now safe (correction of rev. 748)

* vesa20.inc: comments were correct! Restored (correction of rev. 753)
* fasm from last AZ

git-svn-id: svn://kolibrios.org@755 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond)
2008-02-23 10:16:37 +00:00
parent 1ab9baa0a6
commit a85d73c061
4 changed files with 29 additions and 20 deletions

View File

@@ -43,6 +43,11 @@ START: ; Start of execution
mov ecx, (fileinfos_end-fileinfos)/4
or eax, -1
rep stosd
push 68
pop eax
push 11
pop ebx
mcall
cmp [params],0
jz red
@@ -586,6 +591,7 @@ program_base dd ?
buffer_address dd ?
memory_setting dd ?
start_time dd ?
memblock dd ?
predefinitions rb 1000h

View File

@@ -59,26 +59,29 @@ filepos dd 0x0
; ~5/8 - main memory
init_memory:
mcall 18, 16
cmp eax, 0xFFFFFFFF shr 9
cmp ecx, 0x38000000 shr 9
jbe @f
mov eax, 0xFFFFFFFF shr 9
mov ecx, 0x38000000 shr 9
@@:
shl eax, 9
lea ecx, [eax+stacktop]
mcall 64, 1
mov [memory_start], stacktop
mov [additional_memory_end], ecx
sub ecx, stacktop
shl ecx, 9
mcall 68, 12
mov [memory_start], eax
mov [memblock], eax
push eax
add eax, ecx
mov [additional_memory_end], eax
pop eax
shr ecx, 3
lea ecx, [ecx*5+stacktop]
mov [memory_end],ecx
mov [additional_memory],ecx
add eax, ecx
lea eax, [ecx*4+eax]
mov [memory_end],eax
mov [additional_memory],eax
ret
exit_program:
cmp [_mode],NORMAL_MODE
jne @f
mcall 64, 1, stacktop
mcall 68, 13, [memblock]
jmp still
@@:
or eax,-1