Assembly Study Guild

21 flashcardspar Justin
Réviser ces flashcardsGratuit · répétition espacée · iPhone, Android, Mac et web

Toutes les cartes

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)
Réviser les 21 cartes gratuitement

Plus de flashcards

Common Prefixes78 cartesMédecine et santé · AnglaiskaikaiPain/Sedation60 cartesMédecine et santé · AnglaisMadiChem I Test 248 cartesSciences · AnglaisgardneaeEthics Midterm 138 cartesAnglaisAmberNumbers31 cartesLangues · LituanienflynnpaulWashington Driver's Guide26 cartesMédecine et santé · AnglaisB_WWeek 4: Prescrption Drugs C/N/B21 cartesLangues · Anglais → IndonésienVictorPrecalculus volume formulas16 cartesLangues · Espagnol → GrecMochiPeriodic Trends: Practice Problems13 cartesSciences · AnglaisvanniMetric Prefixes10 cartesAnglaisACFVocabolario italiano-russo (C1 P2)230 cartesLangues · Italien → Russeanya€Chemistry: Electron Configurations107 cartesSciences · AnglaisIsmat

Révise ces decks dans l’app

Gratuit sur iPhone, Android, Mac et le web. Ajoute n’importe quel deck à ton compte en un tap.

Télécharger dans l’App StoreDisponible sur Google Play
Réviser les 21 cartes gratuitement