Question
For this project, you'll use the subset of ARM instruction provide by the VisUAL emulator (download the zip at this address and extract to use
For this project, you'll use the subset of ARM instruction provide by the VisUAL emulator (download the zip at this address and extract to use the emulator) to implement the algorithms given below in ARM assembly language. You'll submit your ARM assembly language programs through Canvas as a ZIP file. The programs that you will translate into ARM instructions are shown below. A user guide for the VisUAL emulator is found here. The remainder of the document is some useful information regarding the ARM assembly language.
Useful notes:
The ARM instruction set supported by the VisUAL emulator The complete set of ARM instructions supported by the VisUAL emulator is shown in Appendix 1 of this document. The purpose of this document is to provide some guidance as to how to use the instruction set in your project responses. There are a few general categories of ARM instructions that you'll need to use: data transfer instructions: These instructions move data from one location to another. MOV and MVN: move data between registers and also allow you to move immediate values into a register. Note immediate values must be preceded with a # character (MOV R0, #10, which moves the value 10 into register zero). LDR and STR: the load and store instructions, which move data between memory and the registers. The standard way the instructions are used is to have the target address in a register. To load an address into a register, the LDR pseudo-instruction is used: LDR R2, =count LDR R7, [R2] This code places the memory address represented by the label count into register two (first instruction), then loads the value in the memory location at count into register seven (second instruction). arithmetic and logic instructions: these instructions perform the standard arithmetic and logic operations on data in registers (and immediate data). These are three operand instructions and the first two must be registers, while the third may be immediate. testing instructions: this instruction (particularly CMP, TST, and TEQ) are described in Appendix 2. They are arithmetic/logic instructions which do not store their result (and so have only two operands). They have used two test conditions. branch instructions: the VisUAL emulator supports only the B and BL (branch and link instruction that can be used for procedure calls). Both are by default unconditional, but can be made conditional as described in Appendix 2. data directives: The EQU, DCD, FILL, and END instructions are not machine instructions but tell the emulator how to interpret names (the first three) and when to stop (the last). EQU creates named constants that can be used anywhere an immediate on address can be used. DCE allows the initialization of a sequence of memory locations (by default, 32-bit integers). FILL allows the reservation of n bytes of uninitialized memory locations. There are a couple of common translations from the high-level language constructs (if, if-else, while) you are used to and assembly language instructions. Some examples are shown below:
Another important aspect of ARM assembly to understand for this project, are the addressing mode. As seen above, the programs use a simple, register indirect addressing mode. To deal with data in an array, one of the indexing modes needs to be used. The most straightforward is the post-indexed form, as shown in this example:
ldr R2, =var
ldr R3, [R2], #4
Appendix 1:
In this code, the address of a label var (assumed to be the beginning of a block of integers) is placed in register two by the first instruction. The second instruction loads the value in that address indirectly through register 2 into register 3 and the increments register 2 by four, moving the address in R2 to point to the next integer.
This is a copy of the page https://salmanarif.bitbucket.io/visual/supported_instructions.html from the official VisUAL emulator website https://salmanarif.bitbucket.io/visual/index.html for your convenience. The complete User Guide for the VisUAL emulator can be found at https://salmanarif.bitbucket.io/visual/user_guide/index.html. List of Supported Instructions VisUAL supports a small subset of ARM UAL instructions.
int vals - [1, 2, 3, 4. 5, 6, 7, 8, 9, 10; int [) results-new int[10]: int num1 36; int num2 54; int count = 0; int bnd 10; while ( num! != num2 ) { while(numi>num2) num1 num1 - num2 ; while (countStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started