Morris,

Usually I use the technique when I append a CRLF to the end of a working buffer or similar.

Here is another example of data embedded in the code section.


push 00000000h
push "won "
push "rets"
push "igeR"

mov ecx, esp

fn SetWindowText,hWnd,ecx

pop eax
pop eax
pop eax
pop eax

Easy to do, definitely string data and no performance penalty at all, cache line or otherwise.

Regards,
http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Posted on 2004-02-18 03:46:21 by hutch--
Easy to do, definitely string data and no performance penalty at all, cache line or otherwise.


You do realize that push is actually a mov-operation, right? So basically you copy the data to the stack first. Meaning your API is using the data from the stack and not from the code section.
Which means the entire example is rubbish, and nobody is fooled.
Note also that each push takes at least 1 clk to perform, so it's not exactly great in terms of performance either.

Okay, instead of insulting skills... Let's have a competition then. I'm sick of this nonsense.
Shall we see who can implement the fastest Marching Cubes algorithm then?
And then I don't want to hear any more nonsense about lack of skills, or C compiler crutch or whatever.
I can code circles around your spaghetti code, and if I have to prove it to make you shut up, I will.
Posted on 2004-02-18 05:45:39 by Henk-Jan
Don't know where he quoted the stuff from, he never says. I am quoting from page 2-47 of the optimization manual, Rule # 27.


I did, you ...
See http://www.intel.com/design/pentium...als/248966.htm, page 1-18 : "The first level cache (nearest to the execution core) contains separate
caches for instructions and data."
page 2-5: "Avoid mixing code and data"
to name the two most important ones.

See page 6 for the original post, somewhere at the top.
Posted on 2004-02-18 05:48:02 by Henk-Jan
smile,

Working code is working code and zero terminated strings can easily be placed in the code section, the working code is the proof of it. So much for your highly self acclaimed opinion again.

Okay, instead of insulting skills... Let's have a competition then. I'm sick of this nonsense.
Shall we see who can implement the fastest Marching Cubes algorithm then?

Why should I waste my time pissing around with junk like graphics when I have other useful things to do. As far as your challenge, you well flat on your arse last time with your failure to write a decent Boyer Moore algo.

Instead of the complete 5 heuristic design published by Bob Boyer back in the 70s, you cobbled together part of a single heuristic shift that was not a performer.

When you can cobble together a working 5 heuristic version that is competitive to the old MASM ones I did some years ago, let us all know but I won't hold my breath waiting.

Regards,

PS: You never did optimise Jeremy Collake's original Boyer Moore algo as you were sprouting you would, I wonder why ? Mouth bigger than the available talent ?

Ewald, Ewald, wherefore art thou Ewald.

http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Posted on 2004-02-18 06:17:58 by hutch--
This form is slightly more efficient but it hardly matters when its a technique for obscuring string data to make life a little harder for casual crackers.


push 00000000h
push "won "
push "rets"
push "igeR"
push esp
push hWnd
call SetWindowText
add esp, 16

As our highly self acclaimed friend seems to confuse stack memory and data, stack memory retains what was last written to it which is usually rubbish so to get the content of the zero terminated string onto the stack, it must have data in it, data that in this instance is contained directly in the instructions as immediate operands.

txtdata db "DATA IS DATA IS DATA IS DATA",0

While comprehension == 0
Display txtdata
Wend ' :grin:


Regards,
http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Posted on 2004-02-18 06:47:49 by hutch--
Why should I waste my time pissing around with junk like graphics when I have other useful things to do. As far as your challenge, you well flat on your arse last time with your failure to write a decent Boyer Moore algo.


You mean, Marching Cubes is much more complex than the trivial Boyer Moore algo, so you're afraid to take up the challenge.
Besides, if blorght and I didn't mention BM, you would never even have known of its existence.

Instead of the complete 5 heuristic design published by Bob Boyer back in the 70s, you cobbled together part of a single heuristic shift that was not a performer.


It outperformed your bytescanner, so it was enough to prove you wrong anyway.

PS: You never did optimise Jeremy Collake's original Boyer Moore algo as you were sprouting you would, I wonder why ? Mouth bigger than the available talent ?


You have an awfully large mouth for someone who didn't even understand BM until he was spoonfed a working version by JC.
Besides I never claimed I would optimize his. And we all know who lacks the talent, and is avoiding a Marching Cubes challenge.
Amateur.
Posted on 2004-02-18 07:17:00 by Henk-Jan
What is a "Marching Cube algo" and what would I need it for in everyday programming?
Posted on 2004-02-18 07:30:32 by Morris
<SpanxMFCS> your InString proc is very good! i first tried to adapt it, but i adapted it wrong the first time, so it was great you called me back to it for another shot!!
<hutch--> seeya neiural
*** nu has quit IRC (she is the tear that hangs inside my soul forever...)
<hutch--> its fast enough, overlaps Boyer Moore with no problems
*** owned0 has quit IRC (Read error: 0 (Undefined error: 0))
<SpanxMFCS> sorry to be harassing u at end of hard day :)
*** sat0r^zZZ (~me@astnet3.astelit.ru) has joined #win32asm
<Scali> hutch--: Urm?
<SpanxMFCS> are you making or breaking the encryption dude?
<Scali> hutch--: That silly rubbish with that loop?
<hutch--> making
<Scali> boyer moore kills it on large searches
<hutch--> which one ?
<wrightie-> l8er ;)
<Scali> boyer moore works smarter, not harder.
<hutch--> testing says otherwise, try it on 100 meg strings
<Scali> it's the best searcher known to man.
<SpanxMFCS> lol
<SpanxMFCS> u guys are funny
<Scali> hutch--: Then the implementation reeks.
<hutch--> yes but ofen slower
<SpanxMFCS> debating speeds of string searches
<Scali> hutch--: go talk to blorght
<SpanxMFCS> hehehehe
<Scali> hers kicks total butt
<hutch--> same problem it was designed at HLL, too much overhead
*** wrightie- has quit IRC (Don't be so sad: I'll be back... ;))
*** DarkSheep (DarkSheep@pC19F36CE.dip.t-dialin.net) has left #Win32Asm
<hutch--> its the tests I am interested in
<Scali> hutch--: Honestly, do you understand the algo?
<hutch--> yes, its overhead heavy
<Scali> I don't think you do, else you would KNOW that it was the fastest hands down.
<Scali> it has way less memory access
<Scali> which is the bottleneck
<hutch--> has problems with large occurrences of the leading string
<Scali> no, that's yours
<Scali> not boyre
<Scali> anyway, I see that yet another coder is clueless about algos...
<hutch--> mine has problems with the trailing string
<Scali> Time for breakfast.
<hutch--> haha
<hutch--> let me test yours
<Scali> hutch--: you check every byte man!
<SpanxMFCS> scali is cheeky ;p
<Scali> it CAN NOT be fast
<Scali> Just think!
<Scali> damnit!
<hutch--> I benchmark mine
<Scali> think!
<hutch--> clock says different
<Scali> clock my arse.
<hutch--> much less overhead
<endo|ZzZz> heh
<hutch--> per loop
<endo|ZzZz> well, im going to bed for real
<Scali> Like I said, blorght could find a file in a 650 mb ISO in 4 seconds
<endo|ZzZz> nite
<Scali> you do that with your searcher
<hutch--> seeya
<Scali> will take ages
<hutch--> from what, no CD is that fast
<Scali> hutch--: GRRRRRRRRRRRR!!
<Scali> YOU DON'T GET IT!!!
<hutch--> and how was it tested, in linear memory ?
<Scali> Boyer moore doesn't HAVE TO READ THE ENTIRE CD!!!!
<Scali> That's the beauty man!
<Scali> that's why it's so damn fast!
<hutch--> I have 4 Boyer moore inplementations here
<hutch--> they are SLOW at some stuff
*** faster has quit IRC (EOF of client)
<hutch--> neither does mine
*** CrashAway (~crashtest@pierramenta.imag.fr) has joined #win32asm
<CrashAway> mmm... no topic ?
<hutch--> the theory does not match the practice
<Scali> hutch--: Practice is searching an ISO in 4 secodnds
<Scali> you can NEVER do that.
<Scali> Boyer can
<hutch--> never seen it done, 650 meg in 4 seconds, haha
<Scali> hutch--: Talk to blorght
<SpanxMFCS> hutch: thanks again :)
<SpanxMFCS> nite all
<Scali> she can at least think
<hutch--> np spanx
<Scali> And code it
<hutch--> I hear it but I never saw it, all the BMs I have are not fast
<Scali> hutch--: Damnit, I thought you were leet
<Scali> BM does NOT search 650 mb
<Scali> Don't you get it?
<hutch--> I am a primitive, thats asm for you
<SpanxMFCS> scali: hes had a hard day, give him a break ;p
<SpanxMFCS> try him tomorrow
<hutch--> I know the theory, its overhead kils it
<Scali> SpanxMFCS: We've been through this a few times... vg told me he explained the algo.
<SpanxMFCS> ok say 'good nite spanx' or 'goodbye spanx'
<Scali> Guess he did a lousy job
<hutch--> reading backwards is SLOW
<Scali> hutch--: Why?
<Scali> Cache can handle that
<hutch--> I have both of viro's
*** faster (~bored@will.always.have.a.Need-4-Speed.net) has joined #win32asm
<hutch--> benchmarked against them
<Scali> besides, you don't read NEARLY as much as with your algo
<Scali> Well, then mebbe viro isn't leet either
<Scali> blorght is
<SpanxMFCS> good night spanx, sleep well spanx ;)
<hutch--> it reads it a lot faster
<hutch--> seeya spanx
<SpanxMFCS> heeh thanks ;)
*** owned0 (bored@OwnZ.yER.localh0.st) has joined #win32asm
<Scali> Blah, ASM will do you no good if you can't use a smart algo.
<hutch--> I am willing to benchmark it, the rest is hot air
<hutch--> its ancient tech based on C
<Scali> hutch--: If you would understand BM, there would be no need for benchmarking.
<Scali> it's just SO F*CKING OBVIOUS
<Scali> doh
*** SpanxMFCS has quit IRC (hutch IS LEET!! ;))
<hutch--> its the only test
*** Scali is now known as Scalefood
<Scalefood> buncha llamaz here
Session Close: Sat Mar 25 14:21:36 2000
Posted on 2004-02-18 07:30:33 by Henk-Jan
For a man who did not live up to his last attempt to be a superhero coder, you have no chance in wasting my time coding garbage like graphics when I have enough to keep me going for some time ahead.

When will you code that 5 heuristic Boyer Moore algo ? Perhaps in your wildest dreams along with your view that you produce hand optimised assembler with a C compiler.

Now that may be difficult if you don't understand the difference between data and code in a code section and where you use cache line loads. Maybe you could find a library where someone has done all the hard dirty work for you so all you have to do is set the compiler switch,


/write_hand_optimised_assembler

When will you optimise Jeremy Collak's original Boyer Moore algo ? Was it just too hard for you after flapping your mouth off against a genuinely nice guy who gave away his code to help other people ?

Maybe you should start dreaming about your PC outperforming that SGI box again. At least you can get a phony wet dream out of that. :tongue:

Sonner or later you will connect the idea that you cannot win an argument when your original premise was wrong.

Arguing with me is like pissing into the wind and complaining about being splashed with your own urine. Its not even competition and the cat scratching only adds to the humour.

Sooner or later you will give up on the idea of endlessly making a fool of yourself with assertions that are simply wrong.

Regards,
http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Posted on 2004-02-18 07:34:26 by hutch--
Sooner or later you will give up on the idea of endlessly making a fool of yourself with assertions that are simply wrong.


Judging from the above log, I think I should be saying this to you.
And if Boyer Moore is the best thing you can boast about, that's really pathetic. It's not exactly rocket-science. Well not to me anyway. Perhaps it is to you.
But if you can't implement Marching Cubes, that's fine. That means I win by default. Prepare to hear about it until the end of time.
Posted on 2004-02-18 07:37:17 by Henk-Jan
What is a "Marching Cube algo" and what would I need it for in everyday programming?


Marching Cubes is a way to polygonize a scalar field...
In other words, it can convert a 3d grid of voxel values to a 3d polygon model (actually triangles) of the surface. The 3d polygon model can be visualized in realtime using 3d accelerator hardware. It is used in things like medical imaging, or visualizing air or fluid flows, and such.
It's quite an interesting algo, especially cache-wise.
Posted on 2004-02-18 07:39:56 by Henk-Jan
I warned you, but did you listen? Of course you didn't...

Do not re-register again, sadly it has shown time after time that it's no use.
Posted on 2004-02-18 08:14:55 by Hiroshimator
Man, that hutch is really an idiot, did you read that log? And then boasting about the virtues of BM? lol

Hiro: je bent een slappe zak. Ga lekker hutch z'n kont likken ofzo.
Ik vind je een ongelofelijk ondankbare teringlijer om mij te bannen nadat ik zoveel voor het forum betekend heb, en en achterlijke kankerdebiel als hutch te gaan verdedigen, die iedereen verrot scheldt, en alleen maar leugens verspreidt, en verder niets toevoegt. Jullie kunnen allemaal de tering genieten. Stelletje nazis.
Posted on 2004-02-18 08:21:06 by Freek-Willem

The "literal" macro in the macros.inc file is a modification of an original design by "huh" from Blenheim in New Zealand and it is used by the SADD and CTXT macros depending on where they are called from.

Yeah, I know what the 'literal' macro looks like - and it has the problem that you can only really use it (or the macros using it), from your code section (because it uses ".code" to "switch back to the section it came from" - but who says I was in .code?). Also, it would be useful to align before the string as well... a bit fixed version that can be called from anywhere:



literal MACRO quoted_text:VARARG
LOCAL local_text
DATA segment
align 4
local_text db quoted_text, 0
align 4
DATA ends
EXITM <OFFSET local_text>
ENDM


As for the shit you're spewing about scali... grow up. I think that you used to be all "omfg my bruteforce scanners are teh leet and BM sux0rz!", then ended up writing BM algos after somebody *finally* got through your thick skull... well, I think that says a lot about you. Scali isn't the only one with those logs, and I think bl0rgth has some interesting logs (or at least memories), too. And for the record, the vanilla C version BM scali wrote wasn't made to compete speed-wise, it was to disproof your statement that he didn't have the guts (or did you write 'gutz'? Time to dig out old logs, perhaps) to write one. Quite funny that this one-hour na?ve plain ANSI C implementation didn't perform all that badly compared to your finely hand-tuned ?ber-heuristic leet-asm versions, eh? I wonder what he could come up with if he could be bothered writing an asm version.

Besides I think it's funny you keep digging up "C vs. Asm", it wasn't really the topic of any of the previous posts in this thread. Yes, you're the one digging it up, you're the one bringing back old feuds, and you're the one patronizing people and twisting their statements. Shame on you, old bastard.
Posted on 2004-02-18 09:52:27 by f0dder
f0dder,

Basically if the macro is not called from the code section as a programmer writes the code, direct writing in the data section works fine so I don't see the point.

The reason why I aligned the exit but not the entry was that BYTE data is hapily read at BYTE alignment when the following entry in the data section may be a DWORD or similar where the alignment actually matters.

Now as far as classic byte scanners versus BM family of algos, there are many places where the classic scanner is far faster and this is why it is still the most common form of search algo.

I did the work on the BM algos some years ago on the basis of the work done by Bob Boyer and Moore, both who were very helpful in the development of a later x86 implimentation for modern hardware.

Contrary to our friend's assertion, I did not need any other help as the original authors wrote the original code in PDP10 assembler back in the 70s.

My complaint with our friend now as then was his criticism of Jeremy Collake who wrote the first implimentation in 32 bit assembler that I had seen when Jeremy Collake was a perfect gentleman who helped a lot of people and never blew his trumpet about it.

Based on his original asseertions, I again offered him the chance to write a real BM version with its 5 documented heuristics, something that is more or less impossible with a C compiler as they cannot handle the complexity. You do not need to take my word here, look up the French site from a guy who actually know how to code in C on generic search algos.

His were faster than our friend's efforts and not that far off the asm versions.

As our friend issued another challenge, I reminded him that he failed in the last one and that I was not going to waste my time in stuff that I see as useless when I have a lot of other work to do.

As you still have the association with our friend, perhaps you could connect that attacking people is always a grief stricken approach that does not work. All he gets from attacking me is having it shot back at him which leaves him even more offended.

I don't dislike the guy and I know he can write reasonably software but anyone who leads with their heart on their sleeve when starting a fight for no purpose ends up getting it trodden on.

Regards,
http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Posted on 2004-02-18 20:03:20 by hutch--
Now as far as classic byte scanners versus BM family of algos, there are many places where the classic scanner is far faster and this is why it is still the most common form of search algo.


The log clearly showed that you claimed it was faster in all cases, while as we all know, BM is faster in the average case, and MUCH faster in the worst case.

Contrary to our friend's assertion, I did not need any other help as the original authors wrote the original code in PDP10 assembler back in the 70s.


The log clearly shows that you did not understand the entire algo at this time, so obviously you have had help understanding it.

My complaint with our friend now as then was his criticism of Jeremy Collake who wrote the first implimentation in 32 bit assembler that I had seen when Jeremy Collake was a perfect gentleman who helped a lot of people and never blew his trumpet about it.


I have never criticised JC's work. Stop your endless lies. Why do you criticise my work anyway? Because f0dder and I decided to test a C version of the algo against your asm versions, we discovered and fixed bugs in a number of routines. At first, only one of them actually worked. Why don't you mention that? We helped you, damnit. First by trying to convince you that BM is the way to go, secondly by stress-testing and bugfixing your implementations.

Based on his original asseertions, I again offered him the chance to write a real BM version with its 5 documented heuristics, something that is more or less impossible with a C compiler as they cannot handle the complexity. You do not need to take my word here, look up the French site from a guy who actually know how to code in C on generic search algo.


Anything you can do in asm, which doesn't require special privileged instructions, you can do in C. In other words: this is complete nonsense. Anyone who knows C, will know this. Stop your endless lies.

His were faster than our friend's efforts and not that far off the asm versions.


Mine was not far off the asm versions either. It actually had a better worst case because of an optimization that the asm-versions missed. Got benchmarks?

As our friend issued another challenge, I reminded him that he failed in the last one and that I was not going to waste my time in stuff that I see as useless when I have a lot of other work to do.


There was no challenge, other than getting through your thick skull that BM is superior to bytescanners in pretty much every realistic situation. The log clearly shows that you were not smart enough to understand the algo itself. Only when JC spoonfed you some asm sourcecode, you managed to rewrite those a tad. I still wonder if you actually understand the algo though. But at least you know that BM is faster now. It only took you a few years to realize this. What a nice way to thank the people that pointed out the algo and tried to explain it to you: insult them, and tell everyone that they cannot implement the algo, and that they don't have any skills. The logs clearly show that I understood BM long before you ever did, and therefore I could implement BM long before you did. And as we both know, I am fluent in asm, so if I can code it in C (this I proved), I can code it in asm (why bother? if I make it in asm, you'll just find a case where yours perform better, and nag about that. And it is impossible to make a routine that is faster in ALL cases).
We both know that you cannot do Marching Cubes, because it is far harder than BM to implement.

I don't dislike the guy and I know he can write reasonably software but anyone who leads with their heart on their sleeve when starting a fight for no purpose ends up getting it trodden on.


You started the fight, not me, when you insulted f0dder, because he had justified criticism on one of your macros. Stop playing a saint. You're not. You're the one starting a flamewar to cover up your ego. And the log clearly shows that you were clueless to BM, so don't go bragging now, it makes you look so stupid.
Besides, BM is trivial, if you think it is any challenge whatsoever to an experienced programmer, you are more pathetic than I thought. If you don't dislike me, prove it, by making Hiro lift the unjust ban (I never broke the rules, you did however). And if you don't dislike me, prove it by giving me the credit and respect that I deserve, and admit it when I am right, and you are wrong. Otherwise you're just a pathetic liar, who should just shut up and die.
Posted on 2004-02-19 01:45:08 by Kees-Jan
Hey, moron.

Isn't it obvious that you're not wanted here. You've been banned more times than I can count.

Go ahead and ban me, I don't care. It's your loss.

Then why the hell do you keep coming back? You must have mental problems. Seek professional help, before it's too late.

I don't care if you designed the Pentium. I don't care if you can code circles around Bill Gates. Your attitude sucks. If you worked for me, you'ld be out on the street after about 5 minutes.

Go think about your people skills for a while, and leave us alone.

Idiot. :(
Posted on 2004-02-19 03:04:05 by S/390
Isn't it obvious that you're not wanted here. You've been banned more times than I can count.


I helped create the win32asm-community, and I think I have a right to be here. Hutch sees otherwise so he uses his influence to get rid of me, instead of being shown up as the amateur that he is. I think that many people would actually like me here, because I often provide useful help, and I generally don't have problems with people. I do have some good friends here, you know, like eg comrade, C0D1F13D, Scronty, f0dder... I never had a problem with hutch until the BM, and I posted the log so you can see how it all started, and now you can see how he tries to reverse the situation. Why don't you people see right through him? It's not like it's hard.

I don't care if you designed the Pentium. I don't care if you can code circles around Bill Gates. Your attitude sucks. If you worked for me, you'ld be out on the street after about 5 minutes.


If anything, you'd probably be working for me... Then again, nah, you can't seem to separate truth from ego. I want rational people working for me only.

Go think about your people skills for a while, and leave us alone.


Oh, and hutch is just the perfect gentleman? Telling lies about people, using lies to cover up his mistakes, so that other people will adopt them as truth? Insulting people's skills when they point out something (like eg that BM is faster)?
If you think about it, hutch is the problem. I can get along fine with anyone. If you wouldn't look up to hutch as some kind of god, you'd see it too. Hutch is obviously not a god, but merely a below-average asm programmer, with no knowledge of C or other important HLLs.
If people stopped backing hutch because they look up to him or something, because he 'made' MASM32, and started to see the truth, things would be a lot easier for people like f0dder and me.

Hutch has the attitude problem, not me.
Which is easily proven by the fact that Henk-Jan got along fine with everyone, until he tried to explain what f0dder meant by 'junk' in relation to hutch's macro. THINK.
And don't hate me because I criticise hutch's code.

So why don't the hutch-lovers back off and give me a chance? I deserve a fair chance. After all I've done for the community, and even for ungrateful hutch himself (like teaching BM and fixing his code, and several contributions to MASM32).
Posted on 2004-02-19 03:13:36 by Kees-Jan
Bye Bye, don't come back now y'hear. And really, you're no great loss, won't even notice you missing.
Posted on 2004-02-19 03:18:48 by donkey
Bye Bye, don't come back now y'hear. And really, you're no great loss, won't even notice you missing.


You've already proven not to know what you're missing with your earlier cache-statements. I'm not exactly here for you.
Posted on 2004-02-19 03:20:31 by Kees-Jan