flat assembler
Message board for the users of flat assembler.
Index
> Main > What's the difference between passing "integer" an |
Author |
|
shoorick 03 Dec 2007, 05:57
ADD EAX, 0A is incorrect. You have to write like this: 0xA or 0AH to present hex numbers. then 10 will be 10, and 10H will be 16.
|
|||
03 Dec 2007, 05:57 |
|
kohlrak 03 Dec 2007, 06:27
I can't use AD... Never even heard of it. Must've been a typo on some one's part.
|
|||
03 Dec 2007, 06:27 |
|
SomeoneNew 03 Dec 2007, 06:46
My bad, I meant ADD and also forgot the H - My question still unanswered though
_________________ Im new, sorry if I bothered with any stupid question |
|||
03 Dec 2007, 06:46 |
|
shoorick 03 Dec 2007, 07:11
there is no difference between ADD EAX,10 and ADD EAX,0Ah - it has sense only on prefered readability.
say, if you think about ASC codes of digits, 35h is more clear then 53 as ASCII code of "5", and 0Fh is more clear as mask for lower 4 bits, but if you wish to add 10 - it may appear 10 better then 0Ah, as it is more easy to find "10" in the text then "0A" if you are thinking about "10" |
|||
03 Dec 2007, 07:11 |
|
SomeoneNew 03 Dec 2007, 07:19
Alright then theres no other difference than readability.
I thought there were some conversions going on during compile time... |
|||
03 Dec 2007, 07:19 |
|
LocoDelAssembly 03 Dec 2007, 14:51
Quote:
Well, obviously the conversion is from ASCII to binary, and hex ASCII to binary is faster. Writing all in hex will give you an unnoticable speedup at compilation and the execution time of the program will be the same no matter what number base you have used for your inmmediate operands. |
|||
03 Dec 2007, 14:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.