Radix on imul 86

Résolu/Fermé
dina - 16 mai 2015 à 10:40
 dina - 16 mai 2015 à 23:20
Bonjour,
I want to know if radix change the contenu of data segment or not
I have written
D1 db 'ceci'
.radix
D3 dw 30,260D,1234,11011b
Adr dw D1


So I have remarqued that he transformed it on hexa .
And when I wrote mov bx, adr l have found that he put the deplacement of D1which is 0000 and the number D1 on hexa. Why?!!!!!!!!
I will be really satisfied if you answer me.
Thanks very much.


A voir également:

1 réponse

Sugel Messages postés 4076 Date d'inscription jeudi 18 août 2011 Statut Membre Dernière intervention 19 juin 2017 725
Modifié par Sugel le 16/05/2015 à 22:49
Hey !

You're on a french speaking forum, you should ask your question again elsewhere. I'll try to answer btw.

Let's read some documentation:
http://vitaly_filatov.tripod.com/ng/asm/asm_007.106.html

as that document reads, it changes the radix of your inputs left without suffix specifying it.

You should write something like
.radix 16
for hex
or
.radix 10
for decimal
or even
.radix 2
for binary

I'm not that good at asm, but it looks like your code isn't correct as you don't provide any arg to .radix
It might be an undefined behavior.

To sum up, with
.radix 16
, 10 will be understood as 16 in decimal, but as 10 in decimal with
.radix 10
, so that the content of the compiled data segment will be different (provided there are suffix-less numbers).

Remember to post on a forum where people speak english ;-)

------------------------------------------------------------------------------------
"La peur mène à la colère. La colère mène à la haine. Et la haine ... mène à la souffrance." - Yoda
0
Comment je vous remercie la réponse convient à ce que j'ai posee. Je peut écrire en français et aussi en engrais. désolée si j'ai pas accepté la langue,et merci beaucoup pour la morale.
0