Question
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
.org 0x80.text
.equ DLY, 2000000
.equ DISP, 0xFF200020
.equ PUSH, 0xFF200050
.global _start
_start:
/* initialize stack pointer */
movia sp, 0x03FFFFFC
/* write to the pushbutton port interrupt mask register */
movia r2, PUSH
movi r3, 0x03
stwio r3, 8(r2)
/* enable Nios II processor interrupts */
movi r3, 0x02
wrctl ienable, r3
movi r3, 1
wrctl status, r3
/* store WAS_INT address to r7
this data signifies if the interrupt happened */
movia r7, WAS_INT...