Subversion Repositories Kolibri OS

Rev

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

Rev 130 Rev 133
Line 136... Line 136...
136
    jnz    .cleanfailed
136
    jnz    .cleanfailed
137
    cmp    [0x90004],word 'ET'
137
    cmp    [0x90004],word 'ET'
138
    jnz    .cleanfailed
138
    jnz    .cleanfailed
Line 139... Line 139...
139
    
139
    
140
    call   get_app_params        ;parse header fields
-
 
141
    test   esi, esi
140
    call   get_app_params        ;parse header fields
Line 142... Line 141...
142
    jz     .cleanfailed
141
    jc     .cleanfailed
143
    
142
    
144
    mov    eax,[new_process_place]
143
    mov    eax,[new_process_place]
145
    	inc	ecx		; -0x1E = no memory
144
    	inc	ecx		; -0x1E = no memory
Line 318... Line 317...
318
    jnz    .cleanfailed
317
    jnz    .cleanfailed
319
    cmp    [0x90004],word 'ET'
318
    cmp    [0x90004],word 'ET'
320
    jnz    .cleanfailed
319
    jnz    .cleanfailed
Line 321... Line 320...
321
    
320
    
322
    call   get_app_params        ;parse header fields
-
 
323
    test   esi,esi
321
    call   get_app_params        ;parse header fields
Line 324... Line 322...
324
    jz     .cleanfailed
322
    jc     .cleanfailed
325
    
323
    
326
    mov    eax,[new_process_place]
324
    mov    eax,[new_process_place]
327
    inc    ecx		; -0x1E = no memory
325
    inc    ecx		; -0x1E = no memory
Line 1299... Line 1297...
1299
    mov    ecx,512/4
1297
    mov    ecx,512/4
1300
    cld
1298
    cld
1301
    rep    movsd                 ;copy first block to 0x90000 address for get_app_params function
1299
    rep    movsd                 ;copy first block to 0x90000 address for get_app_params function
1302
    call   get_app_params
1300
    call   get_app_params
1303
	mov	ecx, -0x1F	; not Menuet/Kolibri executable
1301
	mov	ecx, -0x1F	; not Menuet/Kolibri executable
1304
    test   esi,esi
-
 
1305
    jz     .cleanfailed
1302
    jc     .cleanfailed
Line 1306... Line 1303...
1306
    
1303
    
1307
    mov    eax,[new_process_place]
1304
    mov    eax,[new_process_place]
1308
	inc	ecx		; -0x1E = no memory
1305
	inc	ecx		; -0x1E = no memory
1309
    call   create_app_cr3_table  ;create page directory
1306
    call   create_app_cr3_table  ;create page directory
Line 1534... Line 1531...
1534
        jnz     .cleanfailed
1531
        jnz     .cleanfailed
1535
        cmp     word [0x90004], 'ET'
1532
        cmp     word [0x90004], 'ET'
1536
        jnz     .cleanfailed
1533
        jnz     .cleanfailed
1537
        call    get_app_params
1534
        call    get_app_params
1538
        mov     ecx, -0x1F
1535
        mov     ecx, -0x1F
-
 
1536
        jc      .cleanfailed
-
 
1537
; sanity check - because we will load all file,
-
 
1538
; file size must be not greater than memory size
1539
        test    esi, esi
1539
        mov     eax, [esp+8+36]
-
 
1540
        cmp     [app_mem], eax
1540
        jz      .cleanfailed
1541
        jb      .cleanfailed
Line 1541... Line 1542...
1541
 
1542
 
1542
        mov     eax, [new_process_place]
1543
        mov     eax, [new_process_place]
1543
        inc     ecx     ; -0x1E = no memory
1544
        inc     ecx     ; -0x1E = no memory
1544
        call    create_app_cr3_table
1545
        call    create_app_cr3_table