Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8013 → Rev 8014

/programs/demos/3DS/VIEW3DS.ASM
312,8 → 312,8
mov [re_alloc_flag],0
end if
mov bl,[generator_flag]
or bl,bl
jz .next_m2
; or bl,bl
; jz .next_m2
cmp bl,1
jne @f
call generate_object
492,7 → 492,7
mov esi,[points_normals_ptr]
mov edi,[points_normals_rot_ptr]
mov ebx,matrix
movzx ecx,[points_count_var]
mov ecx,[points_count_var]
call rotary
 
mov esi,matrix
501,7 → 501,7
mov esi,[points_ptr]
mov edi,[points_rotated_ptr]
mov ebx,matrix
movzx ecx,[points_count_var]
mov ecx,[points_count_var]
call rotary
 
; RDTSC
512,7 → 512,7
 
mov esi,[points_rotated_ptr]
mov edi,[points_translated_ptr]
movzx ecx,[points_count_var]
mov ecx,[points_count_var]
call translate_points
 
; cmp [dr_flag],5
523,9 → 523,9
jne @f
call clrscr ; clear the screen
@@:
cmp [catmull_flag],1 ;non sort if Catmull = on
je .no_sort
call sort_triangles
; cmp [catmull_flag],1 ;non sort if Catmull = on
; je .no_sort
; 64 indexes call sort_triangles
.no_sort:
cmp [dr_flag],7 ; fill if 2tex and texgrd
jge @f
749,15 → 749,15
;--------------------------------------------------------------------------------
;-------------------------PROCEDURES---------------------------------------------
;--------------------------------------------------------------------------------
include "TEX3.INC"
;include "TEX3.INC"
include "FLAT_CAT.INC"
include "TEX_CAT.INC"
include "BUMP_CAT.INC"
include "3DMATH.INC"
include "GRD_LINE.INC"
include "GRD3.INC"
include "FLAT3.INC"
include "BUMP3.INC"
;include "GRD3.INC"
;include "FLAT3.INC"
;include "BUMP3.INC"
include "B_PROCS.INC"
include "A_PROCS.INC"
include "GRD_CAT.INC"
1102,7 → 1102,7
fadd st,st
mov esi,[points_ptr]
mov edi,tex_points
movzx ecx,[points_count_var]
mov ecx,[points_count_var]
inc ecx
; cmp [map_tex_flag],1
; jne .cylindric
1422,16 → 1422,16
@@:
push ebx
mov ebx,vectors
movzx esi,word[ebp] ; first point index
mov esi,dword[ebp] ; first point index
lea esi,[esi*3]
lea esi,[points+esi*2] ; esi - pointer to 1st 3d point
movzx edi,word[ebp+2] ; second point index
movzx edi,dword[ebp+4] ; second point index
lea edi,[edi*3]
lea edi,[points+edi*2] ; edi - pointer to 2nd 3d point
call make_vector
add ebx,12
mov esi,edi
movzx edi,word[ebp+4] ; third point index
movzx edi,dword[ebp+8] ; third point index
lea edi,[edi*3]
lea edi,[points+edi*2]
call make_vector
1442,22 → 1442,23
call cross_product
mov edi,ebx
call normalize_vector
add ebp,6
add ebp,12
add ebx,12
cmp dword[ebp],-1
jne @b
ret
end if
 
init_point_normals:
.x equ dword [ebp-4]
.y equ dword [ebp-8]
.z equ dword [ebp-12]
.point_number equ word [ebp-26]
.hit_faces equ word [ebp-28]
.point_number equ dword [ebp-28]
.hit_faces equ dword [ebp-32]
 
fninit
mov ebp,esp
sub esp,28
sub esp,32
mov edi,[points_normals_ptr]
mov .point_number,0
.ipn_loop:
1470,8 → 1471,8
.ipn_check_face:
xor ebx,ebx ; ebx - 'position' in one triangle
.ipn_check_vertex:
movzx eax,word[esi+ebx] ; eax - point_number
cmp ax,.point_number
mov eax,dword[esi+ebx] ; eax - point_number
cmp eax,.point_number
jne .ipn_next_vertex
push esi
mov esi,ecx
1493,13 → 1494,13
inc .hit_faces
jmp .ipn_next_face
.ipn_next_vertex:
add ebx,2
cmp ebx,6
add ebx,4
cmp ebx,12
jne .ipn_check_vertex
.ipn_next_face:
add esi,6
add esi,12
inc ecx
cmp cx,[triangles_count_var]
cmp ecx,[triangles_count_var]
jne .ipn_check_face
 
fld .x
1514,8 → 1515,8
call normalize_vector
add edi,12 ;type vector 3d
inc .point_number
mov dx,.point_number
cmp dx,[points_count_var]
mov edx,.point_number
cmp edx,[points_count_var]
jne .ipn_loop
 
mov esp,ebp
1525,15 → 1526,17
init_triangles_normals2:
mov ebx,[triangles_normals_ptr]
mov ebp,[triangles_ptr]
mov ecx,[triangles_count_var]
@@:
push ecx
push ebx
mov ebx,vectors
movzx esi,word[ebp] ; first point index
mov esi,dword[ebp] ; first point index
lea esi,[esi*3]
; lea esi,[points+esi*2] ; esi - pointer to 1st 3d point
shl esi,2
add esi,[points_ptr]
movzx edi,word[ebp+2] ; first point index
mov edi,dword[ebp+4] ; first point index
lea edi,[edi*3]
shl edi,2
add edi,[points_ptr]
1543,7 → 1546,7
call make_vector_r
add ebx,12
mov esi,edi
movzx edi,word[ebp+4] ; third point index
mov edi,dword[ebp+8] ; third point index
lea edi,[edi*3]
shl edi,2
add edi,[points_ptr]
1556,13 → 1559,16
call cross_product
mov edi,ebx
call normalize_vector
add ebp,6
add ebp,12
add ebx,12
cmp dword[ebp],-1
jne @b
pop ecx
sub ecx,1
jnz @b
; cmp dword[ebp],-1
; jne @b
ret
if 0 ; ind 64 but
 
 
;=================================================================
sort_triangles:
mov esi,[triangles_ptr]
1873,7 → 1879,7
; end if
movsd ; copy end mark too
ret
 
end if ; 64 ind
clrscr:
mov edi,[screen_ptr]
movzx ecx,word[size_x_var]
1937,28 → 1943,31
 
mov esi,[triangles_ptr]
mov [edges_counter],0
mov ecx,[triangles_count_var]
.again_dts:
push ecx
mov ebp,[points_translated_ptr]
if Ext=NON
movzx eax,word[esi]
mov [point_index1],ax
if Ext >= SSE2
mov eax,dword[esi]
mov [point_index1],eax
lea eax,[eax*3]
add eax,eax
push ebp
add ebp,eax
mov eax,[ebp]
cmp [vertex_edit_no],0
jne @f
 
@@:
; cmp [vertex_edit_no],0
; jne @f
;
; @@:
mov dword[xx1],eax
mov eax,[ebp+4]
mov [zz1],ax
 
pop ebp
 
 
movzx eax,word[esi+2]
mov [point_index2],ax
mov eax,dword[esi+4]
mov [point_index2],eax
lea eax,[eax*3]
add eax,eax
push ebp
1970,8 → 1979,8
pop ebp
 
 
movzx eax,word[esi+4] ; xyz3 = [ebp+[esi+4]*6]
mov [point_index3],ax
mov eax,dword[esi+8] ; xyz3 = [ebp+[esi+4]*6]
mov [point_index3],eax
lea eax,[eax*3]
add eax,eax
; push ebp
1981,19 → 1990,22
mov eax,[ebp+4]
mov [zz3],ax
else
mov eax,dword[esi] ; don't know MMX
mov dword[point_index1],eax
movq mm0,[esi] ; don't know MMX
mov qword[point_index1],mm0
; shr eax,16
; mov [point_index2],ax
mov ax,word[esi+4]
mov [point_index3],ax
movq mm0,[esi]
pmullw mm0,qword[const6]
movd eax,mm0
psrlq mm0,16
movd ebx,mm0
psrlq mm0,16
movd ecx,mm0
mov eax,dword[esi+8]
mov [point_index3],eax
movdqu xmm0,[esi]
paddd xmm0,xmm0
movdqa xmm1,xmm0
paddd xmm0,xmm0
paddd xmm0,xmm1
movd eax,xmm0
psrldq xmm0,4
movd ebx,xmm0
psrldq xmm0,4
movd ecx,xmm0
and eax,0FFFFh
and ebx,0FFFFh
and ecx,0FFFFh
2050,7 → 2062,7
mov esi,point_index1 ; *********************************
mov ecx,3 ;
@@:
movzx eax,word[esi]
mov eax,dword[esi]
lea eax,[eax*3]
shl eax,2
add eax,[points_normals_rot_ptr]
2090,7 → 2102,7
mov esi,point_index3 ; do Gouraud shading
mov ecx,3
.again_grd_draw:
movzx eax,word[esi]
mov eax,dword[esi]
shl eax,2
lea eax,[eax*3]
add eax,[points_normals_rot_ptr]
2111,11 → 2123,11
add eax,ebx
lea eax,[eax*3+color_map]
mov eax,dword[eax]
cmp [catmull_flag],1 ; put on stack z coordinate if necessary
jne @f
; cmp [catmull_flag],1 ; put on stack z coordinate if necessary
; jne @f
lea edx,[ecx*3]
push word[edx*2+xx1-2] ; zz1 ,2 ,3
@@:
; @@:
ror eax,16 ; eax -0xxxrrggbb -> 0xggbbxxrr
xor ah,ah
push ax ;r
2125,7 → 2137,7
shr eax,24
push ax ;b
 
sub esi,2
sub esi,4
dec cx
jnz .again_grd_draw
jmp .both_draw
2179,19 → 2191,19
push eax
neg al
push ax
cmp [catmull_flag],1
jne @f
; cmp [catmull_flag],1
; jne @f
push [zz2]
@@:
; @@:
mov eax,dword[yy2]
and eax,ebx
push eax
neg al
push ax
cmp [catmull_flag],1
jne @f
; cmp [catmull_flag],1
; jne @f
push [zz1]
@@:
; @@:
mov eax,dword[yy1]
and eax,ebx
push eax
2205,21 → 2217,20
mov ecx,dword[xx3]
ror ecx,16
mov edi,[screen_ptr]
cmp [catmull_flag],0
je @f
; lea esi,[Z_buffer]
; cmp [catmull_flag],0
; je @f
mov esi,[Zbuffer_ptr]
call gouraud_triangle_z
; jmp .end_draw
; @@:
; call gouraud_triangle
jmp .end_draw
@@:
call gouraud_triangle
jmp .end_draw
 
.flat_draw: ;**************************
; FLAT DRAWING
movzx eax,[point_index1]
movzx ebx,[point_index2]
movzx ecx,[point_index3]
mov eax,[point_index1]
mov ebx,[point_index2]
mov ecx,[point_index3]
shl eax,2
shl ebx,2
shl ecx,2
2246,7 → 2257,8
mov edx,dword[esp-8]
shl edx,TEX_SHIFT
add edx,dword[esp-4]
lea eax,[3*edx+color_map]
lea eax,[3*edx]
add eax,color_map
mov edx,dword[eax]
 
and edx,0x00ffffff ; edx = 0x00rrggbb
2271,11 → 2283,9
ror ebx,16
mov ecx,dword[xx3]
ror ecx,16
; mov edi,screen
mov edi,[screen_ptr]
cmp [catmull_flag],0
je @f
; lea esi,[Z_buffer]
; cmp [catmull_flag],0
; je @f
mov esi,[Zbuffer_ptr]
push word[zz3]
push word[zz2]
2282,23 → 2292,23
push word[zz1]
call flat_triangle_z
jmp .end_draw
@@:
call draw_triangle
jmp .end_draw
; @@:
; call draw_triangle
; jmp .end_draw
.env_mapping:
; fninit
cmp [catmull_flag],0
je @f
; cmp [catmull_flag],0
; je @f
push [zz3]
push [zz2]
push [zz1]
@@:
; @@:
mov esi,point_index1
sub esp,12
mov edi,esp
mov ecx,3
@@:
movzx eax,word[esi]
mov eax,dword[esi]
lea eax,[eax*3]
shl eax,2
add eax,[points_normals_rot_ptr] ;point_normals_rotated
2327,7 → 2337,7
fistp word[edi+2]
; # end of last ch.
add edi,4
add esi,2
add esi,4
loop @b
 
mov eax,dword[xx1]
2338,30 → 2348,30
ror ecx,16
mov edi,[screen_ptr]
mov esi,envmap
cmp [catmull_flag],0
je @f
; mov edx,Z_buffer
; cmp [catmull_flag],0
; je @f
 
mov edx,[Zbuffer_ptr]
call tex_triangle_z
; jmp .end_draw
; @@:
; call tex_triangle
jmp .end_draw
@@:
call tex_triangle
jmp .end_draw
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.cubic_env_mapping:
; fninit
cmp [catmull_flag],0
je @f
; cmp [catmull_flag],0
; je @f
push [zz3]
push [zz2]
push [zz1]
@@:
; @@:
mov esi,point_index1
sub esp,12
mov edi,esp
mov ecx,3
@@:
movzx eax,word[esi]
mov eax,dword[esi]
lea eax,[eax*3]
shl eax,2
add eax,[points_normals_rot_ptr] ;point_normals_rotated
2390,7 → 2400,7
; fistp word[edi+2]
; # end of last ch.
add edi,4
add esi,2
add esi,4
loop @b
 
mov eax,dword[xx1]
2401,34 → 2411,33
ror ecx,16
mov edi,[screen_ptr]
mov esi,envmap_cub
cmp [catmull_flag],0
je @f
; mov edx,Z_buffer
; cmp [catmull_flag],0
; je @f
mov edx,[Zbuffer_ptr]
call tex_triangle_z
; jmp .end_draw
; @@:
; call tex_triangle
jmp .end_draw
@@:
call tex_triangle
jmp .end_draw
 
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
.bump_mapping:
; fninit
cmp [catmull_flag],0
je @f
; push Z_buffer
; cmp [catmull_flag],0
; je @f
 
push [Zbuffer_ptr]
push [zz3]
push [zz2]
push [zz1]
@@:
; @@:
mov esi,point_index1
sub esp,12
mov edi,esp
mov ecx,3
@@:
movzx eax,word[esi]
mov eax,dword[esi]
lea eax,[eax*3]
shl eax,2
add eax,[points_normals_rot_ptr] ;point_normals_rotated
2444,14 → 2453,14
fistp word[edi+2]
 
add edi,4
add esi,2
add esi,4
loop @b
 
movzx esi,[point_index3] ; bump map coords
mov esi,[point_index3] ; bump map coords
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index2]
mov esi,[point_index2]
shl esi,2
add esi,tex_points
; lea esi,[esi*3]
2458,7 → 2467,7
; lea esi,[points+2+esi*2]
push dword[esi]
; push dword[xx2]
movzx esi,[point_index1]
mov esi,[point_index1]
shl esi,2
add esi,tex_points
; lea esi,[esi*3]
2476,32 → 2485,32
mov esi,envmap
mov edx,bumpmap ;BUMP_MAPPING
 
cmp [catmull_flag],0
je @f
; cmp [catmull_flag],0
; je @f
call bump_triangle_z
; jmp .end_draw
; @@:
; call bump_triangle
jmp .end_draw
@@:
call bump_triangle
jmp .end_draw
 
.tex_mapping:
 
; fninit
cmp [catmull_flag],0
je @f
; cmp [catmull_flag],0
; je @f
push [zz3]
push [zz2]
push [zz1]
@@:
movzx esi,[point_index3] ; tex map coords
; @@:
mov esi,[point_index3] ; tex map coords
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index2]
mov esi,[point_index2]
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index1]
mov esi,[point_index1]
shl esi,2
add esi,tex_points
push dword[esi]
2514,16 → 2523,14
ror ecx,16
mov edi,[screen_ptr]
mov esi,texmap
cmp [catmull_flag],0
je @f
; mov edx,Z_buffer
; cmp [catmull_flag],0
; je @f
mov edx,[Zbuffer_ptr]
call tex_triangle_z
; call tex_plus_grd_trianlgle
; jmp .end_draw
; @@:
; call tex_triangle
jmp .end_draw
@@:
call tex_triangle
jmp .end_draw
; .ray:
; grd_triangle according to points index
; cmp [catmull_flag],0
2564,15 → 2571,15
sub esp,4
push ebp
 
movzx esi,[point_index3] ; tex map coords
mov esi,[point_index3] ; tex map coords
shl esi,2
add esi,tex_points
push dword[esi] ; texture coords as first
movzx esi,[point_index2] ; group of parameters
mov esi,[point_index2] ; group of parameters
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index1]
mov esi,[point_index1]
shl esi,2
add esi,tex_points
push dword[esi]
2585,7 → 2592,7
lea edx,[ecx*3]
push word[edx*2+xx1-2] ; zz1 ,2 ,3
 
movzx eax,word[esi]
mov eax,dword[esi]
shl eax,2
lea eax,[eax*3] ;+point_normals_rotated]
add eax,[points_normals_rot_ptr]
2616,7 → 2623,7
shr eax,24
push ax ;b
 
sub esi,2
sub esi,4
dec cx
jnz .aagain_grd_draw
 
2644,15 → 2651,15
push word[zz2]
push word[zz1]
 
movzx esi,[point_index3] ; tex map coords
mov esi,[point_index3] ; tex map coords
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index2]
mov esi,[point_index2]
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index1]
mov esi,[point_index1]
shl esi,2
add esi,tex_points
push dword[esi]
2662,7 → 2669,7
mov edi,esp
mov ecx,3
@@:
movzx eax,word[esi]
mov eax,dword[esi]
lea eax,[eax*3]
shl eax,2
add eax,[points_normals_rot_ptr]
2678,7 → 2685,7
fistp word[edi+2]
 
add edi,4
add esi,2
add esi,4
loop @b
 
mov eax,dword[xx1]
2695,15 → 2702,15
jmp .end_draw
 
.bump_tex:
movzx esi,[point_index3] ; tex map coords
mov esi,[point_index3] ; tex map coords
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index2]
mov esi,[point_index2]
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index1]
mov esi,[point_index1]
shl esi,2
add esi,tex_points
push dword[esi]
2722,7 → 2729,7
mov edi,esp
mov ecx,3
@@:
movzx eax,word[esi]
mov eax,dword[esi]
lea eax,[eax*3]
shl eax,2
add eax,[points_normals_rot_ptr]
2738,7 → 2745,7
fistp word[edi+2]
 
add edi,4
add esi,2
add esi,4
loop @b
 
; push dword 1 shl 16 + 1 ; emap coords
2745,16 → 2752,16
; push dword 127 shl 16 + 1
; push dword 127 shl 16 + 127
 
movzx esi,[point_index3] ; bump map coords
mov esi,[point_index3] ; bump map coords
shl esi,2
add esi,tex_points
push dword[esi]
movzx esi,[point_index2]
mov esi,[point_index2]
shl esi,2
add esi,tex_points
push dword[esi]
 
movzx esi,[point_index1]
mov esi,[point_index1]
shl esi,2
add esi,tex_points
push dword[esi]
2781,7 → 2788,7
mov esi,point_index3
mov ecx,3
.again_line_param:
movzx eax,word[esi]
mov eax,dword[esi]
shl eax,2
lea eax,[eax*3]
add eax,[points_normals_rot_ptr]
2806,7 → 2813,7
shl ebx,2
mov [ebx+col1],eax
 
sub esi,2
sub esi,4
dec ecx
jnz .again_line_param
 
2918,10 → 2925,12
 
.end_draw:
pop esi
add esi,6
add esi,12
inc [edges_counter]
cmp dword[esi],-1
jne .again_dts
pop ecx
sub ecx,1
; cmp dword[esi],-1
jnz .again_dts
ret
 
 
2930,6 → 2939,10
 
 
 
 
 
 
 
draw_handlers:
 
push ebp
3021,7 → 3034,7
add esi,6
inc dword[.counter]
mov ecx,[.counter]
cmp cx,[points_count_var]
cmp ecx,[points_count_var]
jng .loop
 
mov esp,ebp
3064,8 → 3077,8
; and allocate memory
xor ebx,ebx
xor ebp,ebp
mov [points_count_var],bx
mov [triangles_count_var],bx
mov [points_count_var],ebx
mov [triangles_count_var],ebx
if USE_LFN = 0
mov esi,SourceFile
else
3124,7 → 3137,7
jmp @b
@@:
movzx ecx,word[esi+6]
add [points_count_var],cx
add [points_count_var],ecx
 
mov edx,ecx
add esi,8
3143,7 → 3156,7
jmp @b
@@:
movzx ecx,word[esi+6]
add [triangles_count_var],cx
add [triangles_count_var],ecx
add esi,8
 
@@:
3218,7 → 3231,7
jmp @b
@@:
movzx ecx,word[esi+6]
add [points_count_var],cx
add [points_count_var],ecx
 
mov edx,ecx
add esi,8
3232,12 → 3245,6
push dword[esi+8]
pop dword[edi+ebx*2+8]
pop edi
; fld dword[esi+4]
; fstp dword[real_points+ebx*2+0] ; x
; fld dword[esi+8]
; fstp dword[real_points+ebx*2+4] ; y
; fld dword[esi+0]
; fstp dword[real_points+ebx*2+8] ; z
 
add ebx,6
add esi,12
3256,16 → 3263,20
jmp @b
@@:
movzx ecx,word[esi+6]
add [triangles_count_var],cx
add [triangles_count_var],ecx
add esi,8
;mov edi,triangles
@@:
movsd
movsw
add word[edi-6],bp
add word[edi-4],bp
add word[edi-2],bp
add esi,2
movzx eax,word[esi]
stosd
movzx eax,word[esi+2]
stosd
movzx eax,word[esi+4]
stosd
add dword[edi-12],ebp
add dword[edi-8],ebp
add dword[edi-4],ebp
add esi,8
dec ecx
jnz @b
add ebp,edx
3286,10 → 3297,10
mov ebx,20
.alloc:
 
movzx ecx, [triangles_count_var]
inc ecx
mov ecx,[triangles_count_var]
add ecx,20
lea ecx, [ecx*3]
add ecx, ecx
shl ecx,2
mov edx,[triangles_ptr]
int 0x40 ; -> allocate memory to triangles
mov [triangles_ptr], eax ; -> eax = pointer to allocated mem
3319,7 → 3330,7
; ststic memory
 
mov eax, 68
movzx ecx, [triangles_count_var]
mov ecx, [triangles_count_var]
lea ecx, [3+ecx*3]
shl ecx, 2
mov edx,[triangles_normals_ptr]
3334,7 → 3345,7
; mov dword[vertices_index_ptr], eax
 
mov eax, 68
movzx ecx, [points_count_var]
mov ecx, [points_count_var]
lea ecx,[3+ecx*3]
shl ecx, 2
mov edx,[points_normals_ptr]
3348,7 → 3359,7
 
mov eax, 68
; mov ebx, 12
movzx ecx, [points_count_var]
mov ecx, [points_count_var]
lea ecx,[3+ecx*3]
shl ecx, 2
mov edx,[points_normals_rot_ptr]
3366,7 → 3377,7
mov [points_rotated_ptr], eax
 
mov eax, 68
movzx ecx, [points_count_var]
mov ecx, [points_count_var]
inc ecx
shl ecx, 3
mov edx,[points_translated_ptr]
3381,7 → 3392,7
;-
mov eax, 68
mov ebx, 11
int 0x40 ; -> init heap
int 0x40 ; -> create heap
 
;mov eax, 70
;mov ebx, file_info
3392,6 → 3403,8
;inc ebx
;mov [fsize], ebx
 
 
 
;mov eax, 68
;mov ebx, 12
;mov ecx, [fsize]
3402,21 → 3415,10
;mov ebx, file_info
;mov dword[ebx],0
;int 0x40 ; -> read file
;mov [fsize],ebx
;cmp eax,6
;jnz @f
;xor eax,eax ;;;;---
;cmp eax,6
;jnz @f
;xor eax,eax ;;;;---
 
;load kpacked files by Leency
 
mov eax,68
mov ebx,27
mov ecx,I_Param
mov ecx,file_name
int 0x40
 
mov [fsize],edx
3454,6 → 3456,8
end if
; eax = 0 -> ok file loaded
ret
; eax = 0 -> ok file loaded
ret
read_param:
mov esi,I_Param
cmp dword[esi],0