2006-11-02 15:18:23 +01:00
|
|
|
|
save_file:
|
|
|
|
|
pusha
|
2009-06-01 20:25:07 +02:00
|
|
|
|
bt dword [flags],0
|
|
|
|
|
jnc .not_shooted
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
2010-09-08 13:39:41 +02:00
|
|
|
|
cmp byte [fname_buf],0
|
2009-06-01 20:25:07 +02:00
|
|
|
|
je .no_file_name
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov edi,sign_n_input
|
|
|
|
|
call zstr_to_int
|
|
|
|
|
mov [sign_n],al
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ecx,1056
|
|
|
|
|
mov edi,file_name
|
|
|
|
|
rep stosb ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD>ﬨ
|
2006-11-02 15:18:23 +01:00
|
|
|
|
|
2010-09-08 13:39:41 +02:00
|
|
|
|
mov esi,fname_buf
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov edi,file_name
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.next:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov ah,[esi]
|
|
|
|
|
test ah,ah
|
|
|
|
|
jz .str_end
|
|
|
|
|
cmp ah,'*'
|
|
|
|
|
jne .no_insert_number
|
|
|
|
|
jmp .insert_number
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.no_insert_number:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
mov [edi],ah
|
|
|
|
|
inc edi
|
|
|
|
|
inc esi
|
|
|
|
|
jmp .next
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.insert_number:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
bt word [ch6.flags],1
|
|
|
|
|
jnc @f
|
|
|
|
|
mov eax,[cur_number]
|
|
|
|
|
;mov ebx,4
|
|
|
|
|
movsx ebx,byte [sign_n]
|
|
|
|
|
push ebx
|
|
|
|
|
call int_to_str
|
|
|
|
|
pop ebx
|
|
|
|
|
add edi,ebx
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
inc esi
|
|
|
|
|
jmp .next
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.str_end:
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
;;;;clean memory
|
|
|
|
|
|
|
|
|
|
mov ecx,dword [sf_buf.bmp_header]
|
|
|
|
|
mov ebx,13
|
|
|
|
|
mov eax,68
|
|
|
|
|
mcall
|
|
|
|
|
|
2007-02-01 10:46:48 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞, <EFBFBD>쪮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㦭<EFBFBD> <EFBFBD>ਡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>,
|
|
|
|
|
; <EFBFBD>⮡<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뫠 <EFBFBD><EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <EFBFBD> edi.
|
2009-06-01 20:25:07 +02:00
|
|
|
|
|
|
|
|
|
xor edx,edx
|
|
|
|
|
movzx eax,word [scr_buf.width] ; eax = <EFBFBD><EFBFBD>ਭ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD>
|
|
|
|
|
lea eax,[eax*3] ; eax = <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,4 ; ebx = 4
|
|
|
|
|
mov edi,ebx ; edi = 4
|
|
|
|
|
div ebx ; eax = <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD> div 4 edx = <EFBFBD><EFBFBD><EFBFBD><EFBFBD>... mod 4
|
|
|
|
|
sub edi,edx ; edi = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
test edx,edx
|
|
|
|
|
jnz @f
|
|
|
|
|
xor edi,edi
|
2007-02-01 10:46:48 +01:00
|
|
|
|
@@:
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
; <EFBFBD>뤥<EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; mov ecx,[scr_buf.end_ptr]
|
|
|
|
|
; mov [sf_buf.bmp_header],ecx
|
|
|
|
|
|
|
|
|
|
; add ecx,0x36
|
|
|
|
|
; mov [sf_buf.bmp_area],ecx
|
|
|
|
|
movsx ebx,word [scr_buf.width]
|
|
|
|
|
movsx edx,word [scr_buf.height]
|
|
|
|
|
;imul ebx,edx
|
|
|
|
|
lea ebx,[ebx*3]
|
|
|
|
|
add ebx,edi
|
|
|
|
|
imul ebx,edx
|
|
|
|
|
mov ecx,ebx
|
|
|
|
|
|
|
|
|
|
; mov [sf_buf.end],ecx
|
|
|
|
|
add ecx,0x36
|
|
|
|
|
mov ebx,12
|
|
|
|
|
mov eax,68
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
mov [sf_buf.bmp_header],eax
|
|
|
|
|
add eax,0x36
|
|
|
|
|
mov [sf_buf.bmp_area],eax
|
|
|
|
|
add eax,ecx
|
|
|
|
|
sub eax,0x36
|
|
|
|
|
mov [sf_buf.end],eax
|
|
|
|
|
|
|
|
|
|
; push edi
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
mov ebp,fs_struc
|
|
|
|
|
mov [ebp],dword 2
|
|
|
|
|
|
|
|
|
|
mov eax,[sf_buf.bmp_header]
|
|
|
|
|
mov ebx,[sf_buf.end]
|
|
|
|
|
sub ebx,eax
|
|
|
|
|
mov [ebp+12],ebx
|
|
|
|
|
mov [ebp+16],eax
|
|
|
|
|
mov [ebp+21],dword file_name
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bmp
|
|
|
|
|
mov ebp,[sf_buf.bmp_header]
|
|
|
|
|
mov [ebp],word 'BM'
|
|
|
|
|
mov ebx,[sf_buf.end]
|
|
|
|
|
sub ebx,[sf_buf.bmp_area]
|
|
|
|
|
mov [ebp+34],ebx ; ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD>
|
|
|
|
|
mov [ebp+10],dword 0x36 ; ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
add ebx,0x36
|
|
|
|
|
mov [ebp+2],ebx ; ࠧ<EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
mov [ebp+14],dword 0x28
|
|
|
|
|
movzx eax,word [scr_buf.width]
|
|
|
|
|
mov [ebp+18],eax ; <EFBFBD><EFBFBD>ਧ<EFBFBD><EFBFBD>⠫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
movzx eax,word [scr_buf.height]
|
|
|
|
|
mov [ebp+22],eax ; <EFBFBD><EFBFBD><EFBFBD>⨪<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [ebp+26],word 1
|
|
|
|
|
mov [ebp+28],word 24
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD>࠭塞
|
|
|
|
|
mov esi,[scr_buf.ptr]
|
|
|
|
|
mov edi,[sf_buf.end]
|
|
|
|
|
movzx edx,word [scr_buf.height]
|
|
|
|
|
movzx ebx,word [scr_buf.width]
|
|
|
|
|
lea ebx,[ebx*3]
|
2013-04-05 20:56:25 +02:00
|
|
|
|
mov ecx,ebx
|
2009-06-01 20:25:07 +02:00
|
|
|
|
|
|
|
|
|
test ebx,11b
|
|
|
|
|
jz @f
|
|
|
|
|
shr ebx,2
|
|
|
|
|
inc ebx
|
|
|
|
|
shl ebx,2
|
|
|
|
|
@@:
|
2013-04-05 20:56:25 +02:00
|
|
|
|
mov eax,ebx
|
|
|
|
|
sub eax,ecx
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cld
|
|
|
|
|
align 4
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.next_str:
|
2013-04-05 20:56:25 +02:00
|
|
|
|
sub edi,ebx
|
|
|
|
|
mov ecx,ebx
|
|
|
|
|
shr ecx,2
|
|
|
|
|
rep movsd
|
|
|
|
|
sub edi,ebx
|
|
|
|
|
sub esi,eax
|
|
|
|
|
dec edx
|
|
|
|
|
jnz .next_str
|
2009-06-01 20:25:07 +02:00
|
|
|
|
|
|
|
|
|
draw_status saving
|
|
|
|
|
mov eax,70
|
|
|
|
|
mov ebx,fs_struc
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
test eax,eax
|
|
|
|
|
jne save_error
|
|
|
|
|
|
|
|
|
|
inc dword [cur_number]
|
|
|
|
|
call draw_number
|
|
|
|
|
|
|
|
|
|
draw_status saved_ok
|
2007-02-01 10:46:48 +01:00
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.no_file_name:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
draw_status no_file_name
|
2006-11-02 15:18:23 +01:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.not_shooted:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
draw_status not_shooted
|
2006-11-02 15:18:23 +01:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
save_error:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp al,5
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword bad_file_name
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp al,8
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword disk_filled
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp al,9
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword bad_fat_table
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp al,10
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword ac_den
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
|
|
|
|
|
2009-06-01 20:25:07 +02:00
|
|
|
|
cmp al,11
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword device_er
|
2006-11-02 15:18:23 +01:00
|
|
|
|
@@:
|
2009-06-01 20:25:07 +02:00
|
|
|
|
call send_draw_status
|
2006-11-02 15:18:23 +01:00
|
|
|
|
popa
|
|
|
|
|
ret
|