F453 - low level languages Flashcards
Explain the term opcode
the mnemonic part of the instruction/that indicates what it is to do/code for the operation
What is symbolic addressing?
the use of characters to represent the address of a store location
What is the purpose of the accumulator?
temporary storage (within ALU)
holds data being processed/used during calculations
deals with the input and output in the processor
What is indexed addressing?
uses an index register/IR
…and an absolute address…
…to calculate addresses to be used
What is direct addressing?
the instruction gives the address to be used
What is relative addressing?
allows a real address to be calculated… …from a base address… …by adding the relative address relative address is an offset can be used for arrays can be used for branching
What’s immediate addressing?
used in assembly language
uses data in address field…
… as a constant
Why is it not possible to use only direct addressing in assembly languages?
number of addresses available is limited…
…by the size of the address field
code is not relocatable/code uses fixed memory locations
Explain Mnemonics
a code that is easily remembered…
…used to give the opcode/instruction
e.g. ADD
Explain flow control
the order in which instructions are executed
the order may be changed by a jump
instruction/conditional jump instruction
How and why is the index register (IR) used?
used in indexed addressing
stores a number used to modify an address…
… which is given in an instruction
allows efficient access to a range of memory locations/by incrementing the value in the IR
eg used to access an array
What are the differences between machine code and assembly language?
Machine Code: written in binary or hex no translation needed very difficult to write Assembly language: includes mnemonics includes names for data stores translated by an assembler easier to write than machine code, but more difficult than high level language
What’s the use of an operand, in an assembly language instruction?
address field (in an instruction)
it holds data…
to be used by the operation given in the opcode
eg in ADD 12, “12” is the operand
What’s the difference between direct and indirect addressing?
direct:
the simplest/most common method of addressing
uses the (data in) the address field…without modification
eg In ADD 23, use the number stored in address 23 for
the instruction (accept any valid example)
limits the memory locations that can be addressed *
indirect:
uses the address field as a vector/pointer… to the address to be used
used to access library routines
eg In ADD 23, if address 23 stores 45, address 45 holds the number to be used increases the
memory locations that can be addressed
Describe the term assembly language
a language related closely to the computer being
programmed/low level language/machine specific
uses descriptive names (for data stores)
uses mnemonics (for instructions)
uses labels to allow selection
each instruction is generally translated into one machine code
instruction
may use macros