1

otoz mam problem z tym formatem
po przekopaniu wszystkiego co moglem znalesc na ten temat (czytaj jednego loadera i przemyslen wlasnych na temat formatu pliku) napisalem swoj loader, ale...
ktos moze dostarczyc wiecej informacji?
kod jest pisany x86 i atarowska odmiana iff to jedna z wielu jaka ciagnie loader...
z amigowym ham i ham8 nie bylo takich problemow :(

przechodze na tumiwisizm

2

chcesz opis formatu IFF ?

*- TeBe/Madteam
3x Atari 130XE, SDX, CPU 65816, 2x VBXE, 2x IDE Plus rev. C

3

a masz dla atari st?
bo to niestety nie to samo co dla lamigi
delux paint pod stekiem generowal format ktory tylko nazywal sie iff

przechodze na tumiwisizm

4

program loadiff;
uses crt,dos;

var  wsp:longint;
     g:file;
     buf:array [0..4095] of byte;
     color,szer,q,l,i,x,y,px,py,err,ofs:integer;

     id:array [0..3] of char;
     size,lop:word;
     tmp,mask:byte;
     bajt,pix:shortint;
     xx:char;

     bmhd:record
                w,h,x,y:word;
                nplanes:byte;
                masking:byte;
                compression:byte;
                pad1:byte;
                trclr:word;
                xaspect,yaspect:byte;
                pwidth,pheight:word;
                end;

     cmap:array [0..767] of byte;
     tmsk:array [0..7] of byte;
     tpixle:array [0..7] of byte;

procedure bit(b1,b2,b3,b4,b5,b6,b7,b8:byte);
var mask,b0:byte;
begin

for l:=0 to 7 do begin
  mask:=tmsk[l]; b0:=0;
 if (b1 and mask)>0 then b0:=b0 or 1;
 if (b2 and mask)>0 then b0:=b0 or 2;
 if (b3 and mask)>0 then b0:=b0 or 4;
 if (b4 and mask)>0 then b0:=b0 or 8;

if bmhd.nplanes<>4 then begin
 if (b5 and mask)>0 then b0:=b0 or 16;
 if (b6 and mask)>0 then b0:=b0 or 32;
 if (b7 and mask)>0 then b0:=b0 or 64;
 if (b8 and mask)>0 then b0:=b0 or 128;
end;

 tpixle[l]:=b0;
end;
end;

function mos(t:word):word;
begin
mos:=(t mod 256)*256+t div 256;
end;

procedure get;
begin
blockread(g,bajt,1,err);move(bajt,tmp,1);
end;

procedure _getid;
begin
blockread(g,id,sizeof(id),err);
end;
procedure getid;
begin
_getid;
blockread(g,buf,4,err);
size:=buf[3]+buf[2]*256+buf[1]*65536;
end;

procedure vga_off;
begin
asm
   mov ax,3;
   int $10;
end;
end;

procedure bitplan;
begin
ofs:=szer div bmhd.nplanes; px:=0;
for i:=0 to ofs-1 do begin
bit(buf[i],buf[ofs+i],buf[2*ofs+i],buf[3*ofs+i],buf[4*ofs+i],buf[5*ofs+i],buf[6*ofs+i],buf[7*ofs+i]);

 for q:=0 to 7 do begin
   mem[$a000:px+y*320]:=tpixle[q];px:=px+1;
 end;
end;

fillchar(buf,sizeof(buf),0); x:=0; y:=y+1;
end;

procedure pixel(col:byte);
begin
buf[x]:=col; x:=x+1;
end;

procedure iff(name:string);
var q,e,r:integer;
begin

clrscr;
 assign(g,name);reset(g,1);

 getid;_getid;
 if id<>'ILBM' then begin write('Not IFF.');halt; end;

while id<>'BODY' do begin
 getid;
 if id='BMHD' then blockread(g,bmhd,size,err);
 if id='CMAP' then begin color:=size; blockread(g,cmap,size,err);end;
end;

bmhd.w:=mos(bmhd.w); szer:=bmhd.w;
bmhd.h:=mos(bmhd.h);
if (bmhd.w mod bmhd.nplanes)<>0 then szer:=((bmhd.w div bmhd.nplanes)+1)*bmhd.nplanes;
if bmhd.nplanes=4 then bmhd.w:=szer div 2;

writeln('Width x Height:  ',bmhd.w,' x ',bmhd.h);
{write(id,' ', bmhd.nplanes);halt;}

repeat until keypressed;

x:=0; y:=0; py:=bmhd.h; fillchar(buf,sizeof(buf),0);

 asm
    mov ax,$13;
    int $10;
 end;

 port[$3c8]:=0; for i:=0 to color-1 do port[$3c9]:=cmap[i] shr 2;

{ D E K O M P R E S J A }

while y<py do begin
 get;

if bajt<0 then begin pix:=abs(bajt)+1; get;
    for i:=1 to pix do begin pixel(bajt);end;
end
   else begin
   pix:=bajt+1;
    for i:=1 to pix do begin get;pixel(bajt);end;
end;
if (x>bmhd.w-1) then bitplan;
end;

close(g);
end;

begin
tmsk[0]:=$80;
tmsk[1]:=$40;
tmsk[2]:=$20;
tmsk[3]:=$10;
tmsk[4]:=$8;
tmsk[5]:=$4;
tmsk[6]:=$2;
tmsk[7]:=$1;

iff('akt.iff');

xx:=readkey;
repeat until keypressed;

vga_off;

end.

[ Dodano: Sob Mar 12, 2005 8:37 am ]
iff zapisuje dane pod konkretny model wyswietlania obrazu, Amiga i ST nie maja identycznych ukladow GFX

*- TeBe/Madteam
3x Atari 130XE, SDX, CPU 65816, 2x VBXE, 2x IDE Plus rev. C

5

nie mam pod reka ani tp ani fpc :(
cos sobie sciagne i przetestuje to twoje cudo
szczerze mowiac wyglada nieco za prosto
tak wyglada caly loader do iff'ow masci wszelakiej:

.data
LBM_Handle    dd    0
LBM_Size    dd    0
LBM_Width    dd    0
LBM_Height    dd    0
LBM_Palette    dd    0
LBM_nPlanes    dd    0
LBM_PixelSize    dd    0
LBM_Output    dd    0
LBM_Flag    dd    0
LBM_CallBack    dd    0
LBM_ColorCount    dd    0
;------------------------ end of common
LBM_Output2    dd    0
LBM_Masking    dd    0
LBM_Compression    dd    0
LBM_RLE_Data    dd    0
LBM_BitStream    dd    0
LBM_ILBM    dd    0
LBM_HAM        dd    0
LBM_EHB        dd    0
LBM_Atari    dd    0
LBM_BitPlanSize    dd    0
.code
;-------------------------------------------------------------------
align    4
Load_HAM:    mov    LBM_HAM,1
Load_LBM:    call    Load_File
        jc    Load_LBM_Unknow
        mov    LBM_Handle,eax
        mov    LBM_Size,ecx
        mov    esi,LBM_Handle
        mov    eax,[esi]
        cmp    eax,'MROF'
        jne    Load_GIF_Unknow
Load_LBM_l1:    mov    eax,[esi]
        cmp    eax,'DHMB'
        je    Load_LBM_BMHD_Found
        inc    esi
        jmp    Load_LBM_l1
Load_LBM_BMHD_Found:
        add    esi,4
        mov    ebx,[esi]
        bswap    ebx
        movzx    eax,Word ptr [esi+4]
        xchg    al,ah
        inc    eax
        and    eax,-2
        mov    LBM_Width,eax
        movzx    eax,Word ptr [esi+6]
        xchg    al,ah
        mov    LBM_Height,eax
        movzx    eax,Byte ptr [esi+12]
        mov    LBM_nPlanes,eax
        movzx    eax,Byte ptr [esi+13]
        mov    LBM_Masking,eax
        movzx    eax,Byte ptr [esi+14]
        mov    LBM_Compression,eax
        add    esi,ebx
        cmp    LBM_nPlanes,24
        je    Load_LBM_TrueColor
        cmp    LBM_nPlanes,32
        je    Load_LBM_TrueColor
Load_LBM_l2:    mov    eax,[esi]
        cmp    eax,'PAMC'
        je    Load_LBM_CMAP_Found
        inc    esi
        jmp    Load_LBM_l2
Load_LBM_CMAP_Found:
        add    esi,4
        mov    ebx,[esi]
        bswap    ebx
        mov    eax,ebx
        xor    edx,edx
        mov    ecx,3
        div    ecx
        mov    LBM_ColorCount,eax
        lea    eax,[esi+4]
        mov    LBM_Palette,eax
        add    esi,ebx
Load_LBM_TrueColor:
        mov    LBM_HAM,0
        mov    ebp,LBM_Handle
        add    ebp,LBM_Size
Load_LBM_l3:    mov    eax,[esi]
        cmp    eax,'GMAC'
        je    Load_LBM_CAMG_Found
        inc    esi
        cmp    esi,ebp
        jb    Load_LBM_l3
        mov    esi,LBM_Handle
        jmp    Load_LBM_l4
Load_LBM_CAMG_Found:
        mov    eax,[esi+8]
        bswap    eax
        and    eax,880h
        je    Load_LBM_l4
        test    eax,800h
        je    Load_LBM_NoHAM
        mov    LBM_HAM,1
Load_LBM_NoHAM:    test    eax,80h
        je    Load_LBM_NoEHB
        mov    LBM_EHB,1
Load_LBM_NoEHB:    mov    esi,LBM_Handle
Load_LBM_l4:    mov    eax,[esi]
        cmp    eax,'YDOB'
        je    Load_LBM_BODY_Found
        inc    esi
        jmp    Load_LBM_l4
Load_LBM_BODY_Found:
        add    esi,8
        mov    LBM_RLE_Data,esi
        mov    esi,LBM_Handle
        add    esi,4
        mov    LBM_ILBM,0
Load_LBM_l5:    mov    eax,[esi]
        cmp    eax,'MBLI'
        je    Load_LBM_ILBM_Found
        inc    esi
        cmp    eax,'DHMB'
        jne    Load_LBM_l5
        dec    LBM_ILBM
Load_LBM_ILBM_Found:
        inc    LBM_ILBM
        call    Decode_LBM
        call    Translate_BitPlanes
        cmp    LBM_HAM,1
        jne    Load_LBM_NoHAM2
        call    Decode_HAM
Load_LBM_NoHAM2:
        cmp    LBM_EHB,1
        jne    Load_LBM_End
        call    Decode_EHB
Load_LBM_End:    mov    LBM_HAM,0
        mov    LBM_EHB,0
        clc
        ret
Load_LBM_Unknow:
        mov    LBM_HAM,0
        mov    LBM_EHB,0
        stc
        ret
;-------------------------------------------------------------------
align    4
Decode_LBM:    mov    eax,LBM_Width
        add    eax,7
        shr    eax,3
        test    eax,1
        je    Decode_LBM_WidthPadded
        inc    eax
Decode_LBM_WidthPadded:
        mov    ebx,LBM_nPlanes
        cmp    LBM_Masking,1
        jne    Decode_LBM_NoMask
        inc    ebx
Decode_LBM_NoMask:
        xor    edx,edx
        mul    ebx
        mov    ebx,LBM_Height
        xor    edx,edx
        mul    ebx
        push    eax
        shl    eax,1
        push    eax
        mov    eax,LBM_Width
        mov    ebx,LBM_Height
        xor    edx,edx
        mul    ebx
        mov    ebx,LBM_nPlanes
        shr    ebx,3
        or    ebx,ebx
        jne    Decode_LBM_8bit
        inc    ebx
Decode_LBM_8bit:
        mov    LBM_PixelSize,ebx
        xor    edx,edx
        mul    ebx
        push    eax
        push    L GMEM_FIXED or GMEM_ZEROINIT
        call    LocalAlloc
        mov    LBM_Output,eax
        push    L GMEM_FIXED or GMEM_ZEROINIT
        call    LocalAlloc
        mov    LBM_Output2,eax
        mov    edi,eax
        pop    edx
        cmp    LBM_Compression,0
        je    Decode_LBM_Normal
        mov    esi,LBM_RLE_Data
        mov    eax,[esi]
        cmp    eax,'TADV'
        jne    Decode_LBM_Amiga
        mov    LBM_Atari,1
        jmp    Decode_LBM_Atari
Decode_LBM_Amiga:
        cmp    LBM_ILBM,0
        je    Decode_LBM_DP2e_l1
        mov    edx,LBM_Height
Decode_LBM_l1:    push    edx
        mov    edx,LBM_nPlanes
        cmp    LBM_Masking,1
        jne    Decode_LBM_l2
        inc    edx
Decode_LBM_l2:    push    edx
        mov    edx,LBM_Width
        add    edx,7
        shr    edx,3
        test    edx,1
        je    Decode_LBM_l3
        inc    edx
Decode_LBM_l3:    mov    al,[esi]
        cmp    al,-128
        je    Decode_LBM_NOP
        or    al,al
        js    Decode_LBM_rep
        movsx    ecx,al
        inc    ecx
        sub    edx,ecx
        inc    esi
        rep    movsb
        or    edx,edx
        jne    Decode_LBM_l3
        pop    edx
        dec    edx
        jne    Decode_LBM_l2
        pop    edx
        dec    edx
        jne    Decode_LBM_l1
        ret
Decode_LBM_rep:    inc    esi
        movsx    ecx,al
        neg    ecx
        inc    ecx
        sub    edx,ecx
        mov    al,[esi]
        rep    stosb
        inc    esi
        or    edx,edx
        jne    Decode_LBM_l3
        pop    edx
        dec    edx
        jne    Decode_LBM_l2
        pop    edx
        dec    edx
        jne    Decode_LBM_l1
        ret
Decode_LBM_NOP:    inc    esi
        jmp    Decode_LBM_l3

Decode_LBM_DP2e_l1:
        mov    al,[esi]
        cmp    al,-128
        je    Decode_LBM_DP2e_NOP
        or    al,al
        js    Decode_LBM_DP2e_rep
        movsx    ecx,al
        inc    ecx
        sub    edx,ecx
        inc    esi
        rep    movsb
        or    edx,edx
        js    Decode_LBM_DP2e_err
        jne    Decode_LBM_DP2e_l1
Decode_LBM_DP2e_err:
        ret
Decode_LBM_DP2e_rep:
        inc    esi
        movsx    ecx,al
        neg    ecx
        inc    ecx
        sub    edx,ecx
        mov    al,[esi]
        rep    stosb
        inc    esi
        or    edx,edx
        js    Decode_LBM_DP2e_err
        jne    Decode_LBM_DP2e_l1
        ret
Decode_LBM_DP2e_NOP:
        inc    esi
        jmp    Decode_LBM_DP2e_l1

Decode_LBM_Normal:
        cld
        mov    ecx,edx
        mov    esi,LBM_RLE_Data
        rep    movsb
        ret

Decode_LBM_Atari:
        xor    edx,edx
        mov    eax,LBM_Width
        shr    eax,3
        mul    LBM_Height
        mov    LBM_BitPlanSize,eax
        mov    ecx,LBM_nPlanes
Decode_LBM_Atari_l1:
        push    ecx
        push    edi
        push    esi
        add    esi,8
        movzx    eax,Word ptr [esi]
        xchg    al,ah
        lea    ebp,[esi+eax]
        sub    eax,3
        add    esi,2
        mov    ecx,eax
Decode_LBM_Atari_l2:
        push    ecx
        movsx    ecx,Byte ptr[esi]
        or    ecx,ecx
        je    Decode_LBM_Atari_NOP
        js    Decode_LBM_Atari_Normal
        cmp    ecx,1
        je    Decode_LBM_Atari_RunLenght
        mov    ax,ds:[ebp]
        rep    stosw
        add    ebp,2
        inc    esi
        pop    ecx
        dec    ecx
        jne    Decode_LBM_Atari_l2
        jmp    Decode_LBM_Atari_LoopClose

Decode_LBM_Atari_RunLenght:
        movzx    ecx,Word ptr ds:[ebp]
        xchg    cl,ch
        mov    ax,ds:[ebp+2]
        rep    stosw
        pop    ecx
        add    ebp,4
        inc    esi
        dec    ecx
        jne    Decode_LBM_Atari_l2
        jmp    Decode_LBM_Atari_LoopClose

Decode_LBM_Atari_Normal:
        neg    ecx
        push    esi
        mov    esi,ebp
        rep    movsw
        mov    ebp,esi
        pop    esi
        inc    esi
        pop    ecx
        dec    ecx
        jne    Decode_LBM_Atari_l2
        jmp    Decode_LBM_Atari_LoopClose

Decode_LBM_Atari_NOP:
        inc    esi
        pop    ecx
        dec    ecx
        jne    Decode_LBM_Atari_l2
        jmp    Decode_LBM_Atari_LoopClose
        
Decode_LBM_Atari_LoopClose:
        pop    esi
        mov    eax,[esi+4]
        bswap    eax
        add    esi,8
        add    esi,eax
        cmp    esi,ebp
        je    Decode_LBM_Atari_ok1
        push    esi
        mov    ecx,esi
        sub    ecx,ebp
        js    Decode_LBM_Atari_ok1
        shr    ecx,1
        mov    ebp,esi
        rep    movsw
        pop    esi
Decode_LBM_Atari_ok1:
        pop    edi
        add    edi,LBM_BitPlanSize
        pop    ecx
        dec    ecx
        jne    Decode_LBM_Atari_l1
        clc
        ret

;-------------------------------------------------------------------
align    4
Translate_BitPlanes:
        mov    esi,LBM_Output2
        mov    edi,LBM_Output
        cmp    LBM_ILBM,1
        jne    Translate_NoBitPlanes
        cmp    LBM_Atari,1
        je    Translate_Atari
        mov    edx,LBM_Height
Translate_BitPlanes_l0:
        mov    ebx,0
        push    edx
Translate_BitPlanes_l1:
        mov    edx,LBM_Width
        mov    LBM_BitStream,0
        push    edi
Translate_BitPlanes_l2:
        xor    eax,eax
        call    LBM_GetBit
        mov    ebp,[edi]
        rcl    eax,1
        mov    cl,bl
        shl    eax,cl
        or    ebp,eax
        mov    [edi],ebp
        add    edi,LBM_PixelSize
        dec    edx
        jne    Translate_BitPlanes_l2
        pop    edi
        mov    eax,LBM_BitStream
        add    eax,7
        shr    eax,3
        test    eax,1
        je    Translate_BitPlanes_Padded
        inc    eax
Translate_BitPlanes_Padded:
        add    esi,eax
        inc    ebx
        cmp    ebx,LBM_nPlanes
        jb    Translate_BitPlanes_l1
        push    eax
        xor    edx,edx
        mov    eax,LBM_Width
        mov    ebx,LBM_PixelSize
        mul    ebx
        add    edi,eax
        pop    eax
        cmp    LBM_Masking,1
        jne    Translate_BitPlanes_nomask
        add    esi,eax
Translate_BitPlanes_nomask:
        pop    edx
        dec    edx
        jne    Translate_BitPlanes_l0
        push    LBM_Output2
        call    LocalFree
        mov    edi,LBM_Output
        ret

Translate_NoBitPlanes:
        mov    eax,LBM_Width
        mov    ebx,LBM_Height
        xor    edx,edx
        mul    ebx
        mov    ecx,eax
        rep    movsb
        push    LBM_Output2
        call    LocalFree
        mov    edi,LBM_Output
        ret

Translate_Atari:
        xor    edx,edx
        mov    eax,LBM_Width
        shr    eax,4
        mul    LBM_Height
        mov    ebp,eax
        mov    edx,LBM_nPlanes
        mov    esi,LBM_Output2
        mov    edi,LBM_Output
Translate_Atari_l1:
        mov    ecx,LBM_Width
        shr    ecx,4
        push    edi
Translate_Atari_l2:
        push    ecx
        mov    ecx,LBM_Height
        push    edi
Translate_Atari_l3:
        push    ecx
        movzx    eax,Word ptr [esi]
        xchg    al,ah
        mov    ecx,16
Translate_Atari_l4:
        shl    ax,1
        mov    bl,[edi]
        rcr    bl,1
        mov    [edi],bl
        inc    edi
        dec    ecx
        jne    Translate_Atari_l4
        add    esi,2
        add    edi,LBM_Width
        sub    edi,16
        pop    ecx
        dec    ecx
        jne    Translate_Atari_l3
        pop    edi
        add    edi,16
        pop    ecx
        dec    ecx
        jne    Translate_Atari_l2
        pop    edi
        dec    edx
        jne    Translate_Atari_l1
        push    LBM_Output2
        call    LocalFree
        mov    edi,LBM_Output
        xor    edx,edx
        mov    eax,LBM_Width
        mul    LBM_Height
        mov    ecx,eax
Translate_Atari_l5:
        mov    al,[edi]
        shr    al,4
        mov    [edi],al
        inc    edi
        dec    ecx
        jne    Translate_Atari_l5
        mov    edi,LBM_Output
        ret
;-------------------------------------------------------------------
align    4
Decode_HAM:    mov    eax,LBM_Width
        mov    ebx,LBM_Height
        xor    edx,edx
        mul    ebx
        push    eax
        shl    eax,2
        push    eax
        push    L GMEM_FIXED or GMEM_ZEROINIT
        call    LocalAlloc
        mov    edi,eax
        pop    ecx
        push    eax
        mov    esi,LBM_Output
        mov    ebx,LBM_Palette
Decode_HAM_l1:    mov    al,[esi]
        push    ecx
        mov    ecx,8
        sub    ecx,LBM_nPlanes
        shl    al,cl
        pop    ecx
        mov    ah,al
        shr    ah,6
        and    eax,33fh
        cmp    ah,1
        je    Decode_HAM_B
        cmp    ah,2
        je    Decode_HAM_R
        cmp    ah,3
        je    Decode_HAM_G
        push    ecx
        mov    ecx,8
        sub    ecx,LBM_nPlanes
        shr    al,cl
        pop    ecx
        lea    edx,[eax*2+eax]
        mov    eax,[ebx+edx]
        bswap    eax
        shr    eax,8
        mov    [edi],eax
        add    edi,4
        inc    esi
        dec    ecx
        jne    Decode_HAM_l1
        jmp    Decode_HAM_End
Decode_HAM_R:    and    eax,0ffh
        mov    edx,[edi-4]
        shl    eax,18
        and    edx,0ffffh
        or    edx,eax
        mov    [edi],edx
        add    edi,4
        inc    esi
        dec    ecx
        jne    Decode_HAM_l1
        jmp    Decode_HAM_End
Decode_HAM_G:    and    eax,0ffh
        mov    edx,[edi-4]
        shl    eax,10
        and    edx,0ff00ffh
        or    edx,eax
        mov    [edi],edx
        add    edi,4
        inc    esi
        dec    ecx
        jne    Decode_HAM_l1
        jmp    Decode_HAM_End
Decode_HAM_B:    and    eax,0ffh
        mov    edx,[edi-4]
        shl    eax,2
        and    edx,0ffff00h
        or    edx,eax
        mov    [edi],edx
        add    edi,4
        inc    esi
        dec    ecx
        jne    Decode_HAM_l1
Decode_HAM_End:    push    LBM_Output
        call    LocalFree
        pop    LBM_Output
        mov    LBM_PixelSize,4
        ret
;-------------------------------------------------------------------
align    4
Decode_EHB:    mov    eax,LBM_Width
        mov    ebx,LBM_Height
        xor    edx,edx
        mul    ebx
        push    eax
        shl    eax,2
        push    eax
        push    L GMEM_FIXED or GMEM_ZEROINIT
        call    LocalAlloc
        mov    edi,eax
        pop    ecx
        push    eax
        mov    esi,LBM_Output
        mov    ebx,LBM_Palette
Decode_EHB_l1:    movzx    eax,Byte ptr [esi]
        test    al,20h
        jne    Decode_EHB_Brighten
        lea    edx,[eax*2+eax]
        mov    eax,[ebx+edx]
        bswap    eax
        shr    eax,8
        mov    [edi],eax
        add    edi,4
        inc    esi
        dec    ecx
        jne    Decode_EHB_l1
        jmp    Decode_EHB_End
Decode_EHB_Brighten:
        and    eax,1fh
        lea    edx,[eax*2+eax]
        mov    eax,[ebx+edx]
        bswap    eax
        and    eax,0fefefefeh
        shr    eax,9
        mov    [edi],eax
        add    edi,4
        inc    esi
        dec    ecx
        jne    Decode_EHB_l1
Decode_EHB_End:    push    LBM_Output
        call    LocalFree
        pop    LBM_Output
        mov    LBM_PixelSize,4
        ret
;-------------------------------------------------------------------
align    4
LBM_GetBit:    push    eax ebx ecx
        mov    ebx,LBM_BitStream
        inc    LBM_BitStream
        mov    cl,bl
        and    cl,7
        inc    cl
        shr    ebx,3
        mov    al,[esi+ebx]
        rcl    al,cl
        pop    ecx ebx eax
        ret
;-------------------------------------------------------------------
przechodze na tumiwisizm