X-Comment-To: tom ehlert

Hi!

13-���-2002 22:31 [EMAIL PROTECTED] (tom ehlert) wrote to
[EMAIL PROTECTED]:

>> - rdatclk.asm. Was:
te> rdatclk was linked earlier. now its '#if 0' code (to be deleted ASAP)

     I seen this, but I don't know (yet) where similar code may be present.

>> In other files also may be applied similar small optmizations. For example,
>> rdpcclk.asm. Was:
te>     was             xor     ah,ah
te>     Should be:  mov   ah,0
te> WHY?

     Looks nicer and sensible (`mov ah,0' reflects AH=0 action better). This
is question of taste, though.

te> was         >              mov     ah,0
te> should be >             ;mov     ah,0
te> OK.

     Note: commented line shouldn't be deleted. It is a compromise beteween
readability (there are no implicit assumptions), supportness (if you will
copy this code without previous MOV AH,0 or XOR AH,AH, then you will see
that there should be AH==0 and you may simply uncomment code) and efficiency
(no extra instructions).

te> was       >                 mov     ax,dx
te>               >                 mov     dx,cx
te> should be >                 xchg    ax,cx

     Here should be:

                xchg    ax,cx           ; OPTIMIZE: instead MOV AX,CX

te>                  >                  xchg   ax,dx
te> why?

     Because this code (XCHG AX/reg) shorter (than MOV AX/reg).

te> so we save 2 bytes.

     Plus two bytes above. At lower level (when only formal optimizations
applied) there harder to ger more (although in previous example I offer
more).

==^^===============================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?b1ddyi.b3hwCs.YXJjaGl2
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^^===============================================================

Reply via email to