Low Level Languages Flashcards

1
Q

Reasons to use HLL

A

Reflects type of problem. Allows use of mathematical functions. Portability. Uses library routines. Complexity of problem. Easy to maintain.

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

Reasons to use LLL

A

Close to design of processor. Can access memory locations directly. Able to program very memory efficient programs which is necessary when the processor has limited memory.

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

Machine Code

A

Binary / hexadecimal notation. Set of all instructions available to the architecture. Depends on the hardware design of the processor. Instructions operate on bytes of data. No translation needed. Very difficult to write.

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

Assembly Language

A

Related closely to the computer being programmed. Low level language so machine specific. Uses descriptive names (for data stores), mnemonics (for instructions), labels to allow branching (selection). Each instruction is generally translated into one machine code instruction. Translated by an assembler. Typically used for writing drivers / easier than mc, but harder than HLL.

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

Registers definition

A

Are locations that provide fast access to data (faster than main memory)…for specific purposes. Used during fetch-execute cycle…when frequent access is needed. Used for temporary storage.

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

Registers why important

A

Low level languages make direct use of the hardware within the CPU so programmers need to know about the registers of the CPU in order to write low level code.

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

Program Counter

A

Contains the address of the next machine code instruction to be executed. During the fetch execute cycle the contents of the PC are copied to the MAR and the PC is incremented. For a jump instruction, the address from the CIR is put into the PC.

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

JUMP instruction

A

When a program is running, the PC will often just be incrementing as it addresses one instruction after the other, e.g. 305, 306, 307. However, the instructions will often modify the next address, for example, 305 becomes 39. – a jump instruction.

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

Current Instruction Reg.

A

The CIR holds the current instruction to be executed, having been fetched from memory.

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

Accumulator

A

Temp storage (in the ALU), holds data being processed during calculations, deals with the input/output in the processor.

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

Index Register

A

Used in indexed addressing, stores a number used to modify the address (in address field), provides an efficient way to access a number of consecutive locations. E.g. used for an array.

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

Opcode

A

The mnemonic part of the instruction, that indicates what it is to do. The code for the operation e.g. ADD

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

Mnemonic

A

A code that is easily remembered…used to give the opcode/command. The operation part of the instruction. Replaced by binary code during assembly.

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

Operand

A

Is the address field in an instruction which holds the data or address to be used. E.g. ADD 12, “12” is the operand.

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

Flow Control

A

The order in which instructions are executed. The order may be changed by a jump instruction / conditional jump instruction

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

Addressing of memory

A

Addressing modes - different methods that a processor can use to calculate the memory address of the instruction being processed or the data being operated on.

17
Q

Immediate

A

Is when data in the operand is the value to be used by the operator. E.g. ADD #24 adds the value 24 to the value in ACC.
Very useful to carry out instructions involving constants (as opposed to variables).

18
Q

Direct

A

Uses data in the operand as the address of the data. This address is where data can be found or is to be written to (without modification). It uses a fixed memory location therefore it is not relocatable. Number of addresses available is limited by the size of the address field.

19
Q

Indirect

A

Uses address field as a pointer to the address to be used. This increases the size of the address that can be used allowing a wider range of memory locations to be accessed. E.g. In ADD (23), if address 23 stores 45, address 45 holds the number to be used. Used to access library routines.

20
Q

Relative

A

Allows a real address to be calculated…by adding a base address…to the operand. Relative address is an offset. Can be used for arrays. Can be used for branching.

21
Q

Indexed

A

Modifies the address given…by adding the number…from the index register…to address in instruction.
Use: addressing items in an array. Easy to alter the index register, easy to access a range of memory locations (eg for an array), only the base address needs to be changed if array is relocated in memory.

22
Q

Symbolic

A

The use of characters to represent the address of a store location e.g. using a register: STA, R2; store the contents of the accumulator in R2.