Hello,
This is my first post so please bear with me if I'm missing any information. I've just started learning the ARM language and am using Keil microVision5 currently. At the minute, I'm not too familiar with how to use ASCII codes. I know
LDR r1, = '1' will store the ASCII code for '1', which is 31, into register 1.
R1 0x00000031. But how I do re convert this back to it's numeric value, '1'?
To put it simply, let's say I have a number, 108, and I store each of these integers into three separate registers. I want to store this number, 108, into a single register, r0.
LDR r1, '1' or 0x00000031 LDR r2, '0' or 0x00000030 LDR r3, '8' or 0x00000038
So r0 should be 0x0000006C.
Thank you
See: www.keil.com/.../
Also: www.scss.tcd.ie/.../03-ARMAssemblyLanguage.pdf - page 14.
Why are you doing this in Assembly language?
As noted above, if you really must do it in Assembly language, then you must spend some time to properly learn tha language.
"I then tried using hexadecimals"
If the number is too big, then it will make no difference how you represent it!
Whether you represent it in decimal, hex, binary, octal, or even Roman Numerals, it remains the same number - so it remains too big!
"Also: www.scss.tcd.ie/.../03-ARMAssemblyLanguage.pdf - page 14"
Hmmm .... it seems that very course has an assignment on this - due in Week 3!
www.scss.tcd.ie/.../3d1.html
www.scss.tcd.ie/.../AsciiConversion.s