flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
cod3b453 12 Aug 2014, 21:29
Yes, dl is the 8 least significant bits of the (r/e)dx register (see http://sandpile.org/x86/gpr.htm for full view). The mixture of registers can be due to the limited permutations of encodable operations and/or the algorithm. Here the algorithm needs to carry up to 32bits in the add but the mov could have been movzx edx, byte [ebx].
|
|||
![]() |
|
Jay 13 Aug 2014, 11:46
ok, since dl represent the first byte of edx the sum with edi has sense. thx
|
|||
![]() |
|
DOS386 17 Aug 2014, 16:27
Welcome to the FASM forum
![]() > if dl and edx were the same, but they are not! ADD EDI,DL unfortunately doesn't work ![]() When you master primitive checksums, you might want to look at CRC32, MD5 and SHA256 ![]() |
|||
![]() |
|
Foxxy 27 Aug 2014, 20:54
DOS386 wrote: Welcome to the FASM forum I recently completed a CRC32 checksum utility written in assembly! ![]() |
|||
![]() |
|
shutdownall 28 Aug 2014, 10:03
|
|||
![]() |
|
jhonny6721 01 Sep 2014, 19:35
You must avoid mix registers parts. In other words, you must avoid add a register that contains a 8 bit value with a 32 bit value. Because, only the value is stored in the first 8 bits. The rest of bits can have a wrong value.
By this reason, if you need to perform any operation with 8 bits or 16 bits part, you must set to zero the whole register. Please, I´m sorry for my english. I am not a natice speaker |
|||
![]() |
|
shutdownall 01 Sep 2014, 21:41
Well mixing register is not that unusual.
XLAT for example but also MUL and DIV operate with different register sizes. CBW, CWDE, MOVZX and MOVSX helps with loading 32 bit registers from 16 or 8 bit registers. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.