We are using ARM200 to learn assembly language. I have a portion of memory with 32 integers filling it. I need to be able to print out these 32 integers to the screen. I can print out numbers 0 - 9 easy enough just by adding the ASCII value of the number 0 to what is in the register, but I'm very confused how you print out numbers greater then 9.
Print LDR r5, [r2] ;load whats in that part of memory to r5.
CMP r5, #9 ;compare if number is greater or less then 9
ADDLE r0, r5, #"0" ;add value in array to ascii value of 0 to print
SWI SWI_WriteC ;Print Value
ADD r6, r6, #1 ;increment counter
ADD r2, r2, #4 ;move portion of memory to the next int.
CMP r6, #32 ;check if you are done printing 32 ints
BNE Print ;if not loop back up to print
MOV pc, r14 ;return
r0 is the register used for printing and r2 points to the location in memory for all the integers. r5 is what i put the value from memory into and r6 is used for a counter.
Yes i do realize that there is 4 bytes of space in between each number in memory, but this does not matter for this project.