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
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,