Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: Wanna do a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 28 Topic 3723 of 3953
Post > Topic >>

Re: Wanna do a WriteLongwordBits contest ?

by Terje Mathisen <terje.mathisen@[EMAIL PROTECTED] > May 7, 2008 at 09:35 AM

Skybuck Flying wrote:
> Your new version is better, but still has a serious shortcoming:
> 
> the DestBitIndex should be able to have any range.
> 
> Your method assumes parameter DestBitIndex has range 0 to 31, this is
too 
> restricted.

Huh?

The very first operation I do is to mask/update the base pointer and the 
bit index, specifically to handle index values above 31

> Your method writes garbage bits from the value as well...
> 
> Suppose the value is:
> 
> LSB ------------------------------> MSB
> |                                     |
> 1111 1111 1111 0000 0000 0000 0000 0000
> 
> Suppose the bit count is: 3


This is simply bogus, you should never try to write a value which would 
not fit inside the target field, or if you have to do so, then you 
should have a separate function which masks the input value before 
calling the base/fast function.

BTW, you even translated my normalization code to Pascal, and still 
didn't read it. You're amazing!

>  // Normalize bit index
>  longword(DestAddress) := longword(DestAddress) + (DestBitIndex shr 5);
>  DestBitIndex := DestBitIndex and 31;

Terje
-- 
- <Terje.Mathisen@[EMAIL PROTECTED]
>
"almost all programming can be viewed as an exercise in caching"
 




 28 Posts in Topic:
Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-02 10:47:32 
Re: Wanna do a WriteLongwordBits contest ?
MitchAlsup <MitchAlsup  2008-05-03 14:05:49 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-04 14:05:56 
Re: Wanna do a WriteLongwordBits contest ?
Terje Mathisen <terje.  2008-05-04 17:30:07 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-04 21:25:04 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-05 15:11:42 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-05 15:21:01 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-05 15:39:46 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-05 15:46:18 
Re: Wanna do a WriteLongwordBits contest ?
Terje Mathisen <terje.  2008-05-06 08:31:55 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-06 10:41:53 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-06 14:41:26 
Re: Wanna do a WriteLongwordBits contest ?
Terje Mathisen <terje.  2008-05-06 17:19:16 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-06 20:04:26 
Re: Wanna do a WriteLongwordBits contest ?
Terje Mathisen <terje.  2008-05-07 09:35:30 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-07 13:31:05 
Re: Wanna do a WriteLongwordBits contest ?
"Skybuck Flying"  2008-05-07 14:34:37 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's SimInt64 C
"Skybuck Flying"  2008-05-05 21:34:20 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's SimInt64 C
"Skybuck Flying"  2008-05-05 22:02:51 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Second Ent
"Skybuck Flying"  2008-05-05 19:38:42 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Third Entr
"Skybuck Flying"  2008-05-05 20:02:10 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Third Entr
"Skybuck Flying"  2008-05-05 20:35:17 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Fourth Ent
"Skybuck Flying"  2008-05-06 21:50:17 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Fourth Ent
"Skybuck Flying"  2008-05-06 21:53:40 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Fiveth Ent
"Skybuck Flying"  2008-05-06 22:54:22 
Re: Wanna do a WriteLongwordBits contest ? (Skybuck's Fiveth Ent
"Skybuck Flying"  2008-05-06 23:10:52 
Re: Wanna do a WriteLongwordBits contest ? (Benchmark, Verificat
"Skybuck Flying"  2008-05-07 19:09:04 
Re: Wanna do a WriteLongwordBits contest ? (Benchmark, Verificat
"Skybuck Flying"  2008-05-08 02:07:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 9:07:03 CDT 2008.