subj.
Posted on 2002-07-04 13:07:02 by The Svin
zdorovo
Posted on 2002-07-04 14:14:23 by comrade
Spasibo.
Posted on 2002-07-04 14:24:40 by The Svin
ne zachto
Posted on 2002-07-04 14:41:13 by comrade
Klyovaya shtuka, spasibo ;-)
Posted on 2002-07-05 03:30:49 by Andycar
Reset button added:
Posted on 2002-07-05 03:49:35 by The Svin
Svin, very nice to see talks lead to such good work.
This is a link to the discussion so others may better understand.
Posted on 2002-07-05 05:49:40 by bitRAKE
Hmm.. very interesting work. I missed the converstations leading to this product, but with a little study, i see how it works and its purpose...

I bet this would be very usefull in sorting strings with a given filter ;) ( ie, sort out strings beginning with A; C; and K )

However, im not getting one mild point. Is Svin's tool made for specifying in memory the needed masks directly? Im currious about the little endian format of the mask...

ie) for letters "A C O L T Y" - (A COOL TOY) ;)

StringMask db 05,48,08,01

which is really:
0000 0001 0000 1000 0100 1000 0000 0101 (LSB)

Y T O L C A


Cant i just do this (and be less confusing, when reading your source):

StringMask dd 01084805h


Anways.. Great work, hats off to: Jens Duttke, Svin, BitRAKE, and Maverick who contributed it development!

:alright:
NaN
Posted on 2002-07-06 03:31:59 by NaN
NaN, the little endianness is based on the BT instruction - if you stored the values in a register you'd have to swap (i.e. for use in the macro I present in the thread). Svin's tool is for the general case - store the mask where you wish - the benefits of each are mentioned in the discussion (please, ignore the negitivities :)).

IMHO, you explain it backwards:

StringMask dd 01084805h

...is really:

StringMask db 05h, 48h, 08h, 01h

...the DWORD type is just to make things easier on us humans, and the assemblers swap the bytes for us when we use dd. The BT instruction when used on memory is byte granular, hence the notation in the tool.

:grin: Okay, I see what your saying now. Forgive me I'm slow sometimes. The bits line up 'better' when dd is used. I am just very accustom to doing bit operations from low memory to high memory, low bit to high bit.
Posted on 2002-07-06 07:09:32 by bitRAKE
It's for bitswithch cases. Havily used for a long time.
Jens explain a simple and creative idea of shifting bitbase
to least s bit, that allow to shrink base and save some bytes if there are a lot of leading zero bits, it also may give a chance to shink it to size that can be used with register that gives also speed advantage in addition to size.
I just did a tool to free us from the routin of bit setting and shifting, and also show both numeric and ASCII choise 'cause it often matter in parsing and string formating.
As to usage, it's even wider than usage of cmp :)

Inside the code itself you can see usage of several bit opperations with both absolute (long and not shifted) bit string and srunk bitstring. It can eliminate your doubts of relaibility of format. Normal mode shows dwords and shink mode shows bytes (I thought it was clear, sorry if I was wrong).
For example instead of BM_GETSTATE the source use
btr command and advantage is 256*(speed of BM_GETSTATE - speed of btr). I didn't clock it but think it's close to ~1000000 clocks.
Imaging different case - instead of writing
.IF eax == 13 || eax = 17 || eax 23 || or eax = ...
+ more and more ||
you can write just
bt bitstring,eax
bitsting may be register(if you get short string) or memory.
Look again in source - for idea to use it with controls.
Posted on 2002-07-06 11:55:06 by The Svin
svin,

very cool tool!

but, when i presed RESET, i got a fault in 004011a4... analising it with softice, i found you used MOVQ MM0,, a MMX instruction :(

i have a pentium 166, and i know its a old machine. but its need MMX instructions in a reset function??

if i was asking for 386 compatibility, ok... but pentium compatibility, man! this is not ask too much i think :)

the tool is very good, so good, that i will continue using it, even if you dont fix the reset button :)

ancev
Posted on 2002-07-06 12:54:58 by ancev
bt without MMX
Posted on 2002-07-07 03:11:55 by The Svin