Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
39 views
6 pages
Mic Unit-2 Msbte Que
Uploaded by
Gaurang Rane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Mic Unit-2 Msbte Que For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
39 views
6 pages
Mic Unit-2 Msbte Que
Uploaded by
Gaurang Rane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Mic Unit-2 Msbte Que For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Mic Unit-2 Msbte Que For Later
You are on page 1
/ 6
Search
Fullscreen
¢_| List assembly language programming tools. |__ 2m ‘Ans 1. Editors Each 4M 2. Assembler 3. Linker 4. Debugger. e_ | Draw flowchart for multiplication of two 16 bit numbers, {2m ‘Ans Correct start flowchart: Sse 2M(consider any relevant oar flowchart a also) Dx. KE OHH oe iProguct 1e Ax regal SOx
¢_| State the role Debugger in assembly language programming. | 2M ‘Ans | Debugger: Debugger is the program that allows the extension oF program in | Explanation: single step mode under the control of the user. 2M ‘The process of locating & correcting errors using a debugger is known as Debugger. Some examples of debugger are DOS debug command Borland turbo debugger TD. Microsoft debugger known as code view ev. etc... ¢_| Explain assembly language program development steps. | aM ‘Ans | 1. Defining the problem: The first step in writing program is to think very | Correct steps carefully about the problem that the program must solve, 4M 2. Algorithm: The formula or sequence of operations to be performed by the program can be specified as a step in general English is called algorithm, 3. Flowchart: The flowchart is a graphically representation of the program operation or task. 4. Initialization checklist: Initialization task is to make the checklist of entire variables, constants, all the registers, flags and programmable ports 5. Choosing instructions: Choose those instructions that make program smaller in size and more importantly efficient in execution, 6. Converting algorithms to assembly language program: Every step in the algorithm is converted into program statement using correct and efficient instructions or group of instructions.Write an ALP to add two 16-bit numbers. am. DATA SEGMENT NUMBER1 DW 67531, NUMBER? DW 5856H SUM DW 0 DATA ENDS CODE SEGMENT ASSUME CS: CODE, DS: DATA START: MOV AX, DATA Data segment initialization 1M, Code segment 3M MOV DS, AX MOV AX, NUMBERI MOV BX, NUMBER2 ADD AX, BX MOV SUM, AX MOV AH, 4CH INT 21H CODE ENDS END START Explain the use of assembler directives. 1) DW 2) EQU 3) ASSUME 4) OFFSET 5) SEGMENT 6) EVEN 2M. ‘Ans DW (DEFINE WORD) ‘The DW directive is used to tell the assembler to define a variable of type word or to reserve storage locations of type word in memory. The statement MULTIPLIER DW 437AH, for example, declares a variable of type word named MULTIPLIER, and initialized with the value 437AH when the program is loaded into memory to be run. EQU (EQUATE) EQU is used to give a name to some value or symbol. Each time the assembler finds the given name in the program, it replaces the name with the value or symbol you equated with that name. Each Directive Use: IM eachExample Data SEGMENT Numl EQU 50H Num2 EQU 66H Data ENDS ‘Numeric value 50H and 66H are assigned to Num| and Num2. ASSUME ASSUME tells the assembler what names have been chosen for Code, Data Extra and Stack segments. Informs the assembler that the register CS is to be initialized with the address allotted by the loader to the label CODE and DS is similarly initialized with the address of label DATA. OFFSET OFFSET is an operator, which tells the assembler to determine the offset or displacement of a named data item (variable), a procedure from the start of the segment, which contains it Example MOV BX; OFFSET PRICES; Itwill determine the offset of the variable PRICES from the start of the segment in which PRICES is defined and will load this value into BX, SEGMENT The SEGMENT directive is used to indicate the start of a logical segment. Preceding the SEGMENT directive is the name you want to give the segment. For example, the statement CODE SEGMENT indicates to the assembler the start of a logical segment called CODE. The SEGMENT and ENDS directive are used to “bracket” a logical segment containing code of data EVEN (ALIGN ON EVEN MEMORY ADDRESS) As an assembler assembles a section of data declaration or instruction statements, it uses a location counter to keep track of how many bytes it is from the start of a segment at any time, The EVEN directive tells the assembler to increment the location counter to the next even address, if it is not already at an even address. A NOP instruction will be inserted in the location incremented over.¢_ | Explain any two assembler directives of 8086. 4M ‘Ans | 1. DB - The DB directive is used to declare a BYTE -2-BYTE variable — A | Explanation BYTE is made up of 8 bits. for each for Declaration examples: any (wo assembler Bytel DB 10h directives: 2 M Byte? DB 255; OFFh, the max. possible for a BYTE CRLF DB ODh, OAh, 24h ;Carriage Return, terminator BYTE 2. DW — The DW directive is used to declare a WORD type variable — A WORD occupies 16 bits or (2 BYTE). Declaration examples: Word DW 1234h Word? DW 65535; OFFFFh, (the max. possible for a WORD) 3. DD — The DD directive is used to declare a DWORD ~ A DWORD double word is made up of 32 bits =2 Word's or 4 BYTE. Declaration examples’ Dword] DW 12345678h Dword2 DW 4294967295 ;0FFFFFFFFh. 4, EQU - The EQU directive is used to give name to some value or symbol. Each time the assembler finds the given names in the program, it will replace the name with the value or a symbol. The value can be in the range 0 through 65535 and it can be another Equate declared anywhere above or below. The following operators can also be used to declare an Equate: THIS BYTE THIS WORD THIS DWORD ‘A variable ~ declared with a DB, DW, or DD directive ~ has an address and has space reserved at that address for it in the COM file, But an Equate does not have an address or space reserved for it in the COM file. Example: A—Byte EQU THIS BYTE DB 10 A_ word EQU THIS WORDDW 1000 A_dword EQU THIS DWORD DD 4294967295 Buffer Size EQU 1024 Buffer DB 1024 DUP (0) Buffed_ ptr EQU § ; actually points to the next byte after the; 1024th byte in butter. 5. SEGMENT: Itis used to indicate the start of a logical segment. It is the name given to the segment, Example: the code segment is used (0 indicate to the assembler the start of logical segment. 6. PROC: (PROCEDURE) It is used to identify the start of a procedure. It follows a name we give the procedure. After the procedure the term NEAR and FAR is used to specify the procedure Example: SMART-DIVIDE PROC FAR identifies the start of procedure named SMART-DIVIDE and tells the assembler that the procedure is far. b [Demonstrate in detail the program development steps in assembly] 6M language programming. ‘Ans | Program Development steps Each step: 1. Defining the problem a The first step in writing program is to think very carefully about the | (Flowchart problem that you want the program to solve. symbols are 2. Algorithm optional) The formula or sequence of operations or task need to perform by your program can be specified as a step in general English is called algorithm, 3. Flowchart ‘The flowchart is a graphically representation of the program operation or task. Favela Sjubos ES / 7 / Inpwoupat / oo on (encase) CY \ )} Conmtor Ab) Vans) m checklist Initialization task is to make the checklist of entire variables, constants, all the registers, flags and programmable ports. 5. Choosing instructions We should choose those instructions that make program smaller in size and more importantly efficient in execution. 6. Converting algorithms to assembly language program Every step in the algorithm is converted into program statement using correct and efficient instructions or group of instructions State the function of following assembly language programing tools: oM Assembler (i) Linker (i) Debugger (Assembler 2M each a) Assembler is a program that translates assembly language program to the correct binary code for each instruction ie. machine code and generate the file called as object file with extension .obj. b) It also displays syntax errors in the program, if any. ©) It can also be used to produce list (Ist) which contains assembly language statements, binary codes, and offset address For each instruction. Example; TASM, MASM. iLinker a) Itisa programming tool used to convert Object code into executable program. ») Itcombines if requested .more than one separated assembled modules into one executable ‘Module such as two or more assembly programs. ¢) It generates EXE module Example; TLINK. (ii)Debugger a) Debugger is a program that allows the execution of program in single step mode ‘under the control ofthe user. ») The errors in program can be located and corrected using a debugger. Example; TD.
You might also like
MIC (22415) UNIT - 1 Notes
PDF
100% (1)
MIC (22415) UNIT - 1 Notes
17 pages
Unit 2
PDF
No ratings yet
Unit 2
29 pages
MIC Unit-2 Notes
PDF
No ratings yet
MIC Unit-2 Notes
21 pages
MCQ 1
PDF
100% (1)
MCQ 1
19 pages
UNIT-2-1 Notes For Ece
PDF
No ratings yet
UNIT-2-1 Notes For Ece
18 pages
UNit 1.3
PDF
No ratings yet
UNit 1.3
38 pages
Chapter 4
PDF
No ratings yet
Chapter 4
80 pages
CHAPTER 4 Robotics
PDF
No ratings yet
CHAPTER 4 Robotics
78 pages
Lec - 12 Assembler Directives
PDF
No ratings yet
Lec - 12 Assembler Directives
19 pages
3 Assembler Directives
PDF
No ratings yet
3 Assembler Directives
73 pages
10 1
PDF
No ratings yet
10 1
26 pages
2a Al Fundamentals New Microproceeor Book
PDF
No ratings yet
2a Al Fundamentals New Microproceeor Book
50 pages
Directives Lecture
PDF
No ratings yet
Directives Lecture
17 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
29 pages
MIC PC 3
PDF
No ratings yet
MIC PC 3
5 pages
2 The Art of Assembly Language Programming
PDF
100% (1)
2 The Art of Assembly Language Programming
6 pages
FALLSEM2020-21 CSE2006 ETH VL2020210106464 Reference Material I 29-Jul-2020 MP-7 PDF
PDF
No ratings yet
FALLSEM2020-21 CSE2006 ETH VL2020210106464 Reference Material I 29-Jul-2020 MP-7 PDF
16 pages
Notes - Assembler Directives PDF
PDF
100% (1)
Notes - Assembler Directives PDF
23 pages
Assembly Language Programming: Bilal Zahoor Kashmir University North Campus
PDF
No ratings yet
Assembly Language Programming: Bilal Zahoor Kashmir University North Campus
31 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
7 pages
8086 Assembler Directives: Unit 1 Presented by Mrs.M.P.Sasirekha
PDF
No ratings yet
8086 Assembler Directives: Unit 1 Presented by Mrs.M.P.Sasirekha
16 pages
Assembler Directives of 8085
PDF
No ratings yet
Assembler Directives of 8085
19 pages
Chapter Four - Part II
PDF
No ratings yet
Chapter Four - Part II
32 pages
MIC PC 2
PDF
No ratings yet
MIC PC 2
2 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
7 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
2 pages
8086 Assembly Language Programming I
PDF
100% (3)
8086 Assembly Language Programming I
46 pages
Chp02 Assembly Language Fundamentals
PDF
100% (2)
Chp02 Assembly Language Fundamentals
14 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
6 pages
2 The Art of Assembly Language Programming
PDF
No ratings yet
2 The Art of Assembly Language Programming
6 pages
Assembler Directives (Cont..)
PDF
No ratings yet
Assembler Directives (Cont..)
18 pages
Assignment No 2
PDF
No ratings yet
Assignment No 2
4 pages
Free Space Management Techiniques
PDF
No ratings yet
Free Space Management Techiniques
7 pages
Assembly Directives in 8051 Microcontroller-1
PDF
No ratings yet
Assembly Directives in 8051 Microcontroller-1
9 pages
Assembler Directive in Microprocesser 8086
PDF
100% (1)
Assembler Directive in Microprocesser 8086
18 pages
CSS UT QBB
PDF
No ratings yet
CSS UT QBB
19 pages
Unit 2
PDF
No ratings yet
Unit 2
28 pages
Assembler Directives and Basic Steps of ALP: Dr. Urvashi Singh
PDF
No ratings yet
Assembler Directives and Basic Steps of ALP: Dr. Urvashi Singh
20 pages
Assembler:: Procedure For Assembling A Program
PDF
No ratings yet
Assembler:: Procedure For Assembling A Program
12 pages
Notes - Assembler Directives
PDF
100% (1)
Notes - Assembler Directives
23 pages
Directives DD
PDF
No ratings yet
Directives DD
19 pages
Assembler Directives 8086
PDF
100% (1)
Assembler Directives 8086
18 pages
Assembler Directives
PDF
100% (1)
Assembler Directives
18 pages
Unit2 Assebly-Prog
PDF
100% (1)
Unit2 Assebly-Prog
5 pages
CSS Ut QB
PDF
No ratings yet
CSS Ut QB
1 page
CCD Certificate
PDF
No ratings yet
CCD Certificate
1 page
Assembler Directives Micro Processors 8086
PDF
No ratings yet
Assembler Directives Micro Processors 8086
4 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
5 pages
Today's Content: Program Development Steps
PDF
100% (1)
Today's Content: Program Development Steps
7 pages
Osy Ai Gen Paper
PDF
No ratings yet
Osy Ai Gen Paper
2 pages
8086 Assembler Directives: Segment
PDF
100% (1)
8086 Assembler Directives: Segment
5 pages
Unit 2 The Art of Assembly Language Programming
PDF
100% (1)
Unit 2 The Art of Assembly Language Programming
13 pages
Assembler Directives of 8086
PDF
No ratings yet
Assembler Directives of 8086
14 pages
Co All Programs
PDF
No ratings yet
Co All Programs
32 pages
Assembler Directives
PDF
100% (3)
Assembler Directives
11 pages
Assemblers Directives
PDF
100% (1)
Assemblers Directives
5 pages
Assembly Lang Programming
PDF
100% (1)
Assembly Lang Programming
32 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
33 pages
CH-06 8086 Assembly
PDF
100% (1)
CH-06 8086 Assembly
40 pages
MIC Chapter 2 Art of Assembly Language Ali Karim Sir Notes
PDF
100% (1)
MIC Chapter 2 Art of Assembly Language Ali Karim Sir Notes
6 pages
8086 Assembler Directives
PDF
No ratings yet
8086 Assembler Directives
21 pages
Wiz Affs
PDF
No ratings yet
Wiz Affs
7 pages
CH2-Decision Trees and Random Forest
PDF
No ratings yet
CH2-Decision Trees and Random Forest
54 pages
Solar Energy
PDF
No ratings yet
Solar Energy
12 pages
A Prayer For Guidance
PDF
No ratings yet
A Prayer For Guidance
1 page
CH - 2 - Art of Assembly Language Programming
PDF
No ratings yet
CH - 2 - Art of Assembly Language Programming
29 pages
Lecturenote 683574061chapter Two
PDF
No ratings yet
Lecturenote 683574061chapter Two
41 pages
Naive Bayes
PDF
No ratings yet
Naive Bayes
1 page
Assembler Directives
PDF
No ratings yet
Assembler Directives
34 pages
MP03 - Machine Code and Assembly Language 1
PDF
No ratings yet
MP03 - Machine Code and Assembly Language 1
16 pages
Q.6) Implement Python Code For Given Steps To Implement Naïve Bayes Algorithm
PDF
No ratings yet
Q.6) Implement Python Code For Given Steps To Implement Naïve Bayes Algorithm
1 page
Assembler Directives
PDF
No ratings yet
Assembler Directives
2 pages