Also meine Frage ist, wie behebe ich diesen Fehler. Ist es die Struktur meines Programms? oder wie ging ich mit den Registern um?Absturz wegen ungültigem Programmzähler
#JTWILKI - Just The Way I Like It Cooking Assistant
# Created By: Samuel Buzas
#For CS2028 Sect.002
.data
preface: .asciiz "Place you Steak in the oven, and kick back. I'll take care of the rest! \n"
RED: .asciiz "Steaks Not Ready Yet Come Back Soon! \n"
YELLOW: .asciiz "Get Ready to Eat!! \n"
GREEN: .asciiz "Were Ready to Go!!! \n Get The Steak Out Now, Before it Burns!\n"
BROWN: .asciiz "Quick It's Starting to Burn!! \n Take it Out!!! \n"
BLACK: .asciiz "So how about Soup? \n"
.text
main:
# Tell User the program is starting
li $v0, 4
la $a0, preface
syscall
# Pause for 10 seconds while users places steak in oven, handy MARS Feature
li $v0, 32
la $a0, 10000
syscall
#Display message,Start Cooking
j red
addi $s1, $zero, 150000 # Tihs is 2 min 30seconds
addi $s0, $zero, 0
#Start The cooking Loop
jal loop
loop: beq $s1,$s0,exit # Exit if t9 == t1
bge $s0, 120000, yellow # If 30secs from being ready, print yellow warning
#Otherwise, Increment
addi $s0, $zero, 1000
#Pause for 1 sec
#li $v0, 32
#la $a0, 1000
#syscall
j loop
exit:
#Display message, Cooking complete
jal green
#Wait 30 Seconds, then overcooking
li $v0, 32
la $a0, 30000
syscall
#Now overcooked
jal brown
#Wait another 30 seconds
li $v0, 32
la $a0, 30000
syscall
# Now its burned
jal black
# Terminate Program
li $v0, 10
syscall
#Progress Update Functions
red:
li $v0, 4
la $a0, RED
syscall
jr $ra
yellow:
li $v0, 4
la $a0, YELLOW
syscall
jr $ra
green:
li $v0, 4
la $a0, GREEN
syscall
jal beep
jr $ra
brown:
li $v0, 4
la $a0, BROWN
syscall
jr $ra
black:
li $v0, 4
la $a0, BLACK
syscall
jr $ra
beep:
li $v0, 31
li $a0, 112
li $a1, 2000
li $a2, 10
li $a3, 100
syscall
jr $ra
Wirklich neu in Assembler Sprache, so verstehe ich nicht den Fehler. – Applesausce
Wäre hilfreich, wenn Sie den Code in seiner Gesamtheit ohne die ganze Formatierung veröffentlichen und Kommentare anstelle von Titeln verwenden würden, damit ich ihn kopieren und einfügen und ausführen kann. – user1274820
Yeah Mips tat nicht sehr gut in der Code-Snippet, Heres eine Pastebin – Applesausce