.data
nhap1: .asciiz "Nhap so thu 1: "
nhap2: .asciiz "Nhap so thu 2: "
tong: .asciiz "Tong = "
hieu: .asciiz " Hieu = "
tich: .asciiz " Tich = "
thuong: .asciiz " Thuong = "
du: .asciiz " So du = "
.text
.globl main
main:
la $a0,nhap1
add $v0,$0,4
syscall
add $v0,$0,5
syscall
add $t0,$0,$v0
la $a0,nhap2
add $v0,$0,4
syscall
add $v0,$0,5
syscall
add $t1,$0,$v0
Tong:
add $t2,$t0,$t1
la $a0,tong
add $v0,$0,4
syscall
add $a0,$0,$t2
add $v0,$0,1
syscall
Hieu:
sub $t2,$t0,$t1
la $a0,hieu
add $v0,$0,4
syscall
add $a0,$0,$t2
add $v0,$0,1
syscall
Tich:
la $a0,tich
add $v0,$0,4
syscall
mult $t0,$t1
mflo $t3
add $a0,$0,$t3
add $v0,$0,1
syscall
Thuong:
la $a0,thuong
add $v0,$0,4
syscall
div $t0,$t1
mflo $t3
add $a0,$0,$t3
add $v0,$0,1
syscall
la $a0,du
add $v0,$0,4
syscall
mfhi $t3
add $a0,$0,$t3
add $v0,$0,1
syscall
No Comment to " Tính Cộng Trừ Nhân Chia Trong MIPS "