TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: All
from: Bob van der Poel 76510,2203
date: 1991-09-24 21:19:38
subject: #Long code

#: 12399 S12/OS9/68000 (OSK)
    24-Sep-91  21:19:38
Sb: #Long code
Fm: Bob van der Poel 76510,2203
To: All

Does anyone know why Microware used code like this in the strlen() and strcat()
library functions?

  strlen  move.l   a0,-(a7)
          movea.l  d0,a0
  strlen1 tst.b    (a0)+
          beq.b    strlen2
          tst.b    (a0)+
          beq.b    strlen2
          tst.b    (a0)+
          beq.b    strlen2
          tst.b    (a0)+
          bne.b    strlen1
  strlen2 ....

I assume that a beq is quicker than a bne??? My 68000 manual doesn't show
that--but, even if it is, would it make any real difference? After all, we are
talking about a C library routine.



There are 2 Replies.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.