flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
shoorick
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.
|
|||
![]() |
|
kohlrak
I can't use AD... Never even heard of it. Must've been a typo on some one's part.
|
|||
![]() |
|
SomeoneNew
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 ![]() |
|||
![]() |
|
shoorick
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" |
|||
![]() |
|
SomeoneNew
Alright then theres no other difference than readability.
I thought there were some conversions going on during compile time... |
|||
![]() |
|
LocoDelAssembly
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. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.