當我等待減法的結果出現時,會出現這個問題,但是它會顯示出0.不是x-a,因爲我希望它會。 .data
strin: .asciiz "type two integers\n\n\n"
strout: .asciiz "the result of the substract is:"
a: .word 0
x: .word 1
.text
main:
li $v0,
我想了解我的CS類的MIPS彙編語言。我正努力在語法上試圖編寫這個程序。我看了我的教授給我們的另一個例子,我緊緊跟隨它。我在我的分支上遇到了一個不對等的錯誤。代碼如下。 # Main program that will call subroutine fib to calculate the fibonacci and
# print the result
.text
.globl main
我正在一個類項目,我想要做什麼,請求theuserfor 2整數,當消息提示「請輸入一個整數:」和alsoto輸入一個彈出消息「請輸入操作員(+,*, - ,/)」的字符。有人可以看看這個代碼,並告訴我我做錯了什麼?第一條指令打印出來,但是我得到了一個帶有字符輸入的錯誤消息。 真的很感激 .data
prompt: .asciiz "Please enter an integer\n"
mes
如果我做了一個I/O系統調用或更多,當我完成時,我應該做一個退出調用(代碼10)或不需要? 我打一個比方: .data
input_message: .asciiz "\nEnter an integer: "
.text
.globl main
main:
li $v0, 4
la $a0, input_message