BY Kamran Yousaf Application of Computer Graphics and Animation Using C++ Language.

Slides:



Advertisements
Similar presentations
Computer Programming Spring-2007
Advertisements

Register In computer architecture, a processor register is a small amount of storage available on the CPU whose contents can be accessed more quickly than.
DOS and BIOS Interrupts DOS and BIOS interrupts are used to perform some very useful functions, such as displaying data to the monitor, reading data from.
Machine/Assembler Language Putting It All Together Noah Mendelsohn Tufts University Web:
MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
6-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 Addressing modes.
Azir ALIU 1 What is an assembly language?. Azir ALIU 2 Inside the CPU.
Assembly Language for Intel-Based Computers Chapter 15: BIOS-Level Programming (c) Pearson Education, All rights reserved. You may modify and.
8.7 Memory management Program E Program D System memory DOS INT 21, function 48H: Allocate Memory Specification: allocates a number of memory paragraphs.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#8) By Dr. Syed Noman.
An Introduction to 8086 Microprocessor.
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
1/2002JNM1 Positional Notation (Hex Digits). 1/2002JNM2 Problem The 8086 has a 20-bit address bus. Therefore, it can access 1,048,576 bytes of memory.
1 Screen and Keyboard Operations Suthida Chaichomchuen
CET 3510 Microcomputer Systems Tech. Lecture 2 Professor: Dr. José M. Reyes Álamo.
Module R3 Process Scheduling. Module R3 involves the creation of a simple “Round Robin” dispatcher. The successful completion of this module will require.
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
Video systems. Lesson plan Review the code for the previous exercise Video systems Review for midterm exam.
Software Interrupt Instruction ‘int’ A ‘int’ instruction is like a special kind of subroutine call. Will discuss details later ‘int’ stands for INTERRUPT.
10H Interrupt. Option 0H – Sets video mode. Registers used: – AH = 0H – AL = Video Mode. 3H - CGA Color text of 80X25 7H - Monochrome text of 80X25 Ex:
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Intel 8086 (8088) Microprocessor Structure
University of Tehran 1 Microprocessor System Design Omid Fatemi Machine Language Programming
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015.
6-4 CPU-Registers, effective address General registers vs Segment registers Computer Studies (AL)
University of Sargodha, Lahore Campus Prepared by Ali Saeed.
ROM BIOS Chapter 9. The ROM BIOS PC computer come with a set od built in routines collectively called the ROM BIOS. These routines are permanent part.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
Assembly Language Data Movement Instructions. MOV Instruction Move source operand to destination mov destination, source The source and destination are.
Direct-Access Color Graphics Chapter 11. Graphics modes C++ provides a different combination of graphics characteristics. These characteristics include.
Preliminary to Assembly Language Programming CE 140 A1/A2 28 June 2003.
1 x86 Programming Model Microprocessor Computer Architectures Lab Components of any Computer System Control – logic that controls fetching/execution of.
BITS Pilani Pilani Campus Pawan Sharma Lecture /12/ EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing.
Computer Organization & Assembly Language University of Sargodha, Lahore Campus Prepared by Ali Saeed.
BITS Pilani Pilani Campus Pawan Sharma Lecture / ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
Intel MP Organization. Registers - storage locations found inside the processor for temporary storage of data 1- Data Registers (16-bit) AX, BX, CX, DX.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
COMP 1321 Digital Infrastructure
Programming the I/O Hardware
8086 Microprocessor.
Computer Organization & Assembly Language Chapter 3
ADDRESSING MODES.
ADDRESSING MODES.
CS-401 Computer Architecture Assembly Language Programming
Microprocessor and Assembly Language
Symbolic Instruction and Addressing
Introduction to Assembly Language
BIC 10503: COMPUTER ARCHITECTURE
Programming the I/O Hardware
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Interrupt Mechanism Interrupt Compared With Procedures Call MyProc
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
COMP 1321 Digital Infrastructure
COMP 1321 Digital Infrastructure
Symbolic Instruction and Addressing
CNET 315 Microprocessor & Assembly Language
Unit:08 Software Interrupts
Computer Architecture CST 250
Unit-I 80386DX Architecture
COMP 1321 Digital Infrastructure
Chapter 6 –Symbolic Instruction and Addressing
Process.
CSC 497/583 Advanced Topics in Computer Security
Chapter 8: Instruction Set 8086 CPU Architecture
Microprocessor Lecture 7 (8086 Registers).
Presentation transcript:

BY Kamran Yousaf Application of Computer Graphics and Animation Using C++ Language.

BY Kamran Yousaf Contents Interrupts & Registers & DMA & Pointers Plotting Pixel Line / Rectangle / Polygon Circle / Arc Ellipse Fill

BY Kamran Yousaf Interrupt It is a request generated by Processor for peripheral devices OR by peripheral devices for processor. _____________________________________________ Dos identifies these interrupts by interrupt No. & there are total 256 Interrupts under DOS Windows call these interrupts as API’s. & there are unlimited API’s under Windows. _____________________________________________ Software Interrupts Software requests to hardware (21h). Hardware Interrupts Processor’s request to Hardware (0~6h) BIOS Interrupts Monitors, Keyboards other Basic Hardware.

BY Kamran Yousaf Generating an Interrupt The generation of an interrupt requires following things to take care. Interrupt No : To generate or call an interrupt we must first know what is its Interrupt No. Most common Interrupt No’s are as below. Timer: 8h Keyboard: 9hVGA: 10h Hard Disk: 13hDOS: 21hMouse: 33h Service No : It is the no related to a function to be performed by that interrupted device. i.e. different VGA service no’s. Move Cursor: 2 Change Cursor:1Get Cursor: 3

BY Kamran Yousaf Registers Scratch Pads General Purpose Temporary data storage Calculation Purpose Built in Processor Address registers Flags Parameters & Returns of Interrupts

BY Kamran Yousaf Interrupts & Registers The Parameters of an interrupt called are passed through general purpose registers. AX, BX, CX, DX 2Byte Structure AH-AL, BH-BL, CH-CL, DH-DL Each sharing 1 byte from a register The Data storing and retrieving is dependent AH 8 Bits AL 8 Bits AX 16 Bits Register

BY Kamran Yousaf Using Registers in C++ Data Structure like Registers “struct” and “union” “struct” is group of data sturtures “union” is “struct”, and it shares mem Register’s structure is composed of a Union and two structures

BY Kamran Yousaf REGS union REGS { struct WORDREGS x; struct BYTEREGS h; }; struct BYTEREGS { unsigned char al, ah, bl, bh; unsigned char cl, ch, dl, dh; }; struct WORDREGS { unsigned int ax, bx, cx, dx; unsigned int si, di, cflag, flags; }; REGS.h.ah (8 Bits) REGS.h.al REGS.x.ax 16 Bits

BY Kamran Yousaf Calling Interrupt Int86(int intno, union REGS *inregs, union REGS *outregs); Copies the Register Values from REGS Union to Registers Calls the interrupt Copies the Register Values from Registers to Union

BY Kamran Yousaf Rules Better to use Hexadecimal No as interrupt no/ service no. The Service no is placed in ah register always Other registers are used as parameter registers After the calling these registers are used as return registers.

BY Kamran Yousaf DMA & Pointers Memory is directly Accessed Specific Solution Difficult Fast Pointers Used More Technical / Mathematical