News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

One doubt: how many bytes...

Started by RuiLoureiro, November 27, 2013, 02:16:51 AM

Previous topic - Next topic

RuiLoureiro

    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           

dedndave

POP reg32 is 1 byte
RET NNNN is 3 bytes
JMP SHORT LABEL is 2 bytes

RuiLoureiro

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

dedndave

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