flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Goplat 10 Dec 2006, 01:56
Quote: I'm assuming that it's a location in the RAM pointed at by the SS register. Not sure which segment it's in though. Would it be in the current segment with the rest of the program code? Quote: then come daa and aaa... The whole concept behind them eludes me (havn't a clue what "unpacked BCD" is). I hear it has something to do with "decimals" so i'm assuming real numbers (or floats). Other than that, though, i havn't a clue what the tutorial i'm reading is talking about, nor a clue what it's trying to say in the fasm documentation. Unpacked BCD means you store one digit in each byte, so for example, the number 15393 would be stored as 01 05 03 09 03. Packed means you store one digit in each hex nybble (two digits per byte), so 15393 would be stored as 01 53 93. AAA is used for adjusting AL after performing an addition on bytes of unpacked BCD, and DAA is used for packed BCD. Quote: And last but not least, xadd... Does it modify the same flags as add or none at all or what? |
|||
![]() |
|
Tomasz Grysztar 10 Dec 2006, 02:12
kohlrak: I recommend to get an original Intel manuals, where you can read a lot of quality first-hand information about all the instructions (volume 2 contains the instruction set reference).
|
|||
![]() |
|
kohlrak 10 Dec 2006, 02:12
So basically, BCD is decimal numbers stored as Hex? Such as 11 would be 0x01 and 0x01 rather than 0xB? If that is true, one could use aaa and daa to convert hex to decimal and vice versa (though, in an obscure way), am i right?
|
|||
![]() |
|
kohlrak 10 Dec 2006, 02:17
so it dosn't start the next digit until F+1 (0x10)? Not a very efficient system, in my book, but there's probably a purpose for it outside of my current views on programming. lol And thanks for the link, i bookmarked it.
|
|||
![]() |
|
Tomasz Grysztar 10 Dec 2006, 02:17
As unpacked BCD it would be 0x01 and 0x01, as packed BCD it would be 0x11. For unpacked BCD you've got AAA and AAS, for packed BCD you've got DAA and DAS.
|
|||
![]() |
|
kohlrak 10 Dec 2006, 02:22
So packed is essentualy what everything is by default? If that's the case everything should be in order after adding and subtracting and we shouldn't need DAA or DAS unless we're trying to use unsigned bytes rather than signed bytes.
|
|||
![]() |
|
hckr83 10 Dec 2006, 02:23
|
|||
![]() |
|
r22 10 Dec 2006, 06:04
Here is a zip that has all of AMD's instruction documentation pdf's (32 and 64bit).
It's too large to upload here http://dfmsysri.com/misc/AMD%20DOCS.zip It cover general instructions, sse, optimization techniques, ring 0 system instructions etc. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.