Preview

02 - Assembly Language

 1. Assembly language instruction sets will be specified by your exam board. There is only one global instruction set that is used for all CPUs.
Example of instruction set command and description
-------------------------------------------------------------

LDR Rd, <memory ref>    : Load the value stored in the memory 
                          locationspecified by <memory ref> into 
                          register d.

  FALSE

  TRUE

 2. There are different types of mnemonics in any given instruction set. For example. A______, Data transfer, Logic, Jump and Miscellaneous mnemonics.

  Ample

  Arithmetic

  Adder

  Ardous

 3. AND, OR, XOR and NOT are examples of:

  jump mnemonics

  data transfer mnemonics

  logic mnemonics

  arithmetic mnemonics

 4. MOV, POP, IN and OUT are examples of:

  data transfer mnemonics

  jump mnemonics

  arithmetic mnemonics

  logic mnemonics

 5. JZ is a jump mnemonic and it means jump if you have reached the last (i.e. 'z') register in the CPU.

  FALSE

  TRUE

 6. Analyse the code below. Which of these lines is not executed?
assembly_language_code_example_1.png

  Line 5

  Line 4

  All of these lines are executed

  Line 6

 7. An addressing mode refers to how you are addressing memory in a given location.

  TRUE

  FALSE

 8. ______________ is called that because the value to be stored in memory immediately follows the operation code in memory

  Non addressing

  Direct addressing

  Immediate addressing

  Indexed addressing

 9. The purpose of the accumulator is to provide permanent ROM storage. It holds data that is being processed and stores it securely.

  TRUE

  FALSE

 10. This instruction uses immediate addressing because the accumulator will be ____________________________.
MOV A,#30h

  moved to location 30h with the data 'A' placed in this label

  loaded with the value that does not immediately follow, and then is placed in location 30h

  loaded with the value that immediately follows; in this case 30 (hexadecimal).

  loaded with the address location and then added to 30 which is in the accumulator

 11. Immediate addressing is very slow since the value to be loaded is not included in the instruction.

  FALSE

  TRUE

 12. What is symbolic addressing?

  the use of numbers to represent the number held in the accumulator

  the use of characters to represent the address of a store location

  None of these options are valid answers

  the use of the letter 'S' to indicate that the number will be stored in a register

 13. Direct addressing is called this because the value to be stored in memory is obtained by directly retrieving it from another memory location. For example: MOV A,30h

  TRUE

  FALSE

 14. This type of addressing uses a second register (known as the base register) which holds the actual memory address that the program is interested in

  labelled addressing

  direct addressing

  indirect addresing

  mnemonic addressing

 15. This instruction will read the data out of RAM address 30 (hexadecimal) and store it in the accumulator
MOV A,30h

  FALSE

  TRUE

 16. This piece of code loads the accumulator with the value 40. The accumulator is then increased by one and tested against the number 46. If the accumulator is _________________.
LDA #40
label1:
INC
CMP #46
BLT label1
STO 1024

  equal to 46 (CMP means equal) and then branch to label1,storing 1024+40 to the accumulator

  less than 46 then you jump to the label1 so that the accumulator continues to increment

  more than 46 then you jump to the label1 and continue incrementing the accumulator

  less than 46 then you jump to the label1 to keep incrementing the accumulator.

 17. One feature of assembly language is flow control. Which of the following statements in regard to this is true?

  All of the listed options are true with regard to flow control

  the order may be changed by a jump instruction/conditional jump instruction

  The order in which instructions are executed is flow control

  flow control is important because order of instructions is important

 18. Match the description to the correct instruction.
Add one to the accumulator 

  BLT label1

  CMP &34

  INC

  DEC

 19. Match the description to the correct instruction.
Compare the accumulator against the hexadecimal value of 34 and store the details in the status register

  BLT

  CMP &34

  BLT label1

  INC

 20. Match the description to the correct instruction.
Move the contents of register R1 into register R2

  MOV R1 AND R2 INC

  MOV #R1 LOAD #R2

  MOV R1, R2

  MOV R1 LOAD #R2