Chapter 2 : Assembly Language Flashcards

1
Q

What is the characteristics of Assembly Language? ( 4 )

A
  1. Low level programming language
  2. Uses registers
  3. Execution follows top down approach
  4. Performs fast execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a register?

A
  1. Small permanent storage space within a CPU
  • Data is stored temporary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the size of data inside registers? ( 2 )

A
  1. Bit
  2. Byte
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the uses of register?

A
  1. Use to hold data / instruction
  2. Use to store operation / method / function
  3. Use to handle data / operation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List out types of Register ( 2 )

A
  1. GPR / UVR
    • General Purpose Register
    • User Visible Register
  2. SPR / UIR
    • Special Purpose Register
    • User Invisible Register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

List out Registers that are inside General Purpose Register / User Visible Register ( 7 )

A
  1. AX ( Accumulator Register )
  2. BX ( Base Register )
  3. CX ( Counter Register )
  4. DX ( Data Register )
  5. BP ( Based Pointer Register )
  6. SI ( Source Index Register )
  7. DI ( Destination Index Register )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List out Registers that are inside Special Purpose Register / User Invisible Register ( 5 )

A
  1. IR ( Instruction Register )
  2. PCR ( Program Counter Register )
  3. MAR ( Memory Address Register )
  4. MDR ( Memory Data Register )
  5. SR / PSW / CR / FR ( Status Register / Program Status Word / Control Register / Flag Register )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the use cases for Accumulator Register? ( 3 )

A
  1. To hold values temporary
  2. To hold intermediate values ( ( a * b ) - ( c + d ) )
  3. To handle + and - ( Arithmetic Operation )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the use cases for Base Register? ( 2 )

A
  1. To hold base values
  2. To handle base values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the use cases for Counter Register ?

A
  1. To count repeated or loop values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the use cases for Data Regiater ? ( 2 )

A
  1. To hold data
  2. To handle * and /
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the use cases for Base Pointer Register?

A
  1. To handle base pointer values ( pointer values - addresses )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the use cases for Stack Pointer Register?

A
  1. To handle stack address
  • Follows Last In First Out
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the use cases for Source Index Register?

A
  1. 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the use for Destination Index Register?

A
  1. Follows in the Index

a[2] = b[0] + c[1]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the use for Instruction Register?

A
  1. To indicate the current operation / instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Instruction Register is also known as what? ( 2 )

A
  1. Dedicated Register
  2. High Speed Register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the use of Program Counter Register?

A
  1. To indicate the next instruction addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Program Counter Register is also known as what?

A
  1. Instruction Pointer Register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the use of Memory Address Register?

A
  1. To hold memory addresses only
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the use of Memory Data Register?

A
  1. To hold memory data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Memory Data Register also known as what?

A
  1. Memory Buffer Register ( MBR )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the use for Status Register / Program Status Word / Control Register / Flag Register?

A
  1. To indicate the status of CPU
  2. To check whether any internal or external error happends
  3. Always indicate by 0 or 1
24
Q

List out the Flags that Flag Register used ( 6 )

A
  1. Sign Flag
  2. Zero Flag
  3. Parity Flag
  4. Carry Flag
  5. Half-Carry Flag
  6. Overflow Flag
25
List out the Tools of Assembly Programming Tools ( 3 )
1. TASM ( Turobo Assembler ) 2. MASM ( Microsoft Assembler ) 3. NASM ( Linux Assembler ) 4. SASM
26
How to clear the screen in terminal ?
1. cls
27
How to do compilation ?
1. TASM 3FEB.ASM ( File Name )
28
How to link the program?
1. TLINK 3FEB
29
How to edit the file in TASM?
1. EDIT 3FEB.asm
30
Is TASM case sensitive?
1. No
31
What is the file format for TASM?
1. .asm
32
After linking the program, what should I do?
1. dir 3FEB
33
What will the file generated after linking?
1. .obj 2. .exeH 3. .map
34
How to execute the file?
1. 3FEB * Just the file name
35
What is the first code for TASM?
.model small * Can be small , medium , large * To create a program memory
36
How to create a stack to hold data and code in the memory?
.stack 100h
37
What code to add to indicate that the actual coding starts?
.code
38
What code to add to indicate the main procedure starts?
MAIN PROC
39
What is translators?
1. Translates from source to machine understandable language
40
When are translators called?
1. Program Execution
41
List out the examples for translator ( 3 )
1. Compiler 2. Interpreters 3. Assemblers
42
What is compilers?
1. A type of translators which translate source code into intermediate object code ( object code )
43
List out characters that compiler compiles into ( 3 )
1. Symbols 2. Letters 3. Numerical
44
What is the instruction level for Compilers?
1. High level instruction
45
What is the flow of execution of compilers? ( 2 )
1. Top-down Approaches 2. Perform the translation all at once
46
List out the example of compiler ( 4 )
1. C Compiler 2. C++ Compiler 3. Java Compiler 4. Python Compiler
47
What is the flow of execution of interperters?
1. Line-by-line Translation * Differ from compiler which compiler translates all code at once
48
What type of translators which translates high-level instruction into machine understandable format?
1. Interpreters
49
Which translator ( Compiler / Interpreter ) translates faster?
1. Compiler
50
List out the example of Interpreters ( 2 )
1. Java Interpreter 2. Python Interpreter
51
Compiler is what ( POP / OOP )
1. POP ( Procedure Oriented Programming )
52
Interpreters is what ( POP / OOP )
1. OOP ( Object Oriented Programming )
53
What is assemblers?
1. Type of translators which translates low level instruction into machine understandable format
54
What is the flow of execution of assembler?
1. Perform translation all at once
55
List out the example of assembler ( 4 )
1. TASM 2. MASM 3. NASM 4. SASM
56
What is Linker?
1. One of the sub-translators or internal translators which translates object code into machine understandable format such as exe file and MAP file
57
List out the examples of Linker ( 3 )
1. Tlink 2. Mlink 3. Nlink