Chapter 6 Assembly Language Programming Flashcards
What language does the CPU recognize?
The CPU recognizes only machine code
In what kind of format is machine code?
Machine code is in binary format.
What is a machine code instruction?
A machine code instruction is a binary code with a defined number of bits that comprises an opcode and most often one operand.
What is the machine code comprised of?
Opcode - is the portion of a machine language instruction that specifies the operation to be performed
Operand - the data to be processed
Address mode - Stores address
Register addressing
Write an example of a register transfer notation and its meaning?
CU control unit
What other language is a better alternative to machine code for programmers and why?
Assembly language because it helps in writing the program with comments and symbolic names for constants, macros and subroutines can be used more often in the code.
What instructions does the assembly language need to tell the assembler how to convert the code in machine code?
Directives and system calls
What are addressing modes?
Addressing modes are the ways of identifying the value that is to be written to the register.
How are the types of addressing modes identified
Immediate: the value to be used as it is in the instruction
Direct: An address which holds the value to be used in the instruction
Indirect: An address that holds the address of the value to be used in the instruction
Indexed: An address to which must be added what is currently in the Index Register (IX) to get the address that holds the value to be used in the instruction
In an instruction what can the operand be?
<address>
#n is a denary number, when it is direct addressing
</address>
Which are the data movement instructions?
LDM Immediate addressig #n LDR Immediate addressig #n LDD Dierct addressing <address> LDI Indirect addressing <address> LDX Indexed addressing <address> STO Storing the contents of ACC <address></address></address></address></address>
Which are the arithmetic instructions?
ADD Adds the contend of the ACC with the content from the address <address> INC Increases value with 1
DEC
Decreases value with 1
</address>
Which are the comparisons and jumps instructions?
JMP
Jump to address
<address>
CMP
Compare ACC content with register content
<address>
CMP
Compare ACC cotent with n
#n
JPE
Jump to address if previous comparison was true
<address>
JPN
Jump to address if previous comparison was NOT true
<address></address></address></address></address>