I need to Store the bytes 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, and 0x0A in ROM, using only ARM Directives (No Instructions). And then allocate a byte of memory for the sum.Then Use ARM instructions to retrieve the values from memory, add the retrieved values together, and store the sum in the byte allocated before. Can someone help me with that please. Thanks
Sounds like a homework question?
Yes Sir, I`ve working for a week on it and got no were, the problem is copying the numbers to the Flash ROM !!!
So have you gone to your teacher for guidance?
Reviewed class notes?
Checked textbooks, documentation, etc ?
i have the instructor notes & textbook opened in front of me and there is nothing explain how to start, also I e-mailed the instructor, and every time his answer refer to his notes & textbook, the problem putting the directive instruction together.
Which tools are you using? Have you looked at any example assembler file?
Are you unsure what directive to use? See DCB:https://developer.arm.com/docs/101754/0614/armasm-legacy-assembler-reference/armasm-directives-reference/dcb
am new to this, yes I know its DCB, but the problem starting the program of how to store the bytes in the ROM.
That's what the DCB directive does.
How are you verifying that your code works? Do you load it to a target? Or use a disassembler (such as fromelf)?
The attached is what I didWEEK 1.pdf
Use this pseudo instruction to set your register to point to the location of SRC (and DST)https://developer.arm.com/docs/101754/0614/armasm-legacy-assembler-reference/writing-a32t32-instructions-in-armasm-syntax-assembly-language/load-immediate-values-using-ldr-rd-constYou may also wish to look at how to encode a loop. See for example:https://developer.arm.com/docs/101754/0614/armasm-legacy-assembler-reference/writing-a32t32-instructions-in-armasm-syntax-assembly-language/block-copy-with-ldm-and-stmI hope this is enough to get you started.
Thank you so much,
View all questions in Arm Compilers forum