Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 754 → Rev 755

/programs/develop/fasm/trunk/fasm.asm
43,6 → 43,11
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
buffer_address dd ?
memory_setting dd ?
start_time dd ?
memblock dd ?
 
predefinitions rb 1000h
 
/programs/develop/fasm/trunk/system.inc
59,26 → 59,29
; ~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