Assembly Language Flashcards

1
Q

Registers

A

highspeed storage locations within the processor

* store data that the program is operating on

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

MIPS has

A

32 registers for internal data
* each has 32 bits of storage
* 32 bits of storage
32 separate registars for floating point values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

memory is implemented using

A

the computer systems main memory

  • separate chips than processor chip
  • also uses processor cache memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

the programmer moves data back and forth between

A

the registars and memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

memory in mips

A
large array of bytes
* 8 bits
* index of byte in array = memory address
large array of words
* 32 bits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Bytest with addressess 4n, 4n+1, 4n+2, 4n+3 constitute

A

the word with memory address 4n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Each mips instruction specifies a

A

single, simple operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Basic arithmetic operations have

A

3 operands

  • destination(where result goes)
  • 2 source operands(second sometimes given as numeric constant)
  • must be registars
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

.data

A

assembler directive

  • what follows will be more assembler directives
  • storage allocated following this is allocated consecutively
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

.word

A
  • asks assembler to allocate a word of memory

* gives an integer value for initializing the contents of that word

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

labels

A

assembler associates the name with the memory address of the allocated word

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

to read an integer from the simulated console

A

put the integer 5 into $v0 before using syscall

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

to output an integer to the simulated consoled

A

put the integer 1 into $v0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the registars $a0 through $a3

A

are used for passing arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

outputting a string

A

put the integer 4 into $v0 and the starting memory address of the string into $a0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ascizz assembler directive

A

defines a string

  • one byte of storage for each character
  • initialize each byte with the corresponding ascii binary code
  • terminates string with byte containing 0
17
Q

slt

A

stores 1 into the first operand if the value of the second operand is less than the third operand, otherwise 0