- 7 15 Write An Arm Assembly Language Code Segment That Will Input A Four Bit Binary Variable X Use The 16 Bit Port 1 (43.79 KiB) Viewed 20 times
7. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
7. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port
7. (15) Write an ARM assembly language code segment that will input a four-bit binary variable 'x'. Use the 16-bit port A for your input port. This variable is associated with bits 0 - 3 of port A. The rest of the port's bits are unaccounted for and will float to an unknown value. You must account for this in your code. Once the port is read and adjusted) it will then pass this value into the function: f(x) = x2 + 5x +4 Following the ALU's computation, it will output the binary result to the 16-bit port B. The program will continuously monitor (poll) the input port and update the output port accordingly. Use indirect addressing mode instructions for input and outputs, and arithmetic instructions to solve the problem. You do not need to set up the ports (DDR, Clock, etc.); simply use them as you can assume that they have been taken care of beforehand using a device driver routine. You should refer to the 16-bit ports as PORTA and PORTB in your program.