| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | strwildcmp :) |
G'Day Adam,
-=> Quoting Adam Fitzpatrick to Frank Adam <=-
FA>it actually returns the ascii code of the character it fails on in
FA>str1, and negates it if *str2 > *str1.
AF> That's quite interesting; presumably the asm source involves lodsb and
AF> cmp al,[es:di] or some such. Therefore the character from str1 is
AF> already in AL, so it doesn't require any instructions to produce the
Yes, i have made an strcmp to return the char or negated char.
I'm yet to find a use for it though:)
AF> return code. However, this wouldn't work with a character over the
AF> value of 127, because that would be interpreted as a negative number.
Well, it does an unsigned comparison, so i presume that's correct.
AF> Have you tried it with str1 containing such a character? (Or does the
AF> strcmp() function assume 0 to 127 characters?)
See above :-)
No, i didn't, mainly bacause as the others pointed out it's just a fluke.
I have tried it in BC4 after those comments and it did not reproduce it,
Turbo C does.
Mind you, Turbo C runs through DOS, while BC4 in win-doze, so that may
also have something to do with it.
L8r Frank (fadam{at}ozemail.com.au).
___ Blue Wave/DOS v2.21
--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)SEEN-BY: 50/99 620/243 623/630 632/349 635/503 544 727 711/401 409 410 413 SEEN-BY: 711/430 808 809 932 934 712/515 713/888 714/906 800/1 @PATH: 635/544 50/99 711/808 934 |
|
| 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™.