TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Bill Birrell
from: Jasen Betts
date: 2004-04-22 17:59:46
subject: strlen

Hi Bill.

21-Apr-04 23:14:02, Bill Birrell wrote to Jasen Betts


  >> This is my first attempt at gcc style inline asm, I'd welcome any
  >> comments...

 BB> I'm really sorry, Jasen. I haven't studied gcc assembler.

that's ok. it was more a question to all readers than just to you.

 BB> but I do not know the order of operands in your assembler,

"gas" is basically backwards with the operands.

 BB> What does "movl $-2,eax" do?

 it puts -2 in eax,

 BB> If it subtracts 2 from eax, then it all looks ok to me,

the raw ecx value (after the repne;scasb) is then subtracted from that
(eax) to get the result.

 -=> Bye <=-

---
* Origin: Dogs come when you call, cats have answering machines (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.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™.