Q. State and Explain steps involved in program development. [w-08, w-10, s-12, w-11]
|
|
- Adelia Thompson
- 6 years ago
- Views:
Transcription
1 Q. State and Explain steps involved in program development. [w-08, w-10, s-12, w-11] Answer: 1. Defining Problem 2. Algorithm 3. Flowchart 4. Initialization of checklist 5. Choosing instructions 6. Converting algorithm into program. Q. what is algorithm? What is flowchart? Sketch symbols of flowchart. Answer: [refer techmax] Q. Explain Assembler, linker, editor, debugger. [Most important questions. Always ask in exam] Answer:[Refer manual and Techmax] Assembler directives: [note: all the directives are important. But concentrate on those directives which are given in important questions] Assembler directives help the assembler to correctly understand the assembly language programs to prepare the machine codes. Assembly language programs are composed of two types of statements: i) The instructions, which are translated to machine code by the assembler. ii) The directives that direct the assembler during the assembly process, for which no machine code is generated. Directive is a statement which gives direction to the assembler. The directives are also called pseudo instructions and are not translated into machine language. The directives are necessary for the assembler to assemble efficiently and correctly.
2 Data Definition and Storage Allocation Directives: Data definition directives are used to define the program variables and allocate a specified amount of memory to them. a) DB: Define Byte: The DB directive is used to reserve byte or bytes of memory locations in the available memory. Name of the variable DB Initialization Value i) RANKS DB 01H, 02H, 03H, 04H This statement direct the assembler to reserve four memory locations for a list named RANKS and initializes them with the above specified four values. ii) MESSAGE DB GOOD MORNING This makes the assembler to reserve the number of bytes of memory equal to the number of characters in the string names MESSAGE and initialize those locations by the ASCII equivalent of these characters. b) DW: Define Word: The DW directive serves the same purposes as the DB directive, but it now makes the assembler the number of memory words (16-bit) instead of bytes. Name of the variable DW Initialization Value
3 i) WORDS DW 1234H, 4567H, 78AH, 045CH This makes the assembler to reserve four words in memory (8 bytes), and initialize the words with the specified values in the statements. During the initialization, the lower bytes are stored in the lower memory addresses, which the upper bytes are stored in the higher addresses. Another option of the DW directive is explained with the DUP operator. ii) WDATA DW 5 DUP (6666H) This statement reserves five words, i.e., 10-bytes of memory for a word label WDATA and initializes all the word locations with 6666H. c) DQ: Define Quad word: This directive is used to direct the assembler to reserve 4 words (8 bytes) of memory for the specified variable and may initialize it with the specified values. Name of the variable DQ Initialization Value TOTAL DQ 0 Reserves 8 bytes of memory for the variable TOTAL and initializes with 0. d) DD: Define Double: The directive DD is used to define a double word (4 bytes) variable. Name of the variable DD Initialization value
4 TOTAL DD 0 Reserves 4 bytes of memory for the variable TOTAL and initializes with 0. e) DT: Define Ten bytes: Name of the variable DT Initialization Value The DT directive directs the assembler to define the specified variable requiring 10 bytes for its storage and initialize the 10 bytes with the specified values. ACODE DT 0 The above statement informs the assembler to reserve 10 bytes of memory for a variable named ACODE and initialize with STRUCTURE DECLARATION: STRUCT: The directive strut is used to declare the data types, which is a collection of programming primary data types, i.e., DB, DW, DT, DT and DQ. Structurename Strut : : : Sequence of DB, DW, DQ, DD for declaration fields :
5 : Structurename ENDS Student Strut Roll-no DW? Name DW 10 DUP (?) Class DB? Branch DB 10 DUP (?) Student ENDS PROGRAM ORGANIZATION DIRECTIVES: The 8086 programs are organized as a collection of logical segments. The directives used to organize the program segments are: SEGMENT, ASSUME, ENDS etc. a) SEGMENT: The directive SEGMENT is used to indicate the beginning of a logical segment. The directive segment follows the name of the segment. To end the segment, SEGMENT must be ended with ENDS statement. DATA SEGMENT program data definition
6 DATA ENDS b) ENDS: The directive ENDS informs the assembler the end of the segment. The directives ENDS and SEGMENT must enclose the segment data or code of the program. Segmentname ENDS. c) ASSUME: The directive assume informs the assembler the name of the logical segment that should be used for a specified segment when program is loaded and the processor segment registers should point to the respective logical segments. ASSUME segreg : segname,.., segreg : segname. i) ASSUME CS : _code ii) ASSUME CS : _code, DS : _Data, SS : _stack END: End of program: Program termination directive and it is used to inform the assembler the physical end of the program. The statement after the directive END will be ignored by the assembler VALUE RETURNING ATTRIBUTE DIRECTIVES: The task of programming can be made easier by assigning assembler to compute the size of the data items it is performed using the directives LENGTH, SIZE, OFFSET and TYPE. a) LENGTH: The directive LENGTH informs the assembler about the number of elements in a data item such as an array. If an array is defined with DB then it returns the number of bytes
7 allocated to a variable. If an array is defined with DW then it returns the number of words allocated to the array variable. LENGTH Variablename DATA Segment Name DB 100 dup (?) A DW 50 dup (?) Total DW? DATA ENDS AX, LENGTH Name then AX = 100 bytes i.e., array size BX, LENGTH A then BX = 50 words i.e., array size. b) SIZE: The directive size is same as length except that it returns the number of bytes allocated to the data item instead of the number of elements in it. SIZE variablename DATA Segment Name DB 100 DUP (?) A DW 50 DUP (?) TOTAL DW? DATA ENDS AX, Size Name
8 then AX= 100 bytes i.e., array size. BX, Size A then BX= 100 bytes i.e., array size CX, Size TOTAL then CX= 2 bytes c) OFFSET: The directive OFFSET informs the assembler to determine the displacement of the specified variable with respect to the base of the segment. It is usually used to load the offset of a variable into the register using this OFFSET value a variable can be referenced using indexed addressing modes. OFFSET VariableName DATA Segment MSG DB Hello World A DW 50 DUP (?) DATA ENDS DX, OFFSET MSG DX= offset of the variable MSG SI, OFFSET A SI= offset of the array. AX, [SI] AX= element of array pointed to by SI i.e.[si] refers to A[1] [SI+2] refers to A[2]
9 [SI+4] refers to A[3] d) SEG: SEGMENT: The directive SEG is used to determine the segment in which specified data item is defined. SEG VariableName DATA Segment MSG DB Hello World A DW 50 DUP (?) DATA ENDS DS, SEG MSG DS= segment in which the variable MSG exists DS, SEG A DS= segment in which array A exists. e) TYPE: The directive type is used to determine the type of data type. The assembler allocates one byte to DB. Two bytes to DW and 4 bytes to DD. TYPE Variable name DATA Segment MSG DB A A DW 100 PI DD 3.17 DATA ENDS
10 ADD BX, TYPE MSG (MSG is DB type) ADD BX, TYPE A (A is DW type) ADD BX, TYPE PI (PI is DD type) Procedure Definition Directives: The procedure definition directives are used to define subroutines. a) PROC: Procedure: The directive PROC indicates the beginning of the procedure. The directive PROC follows the name of the procedure and the term NEAR or FAR follows the PROC indicating the type of procedure. The directive PROC is used with the directive ENDP to enclose the procedure code. Procedure Name PROC NEAR/FAR ONE PROC NEAR TWO PROC FAR Readint PROC Write procedure code to read integer data
11 Readint ENDP b) ENDP: End of Procedure: The directive ENDP informs the assembler the end of procedure. Procedure Name ENDP ONE1 ENDP Macro Definition Directives: These are used to define macro constants and macro functions. a) EQU: Equate Macro Constant: The directive EQU is used to declare the symbols to which some constant value is assigned such symbols are called as macro symbols and macro assembler will replace every occurrence of the symbol in a program by its value. Macros are used to increase the readability of a program. The advantage of macro is that the modification of the symbol value of the declaration will be reflected throughout the program. Num EQU 100 H AX, Num AX, 100 H b) MACRO: The directive macro informs the assembler the beginning of a macro. It consists of name of the macro followed by a keyword MACRO and macro arguments if any. The directive MACRO and ENDM must enclose the definition, declarations or a small part of the code which have to be substituted at the innocation of a macro. Macroname MACRO (arg1, arg2,, argn)
12 Printstring MACRO MSG INT AH, 09 H DX, OFFSET MSG 21 H ENDM Data Control Directives: The data control directives are used to declare the variables used in communication of information between the program modules. a) PUBLIC: The directive PUBLIC informs the assembler that the specified variable of segment can be accessed from other program modules. It helps in managing multiple program modules by sharing global variables (or) procedure. The variables and procedures to be shared must be declared as public in a module in which physically exists. PUBLIC variable 1, variable 2,., variable n PUBLIC XMAX, YMAX. The variables XMAX, YMAX can be accessed from other program modules by declaring them as external using the directive EXTRN. b) EXTRN: External: The directive EXTRN informs the assembler that the data items are labeled following the directive will be used in a program module which is defined in another program module. EXTRN XMAX, YMAX : WORD EXTRN EXTRN Myprint : FAR FACT : NEAR
13 c) PTR: Pointer: The pointer operator is used to declare the type of a label, variable or memory operand. The operator PTR is prefixed by either BYTE or WORD. If the prefix is BYTE, then the particular label, variable or memory operand is treated as an 8-bit quantity, while if WORD is prefix, then it is treated as a 16-bit quantity. In other words, the PTR operator is used to specify the data type byte or word. i) AL, BYTE PTR [SI] Moves content of memory location addressed by SI (8-bit) to AL. ii) INC BYTE PTR [BX] Increment byte contents of memory location addressed by BX.
Microprocessor. By Mrs. R.P.Chaudhari Mrs.P.S.Patil
Microprocessor By Mrs. R.P.Chaudhari Mrs.P.S.Patil Chapter 1 Basics of Microprocessor CO-Draw Architecture Of 8085 Salient Features of 8085 It is a 8 bit microprocessor. It is manufactured with N-MOS technology.
More information8086 ALP TOOLS (CH 2) CHAPTER 2
1 CHAPTER 2 In this chapter, we shall discuss the Assembly Language Program development tools, PC memory structure and Assembler directives. Books to be Referred: 1. Microprocessors and Interfacing 2nd
More informationORG ; TWO. Assembly Language Programming
Dec 2 Hex 2 Bin 00000010 ORG ; TWO Assembly Language Programming OBJECTIVES this chapter enables the student to: Explain the difference between Assembly language instructions and pseudo-instructions. Identify
More informationAssembling, Linking and Executing 1) Assembling: .obj obj .obj.lst .crf Assembler Types: a) One pass assembler:
Assembling, Linking and Executing 1) Assembling: - Assembling converts source program into object program if syntactically correct and generates an intermediate.obj file or module. - It calculates the
More informationUNIT 4. Modular Programming
1 UNIT 4. Modular Programming Program is composed from several smaller modules. Modules could be developed by separate teams concurrently. The modules are only assembled producing.obj modules (Object modules).
More informationSRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)
SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional
More informationConstants and Expressions. Lecture 7: Assembly Language Programs. Constants and Expressions (cont.) Statements. Names. Assembly Directives
Lecture 7: Assembly Language Programs Basic elements of assembly language Assembler directives Data allocation directives Data movement instructions Assembling, linking, and debugging Using TASM Constants
More informationAssembler Programming. Lecture 10
Assembler Programming Lecture 10 Lecture 10 Mixed language programming. C and Basic to MASM Interface. Mixed language programming Combine Basic, C, Pascal with assembler. Call MASM routines from HLL program.
More informationLecture 16: Passing Parameters on the Stack. Push Examples. Pop Examples. CALL and RET
Lecture 1: Passing Parameters on the Stack Push Examples Quick Stack Review Passing Parameters on the Stack Binary/ASCII conversion ;assume SP = 0202 mov ax, 124h push ax push 0af8h push 0eeeh EE 0E F8
More informationExperiment 3 3 Basic Input Output
Experiment 3 3 Basic Input Output Introduction The aim of this experiment is to introduce the use of input/output through the DOS interrupt. Objectives: INT Instruction Keyboard access using DOS function
More informationComputer Architecture and System Software Lecture 07: Assembly Language Programming
Computer Architecture and System Software Lecture 07: Assembly Language Programming Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements New assembly examples uploaded to
More informationExperiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program.
Experiment 3 Introduction: In this experiment the students are exposed to the structure of an assembly language program and the definition of data variables and constants. Objectives: Assembly language
More informationreply db y prompt db Enter your favourite colour:, 0 colour db 80 dup(?) i db 20 k db? num dw 4000 large dd 50000
Declaring Variables in Assembly Language As in Java, variables must be declared before they can be used Unlike Java, we do not specify a variable type in the declaration in assembly language Instead we
More informationAssembly Language Fundamentals. Chapter 3
Assembly Language Fundamentals Chapter 3 1 Numeric Constants 2 Numeric constants are made of numerical digits with, possibly, a sign and a suffix. Ex: -23 (a negative integer, base 10 is default) 1011b
More informationConstants and. Lecture 7: Assembly Language Programs. Expressions (cont.) Constants and. Statements. Expressions
Lecture 7: Assembly Language Programs Basic elements of assembly language Assembler directives Data allocation directives Data movement instructions Assembling, linking, and debugging Using TASM Constants
More informationEEM336 Microprocessors I. Data Movement Instructions
EEM336 Microprocessors I Data Movement Instructions Introduction This chapter concentrates on common data movement instructions. 2 Chapter Objectives Upon completion of this chapter, you will be able to:
More informationdb "Please enter up to 256 characters (press Enter Key to finish): ",0dh,0ah,'$'
PA4 Sample Solution.model large.stack 100h.data msg1 db "This programs scans a string of up to 256 bytes and counts the repetitions of the number 4206 and sums them.",0dh,0ah,'$' msg2 db "Please enter
More informationThe Stack. Lecture 15: The Stack. The Stack. Adding Elements. What is it? What is it used for?
Lecture 15: The Stack The Stack What is it? What is it used for? A special memory buffer (outside the CPU) used as a temporary holding area for addresses and data The stack is in the stack segment. The
More informationSPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY
BACKGROUND Segment The "SEGMENT" and "ENDS" directives indicate to the assembler the beginning and ending of a segment and have the following format label SEGMENT [options] ;place the statements belonging
More informationComputer Structure and Organization
Lesson 5. Instruction formats. Directives, string instructions and several modules programs Computer Structure and Organization Graduated in Computer Sciences / Graduated in Computer Engineering Graduated
More informationLesson 4. Stack, Procedures and Macros
Lesson 4. Stack, Procedures and Macros Computer Structure and Organization Graduated in Computer Sciences / Graduated in Computer Engineering Graduated in Computer Sciences / Graduated in Computer Engineering
More informationIntel 8086: Instruction Set
IUST-EE (Chapter 6) Intel 8086: Instruction Set 1 Outline Instruction Set Data Transfer Instructions Arithmetic Instructions Bit Manipulation Instructions String Instructions Unconditional Transfer Instruction
More informationBasic Assembly SYSC-3006
Basic Assembly Program Development Problem: convert ideas into executing program (binary image in memory) Program Development Process: tools to provide people-friendly way to do it. Tool chain: 1. Programming
More informationExperiment 8 8 Subroutine Handling Instructions and Macros
Introduction Experiment 8 8 Subroutine Handling Instructions and Macros In this experiment you will be introduced to subroutines and how to call them. You will verify the exchange of data between a main
More informationThe statement above assumes that the PCMAC.INC file is in the current directory. The full path of the file can also be given:
MACROS for I/O As you have probably noticed, writing DOS calls can become tedious. Much of the code is repetitive, and each call has its own function code and register usage. You are probably used to dealing
More informationExperiment #5. Using BIOS Services and DOS functions Part 1: Text-based Graphics
Experiment #5 Using BIOS Services and DOS functions Part 1: Text-based Graphics 5.0 Objectives: The objective of this experiment is to introduce BIOS and DOS interrupt service routines to be utilized in
More informationPHY4635/5635 Spring Lecture 8: Program Control Instructions
PHY4635/5635 Spring 2009 Lecture 8: Program Control Instructions Short, Near and Far Jumps Short jump: jump is within +127 to -128 bytes from the address following the jump. Relative jumps : moves with
More informationADVANCE MICROPROCESSOR & INTERFACING
VENUS INTERNATIONAL COLLEGE OF TECHNOLOGY Gandhinagar Department of Computer Enggineering ADVANCE MICROPROCESSOR & INTERFACING Name : Enroll no. : Class Year : 2014-15 : 5 th SEM C.E. VENUS INTERNATIONAL
More informationCode segment Stack segment
Registers Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1
More informationEC 333 Microprocessor and Interfacing Techniques (3+1)
EC 333 Microprocessor and Interfacing Techniques (3+1) Lecture 6 8086/88 Microprocessor Programming (Arithmetic Instructions) Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC
More informationExperiment N o 3 Segmentation and Addressing Modes
Introduction: Experiment N o 3 Segmentation and Addressing Modes In this experiment you will be introduced to physical segmentation of the memory, and the logical segmentation of programs. You will also
More informationCS-202 Microprocessor and Assembly Language
CS-202 Microprocessor and Assembly Language Lecture 2 Introduction to 8086 Assembly Language Dr Hashim Ali Spring - 2019 Department of Computer Science and Engineering HITEC University Taxila!1 Lecture
More informationComputer Architecture and System Software Lecture 06: Assembly Language Programming
Computer Architecture and System Software Lecture 06: Assembly Language Programming Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Assignment 3 due thursday Midterm
More informationMacros in Pentium. Assembly Language. October 25
Macros in Pentium Assembly Language October 25 CSC201 Section 002 Fall, 2000 Equates PI equ 3.1415926 MAXRECS equ 200 RECSIZE equ 5 move equ mov la equ lea float1 dd PI recarray db MAXRECS*RECSIZE dup
More informationELEC 242 Using Library Procedures
ELEC 242 Using Library Procedures There are a number of existing procedures that are already written for you that you will use in your programs. In order to use the library procedures that come with the
More informationAssembly Language: g Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University
System Programming with Assembly Language: g Part III First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University Outline A Few Basic Instructions Translation of high Level
More informationChapter 3: Addressing Modes
Chapter 3: Addressing Modes Chapter 3 Addressing Modes Note: Adapted from (Author Slides) Instructor: Prof. Dr. Khalid A. Darabkh 2 Introduction Efficient software development for the microprocessor requires
More informationHow to write an assembly language program.
Copyright 1999 by Barry B. Brey How to write an assembly language program. Someone asked about this and, at first, I thought this was a very difficult question until I thought about it for a few minutes.
More informationMidterm Exam #2 Answer Key
Midterm Exam #2 Answer Key Name: Student ID #: I have read and understand Washington State University s policy on academic dishonesty and cheating YOU Signed: Problem 1) Consider the following fragment
More informationQuestion Bank Part-A UNIT I- THE 8086 MICROPROCESSOR 1. What is microprocessor? A microprocessor is a multipurpose, programmable, clock-driven, register-based electronic device that reads binary information
More informationComputer Architecture 1 ح 303
Lecture 4 A. Addressing MODES 1. Introduction to assembly language programming: Program is a sequence of commands used to tell a microcomputer what to do. Each command in a program is an instruction Programs
More informationExperiment N o 3. Segmentation and Addressing Modes
Introduction: Experiment N o 3 Segmentation and Addressing Modes In this experiment you will be introduced to physical segmentation of the memory, and the logical segmentation of programs. You will also
More informationMicrocomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات
1) Input/output In computing, input/output or I/O, is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing
More informationLecture (05) x86 programming 4
Lecture (05) x86 programming 4 By: Dr. Ahmed ElShafee ١ TOC IA32 cont,.. Segmentation Assembler Directives Format of console programs Practical deliverable 01 ٢ Simple Memory Addressing Modes Normal (R)
More informationUS06CCSC04: Introduction to Microprocessors and Assembly Language UNIT 1: Assembly Language Terms & Directives
Introduction: US06CCSC04: Introduction to Microprocessors and A microprocessor is the chip containing some control and logic circuits that is capable of a making arithmetic and logical decision based on
More informationmith College Computer Science CSC231 - Assembly Week #4 Dominique Thiébaut
mith College Computer Science CSC231 - Assembly Week #4 Dominique Thiébaut dthiebaut@smith.edu Homework Solutions Outline Review Hexdump Pentium Data Registers 32-bit, 16-bit and 8-bit quantities (registers
More informationChapter Three Addressing Mode MOV AX, BX
Chapter Three The 8086 The 8086 When the 8086 executes an instruction, it performs the specified function on data. The data are called its operands and may be part of the instruction reside in one of the
More informationb) List the 16 Bit register pairs of 8085?(Any 2 pair, 1 Mark each) 2M Ans: The valid 16 bit register pair of 8085 are
Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate
More informationMicroprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)
Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition
More information16.317: Microprocessor Systems Design I Fall 2013
16.317: Microprocessor Systems Design I Fall 2013 Exam 2 Solution 1. (20 points, 5 points per part) Multiple choice For each of the multiple choice questions below, clearly indicate your response by circling
More informationChapter 3. Assembly Language Programming with 8086
Chapter 3 Assembly Language Programming with 8086 UNIT - III Assembly Language Programming with 8086- Machine level programs, Machine coding the programs, Programming with an assembler, Assembly Language
More informationSHEET-2 ANSWERS. [1] Rewrite Program 2-3 to transfer one word at a time instead of one byte.
SHEET-2 ANSWERS [1] Rewrite Program 2-3 to transfer one word at a time instead of one byte. TITLE PROG2-3 PURPOSE: TRANSFER 6 WORDS OF DATA PAGE 60,132.MODEL SMALL.STACK 64.DATA ORG 10H DATA_IN DW 234DH,
More informationLABORATORY WORK NO. 8 WORKING WITH MACROS AND LIBRARIES
LABORATORY WORK NO. 8 WORKING WITH MACROS AND LIBRARIES 1. Object of laboratory Getting used to defining and using macros, procedure defining and using LIB library librarian. 2. Theoretical considerations
More informationTopics Introduction to Microprocessors. Chapter 5 Macros and modules. What is macro? How to use macro? (I) How to use macro?
Topics 2102440 Introduction to Microprocessors Macros Subroutines Modules Chapter 5 Macros and modules Suree Pumrin,, Ph.D. 1 2102440 Introduction to Microprocessors 2 What is macro? It is used to automate
More informationMicroprocessor and Assembly Language Week-5. System Programming, BCS 6th, IBMS (2017)
Microprocessor and Assembly Language Week-5 System Programming, BCS 6th, IBMS (2017) High Speed Memory Registers CPU store data temporarily in these location CPU process, store and transfer data from one
More information.code. lea dx,msg2. Page 1/8. Problem 1: Programming in Assembly [25 Points]
Problem : Programming in Assembly [ Points] The following assembly program is supposed to: receive three integer numbers from the console, call a function, name sort, function sort arranges the three input
More informationVARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad
Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory
More informationUNIVERSITY OF CALIFORNIA, RIVERSIDE
Final Page 1 of 7 UNIVERSITY OF CALIFORNIA, RIVERSIDE Computer Science Department CS61 Machine Organization & Assembly Language Final September 1, 2000 53 Name: Solution Key Student ID#: Please print legibly
More informationLab 3: Defining Data and Symbolic Constants
COE 205 Lab Manual Lab 3: Defining Data and Symbolic Constants - page 25 Lab 3: Defining Data and Symbolic Constants Contents 3.1. MASM Data Types 3.2. Defining Integer Data 3.3. Watching Variables using
More informationVideo processing The INT instruction enables program to interrupt its own processing. Use INT instruction to handle inputs and outputs
Video processing The INT instruction enables program to interrupt its own processing. Use INT instruction to handle inputs and outputs INT 10H: screen handling INT 21H: for displaying screen output and
More informationComputer Architecture and System Software Lecture 04: Floating Points & Intro to Assembly
Computer Architecture and System Software Lecture 04: Floating Points & Intro to Assembly Instructor: Rob Bergen Applied Computer Science University of Winnipeg Decimal Addition Review decimal addition
More informationCOE 205 Lab Manual Experiment N o 12. Experiment N o Using the Mouse
Experiment N o 12 12 Using the Mouse Introduction The mouse is an I/O device that replaces the arrow keys on the keyboard for graphical and text style programs. This experiment shows how to add the mouse
More informationEC-333 Microprocessor and Interfacing Techniques
EC-333 Microprocessor and Interfacing Techniques Lecture 4 Addressing Modes Dr Hashim Ali Spring - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides taken from Computer
More informationMarking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)
Philadelphia University Faculty of Engineering Marking Scheme Examination Paper Department of CE Module: Microprocessors (630313) Final Exam Second Semester Date: 02/06/2018 Section 1 Weighting 40% of
More informationPESIT Bangalore South Campus
INTERNAL ASSESSMENT TEST 2 Date : 02/04/2018 Max Marks: 40 Subject & Code : Microprocessor (15CS44) Section : IV A and B Name of faculty: Deepti.C Time : 8:30 am-10:00 am Note: Note: Answer any five complete
More informationSummer 2003 Lecture 15 07/03/03
Summer 2003 Lecture 15 07/03/03 Initialization of Variables In the C (or C++) programming language any variable definition can have an optional initializer for the variable. How and when the initialization
More informationProgramming in Module. Near Call
Programming in Module Main: sub1: call sub1 sub ax,ax sub1 sub1 proc near sub ax,ax endp sub1 sub1 proc Far sub ax,ax endp Near Call sub1 sub1 Main: call sub1 sub1: sub ax,ax proc near sub ax,ax endp SP
More informationEXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM
EXPERIMENT WRITE UP AIM: Assembly language program for 16 bit BCD addition LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM TOOLS/SOFTWARE
More informationParameter Passing. Procedure line. Calling procedure line. Most subroutines require parameters Can sometimes pass parameters via registers
Parameter Passing Most subroutines require parameters Can sometimes pass parameters via registers Assume subroutine line will compute the value: y = m*x + b where m,x,b are signed byte values, and y is
More informationLABORATORY WORK NO. 7 FLOW CONTROL INSTRUCTIONS
LABORATORY WORK NO. 7 FLOW CONTROL INSTRUCTIONS 1. Object of laboratory The x86 microprocessor family has a large variety of instructions that allow instruction flow control. We have 4 categories: jump,
More informationMicroprocessors (A) DOS Services
1 Services 2 System Calls Operating System services: Disk and file system management Screen display and printing Keyboard entry Other I/O management Date and time Program run and terminate Command arguments
More informationMemory Organization. 27 December 2016 Pramod Ghimire. Slide 1 of 21
Memory Organization Slide 1 of 21 The assembler uses two basic formats for developing software. One method uses memory models and the other uses fullsegment definitions. MASM uses memory models. The TASM
More informationCPU. IBM PC and compatible Memory Structure
CPU The CPU is usually organised in three parts: The Arithmetic and Logic Unit or ALU (which performs computations and comparisons) and the Control Unit which fetches information from and stores information
More informationMating Assembly with C
16 Do to others what you want them to do to you. Mating Assembly with C Nothing can beat the efficiency of Assembly language. A good optimizing C compiler will convert C file to a better assembly code.
More informationMachine and Assembly Language Principles
Machine and Assembly Language Principles Assembly language instruction is synonymous with a machine instruction. Therefore, need to understand machine instructions and on what they operate - the architecture.
More informationSummer 2003 Lecture 4 06/14/03
Summer 2003 Lecture 4 06/14/03 LDS/LES/LSS General forms: lds reg,mem lseg reg,mem Load far pointer ~~ outside of current segment {E.g., load reg w/value @ mem, & seg w/mem+2 XCHG Exchange values General
More informationObjectives. ICT106 Fundamentals of Computer Systems Topic 8. Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8
Objectives ICT106 Fundamentals of Computer Systems Topic 8 Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8 To understand how HLL procedures/functions are actually implemented
More informationLecture-30 Assemblers To assemble a program automatically the assembler needs information in the form of assembler direct that controls the assembly.
Lecture-30 Assemblers To assemble a program automatically the assembler needs information in the form of assembler direct that controls the assembly. E.g. the assembler must be told at what address to
More informationPESIT Bangalore South Campus
INTERNAL ASSESSMENT TEST 2 Date : 28/03/2016 Max Marks: 50 Subject & Code : Microprocessor (10CS45) Section: IV A and B Name of faculty: Deepti.C Time: 8:30-10:00 am Note: Answer any complete five questions
More informationELEC VIDEO BIOS ROUTINES
It is less confusing to the user if we remove unnecessary messages from the display before giving information or instructions. At the command prompt, we do this with the DOS command CLS. However, this
More informationProcedures and the Stack. Chapter 4 S. Dandamudi
Procedures and the Stack Chapter 4 S. Dandamudi Outline What is stack? Pentium implementation of stack Pentium stack instructions Uses of stack Procedures Assembler directives Pentium instructions Parameter
More informationA4 Sample Solution Ch3
A4 Sample Solution Ch3 2. AL, AH, BL, BH,CL,CH,DLl, DH 3. AX, BX, CX, DX, SP, BP, SI, DI, CS, DS, ES, SS, FS, GS 4. EAX, EBX, ECX, EDX, ESP, EBP, EDI, ESI 5. RAX, RBX, RCX, RDX, RSP, RBP, RSI, RDI and
More informationTransfer of Control. Lecture 10 JMP. JMP Formats. Jump Loop Homework 3 Outputting prompts Reading single characters
Lecture 10 Jump Loop Homework 3 Outputting prompts Reading single characters Transfer of Control The CPU loads and executes programs sequentially. You d like to be able to implement if statements, gotos,
More informationExperiment #2. Addressing Modes and Data Transfer using TASM
2.0 Objective Experiment #2 Addressing Modes and Data Transfer using TASM The objective of this experiment is to learn various addressing modes and to verify the actions of data transfer. 2.1 Introduction
More informationMr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU
5 Years Integrated M.Sc.(IT) Semester 4 060010402 System Programming Question Bank Unit 1: Introduction 1. Write the decimal equivalent for each integral power of 2 from 2! to 2!". 2. Convert the following
More informationWriting 32-Bit Applications
335 CHAPTER 13 Writing 32-Bit Applications This chapter is an introduction to 32-bit programming for the 80386. The guidelines in this chapter also apply to the 80486 processor, which is basically a faster
More informationCSE 505 Lecture 8: Introduction to Assembly Language
Page1 Advantages of Assembly Language Low-level access to the computer Higher speed Total control over CPU (Must know what you are doing in order to make these advantages work) Disadvantages of assembly
More informationCS499. Intel Architecture
CS499 Intel Architecture Intel Architecture References IA-32 Intel Architecture Software Developer s Manual, Volume 1: Basic Architecture Volume 2: Instruction Set Reference www.intel.com/design/pentiumii/manuals/
More informationLecture 6. Assembler Directives
Lecture 6 Assembler Directives Assembler Directives Code generation flow Assembler directives Introduction Segment control Generic segment (SEGMENT, RSEG) Absolute segment (CSEG, DSEG and XSEG) Address
More informationADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture
ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-11: 80x86 Architecture 1 The 80x86 architecture processors popular since its application in IBM PC (personal computer). 2 First Four generations
More informationAssignment 3. Problem Definition:
Att (2) Perm(5) Oral(3) Total(10) Sign with Date Assignment 3 Problem Definition: Write x86 ALP to convert 4-digit Hex number into its equivalent BCD number and 4-digit BCD number into its equivalent HEX
More informationELCT 707 Micro Computer Applications Final-term Exam, Winter 2009
German University in Cairo Jan 16 th 2010 Information Engineering and Technology Dept. Dr. Gamal Fahmy Bar Code ELCT 707 Micro Computer Applications Final-term Exam, Winter 2009 Exam Duration: Three hours
More informationProgram controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.
2 Microprocessor Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. It is used as CPU (Central Processing Unit) in computers. 3 Microprocessor
More informationELEC 242 Time Delay Procedure
There are many occasions where we wish to time events. If we are using a personal computer, we have a number of ways to do this. The 8088/8086 computer had a Programmable Interval Timer like the 8253/54
More information2003 LXI H, 42F2H ; this instruction store 42F2 in to the HL pair POP H ; store data from top of the stack to HL pair
(1) What is stack? Explain stack related instruction with example OR Give function of stack. OR What is stack? Explain the stack operations using examples. The stack is a group of memory location in the
More informationDefining and Using Simple Data Types
85 CHAPTER 4 Defining and Using Simple Data Types This chapter covers the concepts essential for working with simple data types in assembly-language programs The first section shows how to declare integer
More informationAssembly Language Lab #5
Islamic University of Gaza Computer Engineering Department 2009 Assembly Language Lab #5 Eng. Tahani Z. Fourah Islamic University of Gaza Lab 5 Addressing Modes The addressing modes are different ways
More informationMICROPROCESSOR & MICROCONTROLLER
MICROPROCESSOR & MICROCONTROLLER MODULE I Evolution of Microprocessor 4-bit Microprocessors The first microprocessor was introduced in 1971 by Intel Corp. It was named Intel 4004 as it was a 4 bit processor.
More informationMICROPROCESSOR. Question Bank
MICROPROCESSOR Question Bank 1.Discuss the development of Intel 86 family of microprocessors. Briefly indicate theadditional features introduced at each stage of development from 8086 to Pentium IV. Dec
More informationAssembly Language Each statement in an assembly language program consists of four parts or fields.
Chapter 3: Addressing Modes Assembly Language Each statement in an assembly language program consists of four parts or fields. The leftmost field is called the label. - used to identify the name of a memory
More information