Chapter 14 - Assembly Language Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a mnemonic

A

A mnemonic is a letter representation of machine code

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

What is a numeric code?
Describe 1xx

A

A numeric code consists of 3 characters. ADD’s numeric code is 1xx. The first character is an OP code (which defines the function of mnemonic) and the xx is the operand which describes the memory address/value the OP code functions upon.

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

Instruction: Add

A

Mnemonic: ADD
Numeric code: 1xx
Adds the contents of the memory address to the accumulator

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

Instruction: Subtract

A

Mnemonic: SUB
Numeric code: 2xx
Subtracts the contents of the memory address from the accumulator

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

Instruction: Store

A

Mnemonic: STA
Numeric code: 3xx
Stores the value in the accumulator in the memory address given

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

Instruction: Load

A

Mnemonic: LDA
Numeric code: 5xx
Load the accumulator with the contents of the memory address given.

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

Instruction: Branch (always) (uncondictional)

A

Mnemonic: BRA
Numeric code: 6xx
Branch - always uses the address given as the address of the next instruction (by changing PC).

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

Instruction: Branch if zero

A

Mnemonic: BRZ
Numeric code: 7xx
Branch to the address given if the accumulator is zero

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

Instruction: Branch If Positive

A

Mnemonic: BRP
Numeric code: 8xx
Branch to the address given if the accumulator is zero or positive

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

Instruction: Input

A

Mnemonic: INP
Numeric code: 901
Input into the accumulator

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

Instruction: Output

A

Mnemonic: OUT
Numeric code: 902
Output contents of the accumulator

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

Instruction: Halt

A

Mnemonic: HLT
Numeric code: 0
Stops the execution of the program

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

Instruction: Data

A

Mnemonic: DAT
Numeric code: n/a
Used to indicate a location that contains data.

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

Which LMC instructions allow you to change the Program Counter (PC)

A

Branch (unconditional) - BRA, Branch if zero (conditional) - BRZ, Branch if positive (conditional) - BRP.

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

Addressing mode (overview)

A

The last 2 digits within the operation code (OP code)

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

Addressing mode (detail)

A

intermediate addressing: the operand is the actual value upon which the instruction is to be performed upon

direct addressing: the operand holds the memory address location of the value to be operated upon (only mode available in LMC)

indirect addressing: the operand is the location (typically a register) which holds the address we want - a larger range of accessible locations

indexed addressing: the address of the operand is obtained by adding the contents of a general register (index register) to a constant value. Included in istruction code and used to access arrays with successive order