# ############################################################### # # Program_03_sample_03.asm # # # # a sample for floating-point multiplication ("mul.s" instruction)# # # # 08/30/2026 # # ############################################################### # .data FIRST_NUM: .float 0.08 SECOND_NUM: .float 0.299 NEW_LINE: .asciiz "\n" MESSAGE_01: .asciiz "The first number: " MESSAGE_02: .asciiz "The second number: " MESSAGE_03: .asciiz "The product of the two numbers is: " .text .globl main main: # load the first fraction number ----------------------- la $a0, FIRST_NUM # load its address lwc1 $f10, ($a0) # load it to $f10 register # load the second fraction number ---------------------- la $a0, SECOND_NUM # load its address lwc1 $f11, ($a0) # load it to $f10 register # display the first number ----------------------------- li $v0, 4 # system call #4 - print a message la $a0, MESSAGE_01 # message_01 syscall li $v0, 2 # system call #2 - print a fp# mov.s $f12, $f10 # copy: $f10->$f12 syscall li $v0, 4 # system call #4 - print a message la $a0, NEW_LINE # new-line syscall # display the first number ----------------------------- li $v0, 4 # system call #4 - print a message la $a0, MESSAGE_02 # message_02 syscall li $v0, 2 # system call #2 - print a fp# mov.s $f12, $f11 # copy: $f11->$f12 syscall li $v0, 4 # system call #4 - print a message la $a0, NEW_LINE # new-line syscall # calculate the product of the two numbers ------------- mul.s $f12, $f10, $f11 # $f12 = $f10 x $f11 # display the product of the two numbers --------------- li $v0, 4 # system call #4 - print a message la $a0, MESSAGE_03 # message_03 syscall li $v0, 2 # system call #2 - print a fp# syscall li $v0, 4 # system call #4 - print a message la $a0, NEW_LINE # new-line syscall jr $31 # quit the program execution # END OF THE LINES #################################################