Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

KHOA CÔNG NGHỆ THÔNG TIN

TRƯỜNG ĐẠI HỌC KHOA HỌC TỰ NHIÊN


227 Nguyễn Văn Cừ, Phường 4, Quận 5, TP.HCM 4.0
Điện thoại: (08) 38.354.266 – Fax: (08) 38.350.096

CTT10009 – COMPUTER SYSTEM

Homework 2
HW2: MIPS assembly programming

I. Information:

Code: HW2
Deadline nộp bài:
Form of submission: Individual
Tool to submit: Moodle
Suppervisor:
Email

II. Outcome

After this exercise you will reach to:


• G4.1: Explain the MIPS-32bit architecture design point of view.
• G4.3: Be able to understand and use assembly language to program in MIPS-32 bits
platform in advanced (using stack, array and loop)
III. Describe

A. Write an assembly program (using MARS tool) to adopt these requirements:


1. Input an unsigned integer N (32bit)
2. Caculate the sum of all elements from one to N
3. Print the result on screen
Ex:
Input N: 3
Result: 6

B. Write an assembly program (using MARS tool) to adopt these requirements:


4. Input a string
5. Print the reverse representation of the input string
Ex:
Input: hello
Result: olleh
IV. Submission requirement:

1. Report student_ID.pdf is included:


a. Your idea: writing in mindmap/ workflow form/ peseudo code
b. The result when you run your program (capture the screen)
2. Source code: student_ID_baiA.asm, student_ID_baiB.asm
3. Please zip all files and submit to moodle site with the name Student_ID.zip

You might also like