The MASM Forum

General => The Campus => Topic started by: RuiLoureiro on November 27, 2013, 02:16:51 AM

Title: One doubt: how many bytes...
Post by: RuiLoureiro on November 27, 2013, 02:16:51 AM
    I have these 2 cases A and B
    What is the best A or B ?
    How many bytes in each case do we spend ?   
    Could you help me ?
    Thanks !  :t

-----------
Case    A
-----------
    _exit:   pop     edi
                pop     esi
                pop     ebx
                ret     8

    _error8:mov     _Error, 8
                stc
                jmp     short _exit
-----------
Case    B
-----------
    _exit:   pop     edi
                pop     esi
                pop     ebx
                ret     8

    _error8:mov     _Error, 8
                stc
                pop     edi
                pop     esi
                pop     ebx
                ret     8           
Title: Re: One doubt: how many bytes...
Post by: dedndave on November 27, 2013, 02:34:51 AM
POP reg32 is 1 byte
RET NNNN is 3 bytes
JMP SHORT LABEL is 2 bytes
Title: Re: One doubt: how many bytes...
Post by: RuiLoureiro on November 27, 2013, 02:43:20 AM
Quote from: dedndave on November 27, 2013, 02:34:51 AM
POP reg32 is 1 byte
RET NNNN is 3 bytes
JMP SHORT LABEL is 2 bytes
Dave  :t
Title: Re: One doubt: how many bytes...
Post by: dedndave on November 27, 2013, 02:45:43 AM
back in the 8088 days, i had them all memorized - and the timings   :P
nowdays, the processors are much more complex and my brain is much less complex - lol
i don't even try to memorize them any more