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
Q

List out the Tools of Assembly Programming Tools ( 3 )

A
  1. TASM ( Turobo Assembler )
  2. MASM ( Microsoft Assembler )
  3. NASM ( Linux Assembler )
  4. SASM
26
Q

How to clear the screen in terminal ?

27
Q

How to do compilation ?

A
  1. TASM 3FEB.ASM ( File Name )
28
Q

How to link the program?

A
  1. TLINK 3FEB
29
Q

How to edit the file in TASM?

A
  1. EDIT 3FEB.asm
30
Q

Is TASM case sensitive?

31
Q

What is the file format for TASM?

32
Q

After linking the program, what should I do?

33
Q

What will the file generated after linking?

A
  1. .obj
  2. .exeH
  3. .map
34
Q

How to execute the file?

A
  1. 3FEB
  • Just the file name
35
Q

What is the first code for TASM?

A

.model small

  • Can be small , medium , large
  • To create a program memory
36
Q

How to create a stack to hold data and code in the memory?

A

.stack 100h

37
Q

What code to add to indicate that the actual coding starts?

38
Q

What code to add to indicate the main procedure starts?

39
Q

What is translators?

A
  1. Translates from source to machine understandable language
40
Q

When are translators called?

A
  1. Program Execution
41
Q

List out the examples for translator ( 3 )

A
  1. Compiler
  2. Interpreters
  3. Assemblers
42
Q

What is compilers?

A
  1. A type of translators which translate source code into intermediate object code ( object code )
43
Q

List out characters that compiler compiles into ( 3 )

A
  1. Symbols
  2. Letters
  3. Numerical
44
Q

What is the instruction level for Compilers?

A
  1. High level instruction
45
Q

What is the flow of execution of compilers? ( 2 )

A
  1. Top-down Approaches
  2. Perform the translation all at once
46
Q

List out the example of compiler ( 4 )

A
  1. C Compiler
  2. C++ Compiler
  3. Java Compiler
  4. Python Compiler
47
Q

What is the flow of execution of interperters?

A
  1. Line-by-line Translation
  • Differ from compiler which compiler translates all code at once
48
Q

What type of translators which translates high-level instruction into machine understandable format?

A
  1. Interpreters
49
Q

Which translator ( Compiler / Interpreter ) translates faster?

50
Q

List out the example of Interpreters ( 2 )

A
  1. Java Interpreter
  2. Python Interpreter
51
Q

Compiler is what ( POP / OOP )

A
  1. POP ( Procedure Oriented Programming )
52
Q

Interpreters is what ( POP / OOP )

A
  1. OOP ( Object Oriented Programming )
53
Q

What is assemblers?

A
  1. Type of translators which translates low level instruction into machine understandable format
54
Q

What is the flow of execution of assembler?

A
  1. Perform translation all at once
55
Q

List out the example of assembler ( 4 )

A
  1. TASM
  2. MASM
  3. NASM
  4. SASM
56
Q

What is Linker?

A
  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
Q

List out the examples of Linker ( 3 )

A
  1. Tlink
  2. Mlink
  3. Nlink