Course Solutions Uncategorized (Solved) : Given Code Name Studentid Data Must Use Accurate File Path File Paths Mars Relative Marsja Q35718103 . . . .

(Solved) : Given Code Name Studentid Data Must Use Accurate File Path File Paths Mars Relative Marsja Q35718103 . . . .

 

(a) Using the template fileIO.asm as a starting point, write a MIPS procedure readfile that takes as its argument the address

the given code is:

#name:

#studentID:

.data

#Must use accurate file path.

#file paths in MARS are relative to the mars.jar file.

# if you put mars.jar in the same folder as test2.txt andyour.asm, input: should work.

input: .asciiz “test2.txt” #used as input

output: .asciiz “copy.pgm” #used as output

buffer: .space 2048 # buffer for upto 2048 bytes

.text

.globl main

main:

la $a0,input #readfile takes $a0 as input

jal readfile

la $a0, output #writefile will take $a0 as file location

la $a1,buffer #$a1 takes location of what we wish to write.

jal

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post