Summary:: I have a homework " Write a program to input a number from the keyboard, printing the above screen on base 16 (hexadecimal) system". But I don't know how it works. I find it on the Internet but it only have convert from base system 10 to base system 16. And it is written in assembly language on QT spim.
newline: .asciiz "\n" .text .globl main main: #print string mgs1 li $v0, 4 la $a0, mgs1 syscall #Get input from user and save li $v0, 5 syscall move $t0, $v0 # Math: I didn't how to do !!! #print mgs2: li $v0, 4 la $a0, mgs3 syscall #Print answer: I don't know what to do here #Print \n: li $v0,4 la $a0, newline syscall li $v0, 10 #exit syscall
Last edited by a moderator: