## EEC 170 Lab 1
## Your Name
## Last Four Digits of SID
## EEC 170
Copyright By PowCoder代写 加微信 powcoder
## Fall 2022
encipher_str: .string “Ciphertext: ”
decipher_str: .string ” Plaintext: ”
newline: .string “\n”
cText: .byte 0x61 0x4f 0x2c 0x50 0x6d 0x02 0x75 0x7f 0x2c 0x51 0x51 0x4f 0x2c 0x3d 0x43 0x3c 0x00
.globl main # make main available to all project files
main: # There should be one main
addi s0, zero, 0xC # k = 12
la a1 encipher_str # Load address to “Ciphertext: ” string
la a2 cText # Load address to cText string
jal ra, print_msg # Print “Ciphertext: cText”
# Rest of your program goes here
jal zero, exit # Exit program
print_msg: # prints “%s%s\n”
addi a0, zero, 0x4 # Setup ecall for print string
ecall # ecall first string
add a1, a2, zero # print secondary string
ecall # ecall second string
la a1 newline # print newline string
ecall # ecall newline string
jalr zero, ra, 0x0 # return
addi a0, zero, 0xA # Setup exit ecall
ecall # ecall to exit
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com