Skip to content
Permalink
0748cb0de1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
22 lines (18 sloc) 505 Bytes
# CSE 3666 Lab 2
.globl main
.text
main:
# use system call 5 to read integer
addi a7, x0, 5
ecall
addi s1, a0, 0 # copy to s1
# TODO
# Add you code here
# reverse bits in s1 and save the results in s2
# print s1 in binary, with a system call
# print newline
# print s2 in binary
# print newline
# exit
exit: addi a7, x0, 10
ecall