Assembly Study Guild

21 Karteikartenvon Justin
Diese Karteikarten lernenKostenlos · Spaced Repetition · iPhone, Android, Mac & Web

Alle Karten

1
How would you ADD $t0 to $t1 and make $t2 the sum?
Add $t2, $t0, $t1
2
How would you ADD 5 to $t0 and make $t1 the sum?
Addi $t1, $t0, 5
3
How would you MULTIPLY $t0 to $t1 and make $t2 the product?
Mul $t2, $t1, $t0
4
How would you DIVIDE $t0 by $t1 and make $t2 the quotient?
div $t0, $t1
mflo $t2
5
How would you DIVIDE $t0 by $t1 and make $t2 the remainder?
div $t0, $t1
mfhi $t2
6
How do you exit a program?
li $v0, 10 syscall
7
How would you print a string saved as str?
la $a0, str li $v0, 4
syscall
8
How would you load $t0 to $t1?
move $t1, $t0
9
What does li $v0, 1 syscall do?
Prints an integer
10
What does li $v0, 4 syscall do?
Prints a string
11
What does li $v0, 5 syscall do?
Reads a user given integer
12
Where is a user inputted integer stored?
$v0
13
How do you section off a line to be a comment?
#(comment here)
14
What would the code for declaring a string named str with text "Hello world" be?
str: .asciiz "Hello world"
15
When declaring variables such as strings, words, and spaces, what needs to be before all of it?
.data
16
When executing code such as printing or loading registers or looping, what needs to be before all of it?
.text
.globl main
main:
17
How do you make a loop?
(name of loop):

j (name of loop)
18
What would be the code for exiting a loop when $t0 is equal to $t1?
beq $1,$2, (exit loop name)

(exit loop name):
19
What would be the code for exiting a loop when $t0 is equal to 0?
beqz $t0, (exit loop name) (exit loop name):
20
How would you copy from memory $t2 to register $t1?
lb $t1, 0($t0)
21
How would you copy from register to memory?
sb $t1, 0($t0)
Alle 21 Karten kostenlos lernen

Mehr Karteikarten

Common Prefixes78 KartenMedizin und Gesundheit · EnglischkaikaiPain/Sedation60 KartenMedizin und Gesundheit · EnglischMadiChem I Test 248 KartenNaturwissenschaften · EnglischgardneaeEthics Midterm 138 KartenEnglischAmberNumbers31 KartenSprachen · LitauischflynnpaulWashington Driver's Guide26 KartenMedizin und Gesundheit · EnglischB_WWeek 4: Prescrption Drugs C/N/B21 KartenSprachen · Englisch → IndonesischVictorPrecalculus volume formulas16 KartenSprachen · Spanisch → GriechischMochiPeriodic Trends: Practice Problems13 KartenNaturwissenschaften · EnglischvanniMetric Prefixes10 KartenEnglischACFVocabolario italiano-russo (C1 P2)230 KartenSprachen · Italienisch → Russischanya€Chemistry: Electron Configurations107 KartenNaturwissenschaften · EnglischIsmat

Lerne diese Decks in der App

Kostenlos auf iPhone, Android, Mac und im Web. Füge jedes Deck mit einem Tipp zu deinem Konto hinzu.

Laden im App StoreJetzt bei Google Play
Alle 21 Karten kostenlos lernen