Subversion Repositories Kolibri OS

Rev

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

Rev 7280 Rev 7788
Line 1... Line 1...
1
; application : View3ds ver. 0.068b - tiny .3ds and .asc files viewer
1
; application : View3ds ver. 0.069 - tiny .3ds and .asc files viewer
2
;		with a few graphics effects demonstration.
2
;		with a few graphics effects demonstration.
3
; compiler    : FASM
3
; compiler    : FASM
4
; system      : KolibriOS
4
; system      : KolibriOS
5
; author      : Macgub aka Maciej Guba
5
; author      : Macgub aka Maciej Guba
6
; email       : macgub3@wp.pl
6
; email       : macgub3@wp.pl
Line 3377... Line 3377...
3377
 
3377
 
3378
read_from_disk:
3378
read_from_disk:
3379
if USE_LFN
3379
if USE_LFN
3380
;-
-
 
3381
    mov     eax, 70
-
 
3382
    mov     ebx, file_info
-
 
3383
    mov     dword[ebx], 5	   ;  -> subfunction number
-
 
3384
    int     0x40		   ;  -> read file size
-
 
3385
    mov     ebx, [fptr]
-
 
3386
    mov     ebx, dword[ebx+32]
-
 
3387
    inc     ebx
-
 
3388
    mov     [fsize], ebx
-
 
3389
 
3380
;-
3390
    mov     eax, 68
3381
    mov     eax, 68
3391
    mov     ebx, 11
3382
    mov     ebx, 11
-
 
3383
    int     0x40		   ;  -> init heap
-
 
3384
 
-
 
3385
    ;mov     eax, 70
-
 
3386
    ;mov     ebx, file_info
-
 
3387
    ;mov     dword[ebx], 5	   ;  -> subfunction number
-
 
3388
    ;int     0x40		   ;  -> read file size
-
 
3389
    ;mov     ebx, [fptr]
-
 
3390
    ;mov     ebx, dword[ebx+32]
-
 
3391
    ;inc     ebx
-
 
3392
    ;mov     [fsize], ebx
-
 
3393
 
-
 
3394
    ;mov     eax, 68
-
 
3395
    ;mov     ebx, 12
-
 
3396
    ;mov     ecx, [fsize]
-
 
3397
    ;int     0x40		   ;  -> allocate memory for file
-
 
3398
    ;mov     [fptr], eax 	   ;  -> eax = pointer to allocated mem
-
 
3399
 
-
 
3400
    ;mov     eax, 70
-
 
3401
    ;mov     ebx, file_info
-
 
3402
    ;mov     dword[ebx],0
-
 
3403
    ;int     0x40		   ; -> read file
-
 
3404
	
-
 
3405
    ;mov     [fsize],ebx
-
 
3406
    ;cmp     eax,6
-
 
3407
    ;jnz     @f
-
 
3408
    ;xor     eax,eax	;;;;---
-
 
3409
	
-
 
3410
    ;cmp     eax,6
-
 
3411
    ;jnz     @f
-
 
3412
    ;xor     eax,eax	;;;;---
-
 
3413
 
Line 3392... Line 3414...
3392
    int     0x40		   ;  -> create heap
3414
    ;load kpacked files by Leency
3393
 
3415
 
3394
    mov     eax, 68
3416
	mov     eax,68
3395
    mov     ebx, 12
3417
	mov     ebx,27
3396
    mov     ecx, [fsize]
-
 
Line 3397... Line 3418...
3397
    int     0x40		   ;  -> allocate memory for file
3418
	mov     ecx,I_Param
3398
    mov     [fptr], eax 	   ;  -> eax = pointer to allocated mem
3419
	int     0x40
3399
 
-
 
3400
    mov     eax, 70
-
 
Line 3401... Line 3420...
3401
    mov     ebx, file_info
3420
 
3402
    mov     dword[ebx],0
3421
    mov     [fsize],edx
-
 
3422
	mov     [file_info+16],eax
3403
    int     0x40		   ; -> read file
3423
	
-
 
3424
	test    eax,eax
3404
 
3425
	jnz     .open_opened_well
3405
    mov     [fsize],ebx
3426
	mov     eax,6 ;otherwise => failed
3406
    cmp     eax,6
3427
	jmp     @f
3407
    jnz     @f
3428
	.open_opened_well:
3408
    xor     eax,eax	;;;;---
3429
	xor     eax,eax
3409
  @@:
3430
  @@: