Rev 755 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 755 | Rev 835 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | db '/SYS/DEVELOP/MTDBG',0 |
52 | db '/SYS/DEVELOP/MTDBG',0 |
Line 53... | Line 53... | ||
53 | 53 | ||
54 | _ramdisk db '/RD/1/' |
54 | _ramdisk db '/RD/1/' |
Line 55... | Line -... | ||
55 | filepos dd 0x0 |
- | |
56 | - | ||
57 | ; info by Privalov: starting from FASM 1.51 |
- | |
- | 55 | filepos dd 0x0 |
|
58 | ; ~3/8 - additional memory |
56 | |
59 | ; ~5/8 - main memory |
- | |
60 | init_memory: |
- | |
61 | mcall 18, 16 |
57 | |
62 | cmp ecx, 0x38000000 shr 9 |
58 | init_memory: |
63 | jbe @f |
59 | |
64 | mov ecx, 0x38000000 shr 9 |
60 | mov ecx, 16*1024*1024 |
- | 61 | ||
65 | @@: |
62 | allocate_memory: |
66 | shl ecx, 9 |
- | |
67 | mcall 68, 12 |
- | |
68 | mov [memory_start], eax |
- | |
69 | mov [memblock], eax |
63 | mov [memory_setting],ecx |
70 | push eax |
- | |
71 | add eax, ecx |
- | |
72 | mov [additional_memory_end], eax |
- | |
73 | pop eax |
- | |
74 | shr ecx, 3 |
- | |
75 | add eax, ecx |
64 | mcall 68, 12 |
76 | lea eax, [ecx*4+eax] |
65 | or eax,eax |
- | 66 | jz out_of_memory |
|
- | 67 | mov [additional_memory],eax |
|
- | 68 | add eax,[memory_setting] |
|
- | 69 | mov [memory_end],eax |
|
- | 70 | mov eax,[memory_setting] |
|
- | 71 | shr eax,2 |
|
- | 72 | add eax,[additional_memory] |
|
77 | mov [memory_end],eax |
73 | mov [additional_memory_end],eax |
Line 78... | Line 74... | ||
78 | mov [additional_memory],eax |
74 | mov [memory_start],eax |
79 | ret |
75 | ret |
80 | 76 |