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
List out the Tools of Assembly Programming Tools ( 3 )
- TASM ( Turobo Assembler )
- MASM ( Microsoft Assembler )
- NASM ( Linux Assembler )
- SASM
How to clear the screen in terminal ?
- cls
How to do compilation ?
- TASM 3FEB.ASM ( File Name )
How to link the program?
- TLINK 3FEB
How to edit the file in TASM?
- EDIT 3FEB.asm
Is TASM case sensitive?
- No
What is the file format for TASM?
- .asm
After linking the program, what should I do?
- dir 3FEB
What will the file generated after linking?
- .obj
- .exeH
- .map
How to execute the file?
- 3FEB
- Just the file name
What is the first code for TASM?
.model small
- Can be small , medium , large
- To create a program memory
How to create a stack to hold data and code in the memory?
.stack 100h
What code to add to indicate that the actual coding starts?
.code
What code to add to indicate the main procedure starts?
MAIN PROC
What is translators?
- Translates from source to machine understandable language
When are translators called?
- Program Execution
List out the examples for translator ( 3 )
- Compiler
- Interpreters
- Assemblers
What is compilers?
- A type of translators which translate source code into intermediate object code ( object code )
List out characters that compiler compiles into ( 3 )
- Symbols
- Letters
- Numerical
What is the instruction level for Compilers?
- High level instruction
What is the flow of execution of compilers? ( 2 )
- Top-down Approaches
- Perform the translation all at once
List out the example of compiler ( 4 )
- C Compiler
- C++ Compiler
- Java Compiler
- Python Compiler
What is the flow of execution of interperters?
- Line-by-line Translation
- Differ from compiler which compiler translates all code at once
What type of translators which translates high-level instruction into machine understandable format?
- Interpreters
Which translator ( Compiler / Interpreter ) translates faster?
- Compiler
List out the example of Interpreters ( 2 )
- Java Interpreter
- Python Interpreter
Compiler is what ( POP / OOP )
- POP ( Procedure Oriented Programming )
Interpreters is what ( POP / OOP )
- OOP ( Object Oriented Programming )
What is assemblers?
- Type of translators which translates low level instruction into machine understandable format
What is the flow of execution of assembler?
- Perform translation all at once
List out the example of assembler ( 4 )
- TASM
- MASM
- NASM
- SASM
What is Linker?
- One of the sub-translators or internal translators which translates object code into machine understandable format such as exe file and MAP file
List out the examples of Linker ( 3 )
- Tlink
- Mlink
- Nlink