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 > Assembly x86 > Re: Calculating...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 10 Topic 4571 of 4729
Post > Topic >>

Re: Calculating checksums...

by Alex Buell <spamtrap@[EMAIL PROTECTED] > Mar 15, 2008 at 08:20 AM

On Sat, 15 Mar 2008 03:18:56 GMT, I waved a wand and this message
magically appears in front of Tim Roberts:

> >How would you suggest I could rewrite this in NASM?
> 
> This is one of the easier algorithms to code in assembly.
> 
>     mov  cx, 511
>     xor  dl,dl
> again:
>     lodsb
>     add  dl,al
>     dec  cx
>     jnz  again
>     neg  al
>     mov  ds:[si],al

Indeed, that is what I would do if I wanted to calculate the checksum
at runtime but this FASM algorithm generates the checksum from the
contents of the assembled file and inserts it at the end of the file. I
was wondering if NASM was able to do that.
-- 
http://www.munted.org.uk

Fearsome grindings.
 




 10 Posts in Topic:
Calculating checksums...
Alex Buell <spamtrap@  2008-03-14 19:33:12 
Re: Calculating checksums...
Tim Roberts <spamtrap  2008-03-15 03:18:56 
Re: Calculating checksums...
Robert Redelmeier <red  2008-03-15 13:40:22 
Re: Calculating checksums...
Tim Roberts <spamtrap  2008-03-16 21:13:23 
Re: Calculating checksums...
Frank Kotler <spamtra  2008-03-15 06:14:00 
Re: Calculating checksums...
Alex Buell <spamtrap@  2008-03-15 08:25:41 
Re: Calculating checksums...
Frank Kotler <spamtra  2008-03-15 20:11:34 
Re: Calculating checksums...
Alex Buell <spamtrap@  2008-03-15 08:20:33 
Re: Calculating checksums...
Mike Gonta <spamtrap@  2008-03-15 04:30:28 
Re: Calculating checksums...
Mike Gonta <spamtrap@  2008-03-15 06:32:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Thu Jul 24 14:53:39 CDT 2008.