Subversion Repositories Kolibri OS

Rev

Rev 542 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 542 Rev 635
Line 56... Line 56...
56
 
56
 
57
; info by Privalov: starting from FASM 1.51
57
; info by Privalov: starting from FASM 1.51
58
;   ~3/8 - additional memory
58
;   ~3/8 - additional memory
59
;   ~5/8 - main memory
59
;   ~5/8 - main memory
-
 
60
init_memory:
-
 
61
	mcall	18, 16
-
 
62
	cmp	eax, 0xFFFFFFFF shr 9
-
 
63
	jbe	@f
-
 
64
	mov	eax, 0xFFFFFFFF shr 9
-
 
65
@@:
-
 
66
	shl	eax, 9
-
 
67
	lea	ecx, [eax+stacktop]
60
init_memory:
68
	mcall	64, 1
61
	mov	[memory_start],0x100000
69
	mov	[memory_start], stacktop
-
 
70
	mov	[additional_memory_end], ecx
-
 
71
	sub	ecx, stacktop
-
 
72
	shr	ecx, 3
62
	mov	[memory_end],0x100000+(APP_MEMORY-0x100000)/8*5
73
	lea	ecx, [ecx*5+stacktop]
63
	mov	[additional_memory],0x100000+(APP_MEMORY-0x100000)/8*5
74
	mov	[memory_end],ecx
64
	mov	[additional_memory_end],APP_MEMORY
75
	mov	[additional_memory],ecx
Line 65... Line 76...
65
	ret
76
	ret
66
 
77
 
-
 
78
exit_program:
-
 
79
	cmp	[_mode],NORMAL_MODE
67
exit_program:
80
	jne	@f
-
 
81
	mcall	64, 1, stacktop
68
	cmp	[_mode],NORMAL_MODE
82
	jmp	still
69
	je	still
83
@@:
Line 70... Line 84...
70
	or	eax,-1
84
	or	eax,-1
71
	mcall
85
	mcall