45,6 → 45,21 |
jmp .next |
.str_end: |
|
; ëç¨á«ï¥¬, ᪮«ìª® ¡ ©â 㦮 ¯à¨¡ ¢«ïâì ª ª ¦¤®© áâப¥, |
; ç⮡ë á«¥¤ãîé ï ¡ë« ¢ëà ¢¥ 4 ¡ ©â . |
; ¥§ã«ìâ â ¯®¬¥é ¥¬ ¢ edi. |
xor edx,edx |
movzx eax,word [scr_buf.width] ; eax = è¨à¨ ª à⨪¨ |
lea eax,[eax*3] ; eax = ¡ ©â áâப㠪 à⨪¨ |
movr ebx,4 ; ebx = 4 |
mov edi,ebx ; edi = 4 |
div ebx ; eax = ¡ ©â áâப㠪 à⨪¨ div 4 edx = ¡ ©â... mod 4 |
sub edi,edx ; edi = ª®«¨ç¥á⢮ ¡ ©â |
test edx,edx |
jnz @f |
xor edi,edi |
@@: |
|
; ¢ë¤¥«ï¥¬ ¯ ¬ïâì |
mov ecx,[scr_buf.end_ptr] |
mov [sf_buf.bmp_header],ecx |
52,8 → 67,10 |
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 |
lea ebx,[ebx*3] |
add ecx,ebx |
mov [sf_buf.end],ecx |
add ecx,4096 |
62,6 → 79,7 |
movr eax,64 |
int 0x40 |
|
push edi |
; § ¯®«ï¥¬ áâàãªâãàã ¤«ï á®åà ¥¨ï ä ©« |
mov edi,fs_struc |
mov [edi],dword 2 |
82,37 → 100,58 |
add ebx,0x36 |
mov [edi+2],ebx ; à §¬¥à ä ©« |
mov [edi+14],dword 0x28 |
movsx eax,word [scr_buf.width] |
movzx eax,word [scr_buf.width] |
mov [edi+18],eax ; £®à¨§®â «ìë© à §¬¥à |
movsx eax,word [scr_buf.height] |
movzx eax,word [scr_buf.height] |
mov [edi+22],eax ; ¢¥à⨪«ìë© à §¬¥à |
mov [edi+26],word 1 |
mov [edi+28],word 24 |
|
; ª®¯¨à㥬 ¨ ¯¥à¥¢®à 稢 ¥¬ |
mov esi,[scr_buf.ptr] |
; mov esi,[scr_buf.ptr] |
; mov edi,[sf_buf.bmp_area] |
; mov edx,[sf_buf.end] |
; sub edx,edi |
; movsx ecx,word [scr_buf.height] |
;.next_str: |
;push ecx |
; |
; movsx ecx,word [scr_buf.width] |
; lea ecx,[ecx*3] |
; mov ebx,ecx |
;.next_byte: |
; mov ah,[esi+ebx] |
; mov [edi+edx],ah |
; dec ebx |
; dec edx |
; loop .next_byte |
; movsx ecx,word [scr_buf.width] |
; lea ecx,[ecx*3] |
; add esi,ecx |
;pop ecx |
; loop .next_str |
|
mov esi,[scr_buf.end_ptr] |
mov edi,[sf_buf.bmp_area] |
mov edx,[sf_buf.end] |
sub edx,edi |
movsx ecx,word [scr_buf.height] |
movzx ecx,word [scr_buf.height] |
movzx ebx,word [scr_buf.width] |
lea ebx,[ebx*3] |
add edi,ebx |
.next_str: |
push ecx |
|
movsx ecx,word [scr_buf.width] |
lea ecx,[ecx*3] |
mov ebx,ecx |
.next_byte: |
mov ah,[esi+ebx] |
mov [edi+edx],ah |
dec ebx |
mov edx,ebx |
.next_pixel: |
mov ah,[esi] |
mov [edi],ah |
dec esi |
dec edi |
dec edx |
loop .next_byte |
movsx ecx,word [scr_buf.width] |
lea ecx,[ecx*3] |
add esi,ecx |
pop ecx |
jnz .next_pixel |
lea edi,[2*ebx+edi] |
add edi,[esp] |
loop .next_str |
|
pop edi |
|
; á®åà 塞 |
draw_status saving |
mov eax,70 |
126,6 → 165,7 |
call draw_number |
|
draw_status saved_ok |
|
popa |
ret |
|