1.2.4 Types of Programming Language Flashcards

LMC Only

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

What is the instruction for ADD?

A

Add

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

What is the instruction for SUB?

A

Subtract

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

What is the instruction for STA?

A

Store

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

What is the instruction for LDA?

A

Load

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

What is the instruction for BRA?

A

Branch Always

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

What is the instruction for BRP?

A

Branch If Positive

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

What is the instruction for BRZ?

A

Branch If Zero

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

What is the instruction for INP?

A

Input

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

What is the instruction for OUT?

A

Output

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

What is the instruction for HLT?

A

Halt

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

What is the instruction for DAT?

A

Data

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

What is the mnemonic for add?

A

ADD

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

What is the mnemonic for Subtract?

A

SUB

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

What is the mnemonic for Store?

A

STA

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

What is the mnemonic for Load?

A

LDA

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

What is the mnemonic for Branch Always?

A

BRA

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

What is the mnemonic for Branch If Zero?

A

BRZ

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

What is the mnemonic for Branch If Positive?

A

BRP

19
Q

What is the mnemonic for Input?

A

INP

20
Q

What is the mnemonic for Output?

A

OUT

21
Q

What is the mnemonic for Halt?

A

HLT

22
Q

What is the mnemonic for Data?

A

DAT

23
Q

What is the code for Add?

A

1XX

24
Q

What is the code for Subtract?

A

2XX

25
Q

What is the code for Store?

A

3XX

26
Q

What is the code for Load?

A

5XX

27
Q

What is the code for Branch Always?

A

6XX

28
Q

What is the code for Branch If Zero?

A

7XX

29
Q

What is the code for Branch If Positive?

A

8XX

30
Q

What is the code for Input?

A

901

31
Q

What is the code for Output?

A

902

32
Q

What is the code for Halt?

A

0

33
Q

What do X’s in codes identify?

A

The memory address the action is to be done on.

34
Q

What does ADD do?

LMC

A

Adds the contents of that memory to the accumulator.

Addition

35
Q

What does SUB do?

LMC

A

Subtract the contents of that memory to the accumulator.

Subtract

36
Q

What does STA do?

LMC

A

Stores the value of the accumulator in the address given

Store

37
Q

What does LDA do?

LMC

A

Load the accumulator with the contents of the memory address given

Load

38
Q

What does BRA do?

LMC

A

The given address is the location of the next instruction.

Branch Always

39
Q

What does BRZ do?

LMC

A

Branch to the given address if the value of the accumulator is zero

Branch if Zero

40
Q

What does BRP do?

LMC

A

Branches to the given address if the value of the accumulator is positive or zero

Branch if Positive

41
Q

What does INP do?

LMC

A

Inputs a number into the accumulator

Input

42
Q

What does OUT do?

LMC

A

Outputs the contents of the accumulator

Output

43
Q

What does HLT do?

LMC

A

Stops the execution of the program

Halt

44
Q

What does DAT do?

LMC

A

Indicate the location that contains data (essentially a variable)

Data