Chapter 2 : Assembly Language Flashcards
What is the characteristics of Assembly Language? ( 4 )
- Low level programming language
- Uses registers
- Execution follows top down approach
- Performs fast execution
What is a register?
- Small permanent storage space within a CPU
- Data is stored temporary
What is the size of data inside registers? ( 2 )
- Bit
- Byte
What is the uses of register?
- Use to hold data / instruction
- Use to store operation / method / function
- Use to handle data / operation
List out types of Register ( 2 )
- GPR / UVR
- General Purpose Register
- User Visible Register
- SPR / UIR
- Special Purpose Register
- User Invisible Register
List out Registers that are inside General Purpose Register / User Visible Register ( 7 )
- AX ( Accumulator Register )
- BX ( Base Register )
- CX ( Counter Register )
- DX ( Data Register )
- BP ( Based Pointer Register )
- SI ( Source Index Register )
- DI ( Destination Index Register )
List out Registers that are inside Special Purpose Register / User Invisible Register ( 5 )
- IR ( Instruction Register )
- PCR ( Program Counter Register )
- MAR ( Memory Address Register )
- MDR ( Memory Data Register )
- SR / PSW / CR / FR ( Status Register / Program Status Word / Control Register / Flag Register )
What is the use cases for Accumulator Register? ( 3 )
- To hold values temporary
- To hold intermediate values ( ( a * b ) - ( c + d ) )
- To handle + and - ( Arithmetic Operation )
What is the use cases for Base Register? ( 2 )
- To hold base values
- To handle base values
What is the use cases for Counter Register ?
- To count repeated or loop values
What is the use cases for Data Regiater ? ( 2 )
- To hold data
- To handle * and /
What is the use cases for Base Pointer Register?
- To handle base pointer values ( pointer values - addresses )
What is the use cases for Stack Pointer Register?
- To handle stack address
- Follows Last In First Out
What is the use cases for Source Index Register?
- To handle source index values
- int b[3] = -10, 20 , 30
[3] means the variable b can store 3 element
[3] have an index of 3
b[0] = -10 , b[1] = 20 , b[2] = 30
- It is also called as arrary
What is the use for Destination Index Register?
- Follows in the Index
a[2] = b[0] + c[1]
What is the use for Instruction Register?
- To indicate the current operation / instruction
Instruction Register is also known as what? ( 2 )
- Dedicated Register
- High Speed Register
What is the use of Program Counter Register?
- To indicate the next instruction addresses
Program Counter Register is also known as what?
- Instruction Pointer Register
What is the use of Memory Address Register?
- To hold memory addresses only
What is the use of Memory Data Register?
- To hold memory data
Memory Data Register also known as what?
- Memory Buffer Register ( MBR )
What is the use for Status Register / Program Status Word / Control Register / Flag Register?
- To indicate the status of CPU
- To check whether any internal or external error happends
- Always indicate by 0 or 1
List out the Flags that Flag Register used ( 6 )
- Sign Flag
- Zero Flag
- Parity Flag
- Carry Flag
- Half-Carry Flag
- Overflow Flag