Video systems. Lesson plan Review the code for the previous exercise Video systems Review for midterm exam.

Slides:



Advertisements
Similar presentations
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.
Advertisements

There are two types of addressing schemes:
ICS312 Set 6 Operands. Basic Operand Types (1) Register Operands. An operand that refers to a register. MOV AX, BX ; moves contents of register BX to.
More about procedures and Video Processing. Lesson plan Review existing concepts More about procedures and boolean expression Video processing.
Video systems (continue). Practice Modify the program to get a string from a keyboard to display the input string on the middle of the screen with reverse.
Direct video practice and Keyboard Operations
Assembly Language for Intel-Based Computers Chapter 15: BIOS-Level Programming (c) Pearson Education, All rights reserved. You may modify and.
SET 19 PROGRAMMING THE MOUSE. Mouse Features All mouse operations within a program are performed by standard INT 33H functions of the form: MOV AX, function.
1 Procedures and Interrupts Chapter 5 n Stack n Procedure n Software Interrupt u BIOS-level access u DOS-level access n Video Display u Direct Video access.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Chapter 7 Programming with DOS and BIOS Function Calls Objectives: The use of DOS and BIOS function call How to read the PC’s keyboard How to send text.
Kip Irvine: Assembly Language for Intel-Based Computers
8.4 Instruction Execution Times TOBIN PROC FAR SUB AX,AX MOV DX,AX MOV CX,4 NEXTD: PUSH CX SUB BP,BP MOV CX,4 GETNUM: RCL BX,1 RCL BP,1 LOOP GETNUM.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#8) By Dr. Syed Noman.
Lect 4: Instruction Set and Addressing Modes. 386 Instruction Set (3.4)  Basic Instruction Set : 8086/8088 instruction set  Extended Instruction Set.
Assembly Programming Timothy C. Rice Jr., MIT. OUTLINE Basic Structure Exit to Dos Print Character Clear Screen Change BG & FG Color Set Curser Location.
ICS312 Set 4 Program Structure. Outline for a SMALL Model Program Note the quiz at the next lecture will be to reproduce this slide.MODEL SMALL.586 ;
An Introduction to 8086 Microprocessor.
ORG ; FOUR INT 21H and INT 10H Programming and Macros Dec Hex Bin
Lecture 11 Last notes on interrupts and exam review Dr. Dimitrios S. Nikolopoulos CSL/UIUC.
BIOS1 Basic Input Output System BIOS BIOS refers to a set of procedures or functions that enable the programmer have access to the hardware of the computer.
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
BIOS and DOS Programming in DOS INT 10 and 21H. Interrupts There are some extremely useful subroutines within BIOS or DOS that are available to the user.
1 Screen and Keyboard Operations Suthida Chaichomchuen
Chapter 3 Examining Computer Memory and Executing Instructions.
1 Chapter 5: Procedures and Interrupts Assembly Language for Intel-Based Computers, Kip R. Irvine 3rd edition 3/17/2000.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Text-Mode Programming Question #1 What are the three levels of access to the video display when writing characters on the screen in text mode?
Lecture 10: BIOS and DOS Programming
“It was the night before midterm”. Midterm rule (March 16 nd, 2005) - Student ID is required. Open books, note exam - Don’t: - Leave the exam room after.
Strings, Procedures and Macros
Binary Number Output To display a number in binary format, a program looks at each bit in the number and sends the ASCII equivalent of a ‘1’ (31h) or a.
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
8086 Microprocessor Interrupts By: Vijay Kumar. K Reference From Slide Share.
21/11/2005CAP2411 Input & Output Instructions CPU communicates with the peripherals through I/O registers called I/O ports. There are 2 instructions, IN.
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:
String Instructions String instructions were designed to operate on large data structures. The SI and DI registers are used as pointers to the data structures.
4. Kernel and VGA ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  None.
EEL 3801 Part IV The Assembler. OFFSET Operator Returns address of variable used as operand. Actually, it represents the offset from the beginning of.
Microprocessors Monday, Apr. 16 Dr. Asmaa Farouk Faculty of Engineering, Electrical Department, Assiut University.
Microprocessor Fundamentals Week 2 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
Internal Programming Architecture or Model
Lecture 11 Text mode video
ECE291 Computer Engineering II Lecture 12 Josh Potts University of Illinois at Urbana- Champaign.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
1st prog! Q: Read a char – from a keyboard & display it at the beginning of the next line! ====== A.
Microprocessor and Assembly Language
Computer Organization & Assembly Language Chapter 3
Instruksi Set Prosesor 8088
Lecture 4 Control Flow Structures (LOOPS)
Machine control instruction
ADDRESSING MODES.
Intel 8088 (8086) Microprocessor Structure
Chapter 3 Addressing Modes
9/17/2018 Kiến Trúc Máy Tính.
Microprocessor and Assembly Language
Defining Types of data expression Dn [name] expression Dn [name]
Symbolic Instruction and Addressing
Data Addressing Modes • MOV AX,BX; This instruction transfers the word contents of the source-register(BX) into the destination register(AX). • The source.
Stack and Subroutines Module M17.1 Section 11.2.
Intel 8088 (8086) Microprocessor Structure
8086 Registers Module M14.2 Sections 9.2, 10.1.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Symbolic Instruction and Addressing
Symbolic Instruction and Addressing
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Unit:08 Software Interrupts
Lecture 06 Programming language.
Chapter 6 –Symbolic Instruction and Addressing
Presentation transcript:

Video systems

Lesson plan Review the code for the previous exercise Video systems Review for midterm exam

Midterm exam Thursday,March 16, Include: Multiple choice Fill-in the blank Problem solving

Last practice exercise MOV AX,DATASEG;Set address of data MOV DS, AX MOV AH, 0AH;Get inputs LEA DX, Para_list INT 21H MOV BH, 00;Add ‘$’ to the end MOV BL, act_len;of the input string MOV input[BX+1],'$'

Last practice exercise MOV AH, 02H; set cursor MOV BH, 0 ; page# to BH MOV DH, 12; row# to DH MOV DL, 40; column# to DL INT 10H MOV AH,09H ; display the string lea dx, input int 21h

Video systems Components of a video system Monitor Monitor Signal Generator Character Generator Mode Control Video controller Attribute Decoder Video display Area

Video systems Monitor Consists of a group of closely-spaced horizontal lines (raster) Each line consists of points Each points consists of three luminescent phosphor dots Video Display Area Is the area in memory to contain data for text and graphic mode (buffer) Address depends on the type of video adapter and chosen mode

Video systems Video display area: A0000H: font descriptors B0000H: monochrome text for mode 07H B8000H:Text and graphic modes Allows store data in pages Video controller Generates horizontal and vertical timing signals

Video systems Video BIOS: Acts as an interface to the video adapter contains routines as setting the cursor and displaying characters Video RAM bios supports two Video Data Areas: 40:[49H]: current mode, #columns, size 40:[84H]: #rows and height

Video systems Video modes (text and graphic modes) ModeTypeArea Page 07 MonochromeB ColorB8000-3

Attributes Attribute byte in text mode determines the characteristics of each displayed characters BackgroundForeground BlackBlue01H BlueRed14H GreenCyan23H WhiteLight magenta7DH GreenGrayA8H

BIOS INT 10H We have learned INT 10H to: This week, we use this 10H to manage screen, cursor, pages Clear screen Set cursor

Set video mode Step 1: Set AH=00H Step 2: Load video mode to AL (see video mode on page 156) Step 3: Call INT 10H Example: MOV AH, 00H MOV AL, 00H ;Text mode 40x25 INT 10H

Video mode supported by EMU h - text mode. 40x colors. 8 pages. 03h - text mode. 80x colors. 8 pages. 13h - graphical mode. 40x colors. 320x200 pixels. 1 page

Set cursor size Step 1: Set AH=01H Step 2: Set CH=start scanning line Step 3: Set CL =end scanning line Step 4: Call INT 10H Start scanning line: [0,13] End scanning line:[0,14] when bit 5 of CH is set to 0, the cursor is visible. when bit 5 is 1, the cursor is not visible.

Set cursor size Example: MOV AH, 01H MOV CH, 00H MOV CL, 07H INT 10H

Get cursor status Cursor status include: row, column and size of the cursor Step 1: Set AH=03H Step 2: Set BH= page number Step 3: Call INT 10H Step 4: Return values at DH=Row, DL=Column, CH= Starting scan line and CL= Ending scan line

Get cursor status Example MOV AH, 03h MOV BH,0 INT 10H

Scroll up screen Step 1: Set AH=06H, Set AL= number of rows Step 2: Set BH= Attribute or pixel value Step 3: Set CX: starting row:column Step 4: Set DX: ending row:column

Scroll up screen Example: MOV AX, 602H; AH=06H, AL=02H MOV BH, 61H; Brown background, ; Blue foreground MOV CX, 0000H MOV DX, 184FH; Scroll full screen INT 10H

Scroll down screen Step 1: Set AH=07H, AL=00H Step 2: Set BH=attribute or pixel value Step 3: Set CX=Starting row:column Step 4: Set DX=Ending row:column

Scroll down screen Example: MOV AX, 702H; AH=06H, AL=02H MOV BH, 61H; Brown background, ; Blue background MOV CX, 0000H MOV DX, 184FH; Scroll full screen INT 10H

Display character and attribute at cursor Step1: Set AH=09H Step 2: Set AL=character to display Step 3: Set BL = attribute or pixel value Step 4: Set BH= page number Step 5: Call INT 10H

Display character and attribute at cursor Example: MOV AH, 09H MOV AL, 41H MOV BL, 16H MOV BH, 0 MOV CX, 10 INT 10H

Read character and attribute at Cursor INT 10H Function 08H MOV AH, 08H MOV BH, 00 INT 10H The character will be stored at AL and its attribute is stored in AH

Review midterm exercise Review chapter 8

Read Character Generator Data INT 10H function 11H and subfunction 30H Example Step 1: Set AH=11H and AL=30H Step 2: Set BH=0; code 0,1,2..7 Step 3: Call INT 10H

Display character string INT 10H, function 13H Step 1: Set AH=13H Step 2: Set AL=subfunction(00,01,02,or 03) Step 3: Set BH=page number Step 4:Set BL=attribute Step 5: Set BP=address of the string (ES:BP) Step 6: Set CX=length Step 7: Set DX=row:column Step 8: Call INT 10H

Display character string Example: MOV AL, 1 MOV BH, 0 MOV BL, b MOV CX, 10; MOV DL, 10 MOV DH, 7 PUSH DS POP ES LEA BP, offset message MOV AH, 13h int 10h

Answers for review exercise 1. On the display screen, the row:column (a) for the upper left corner is numbered _00_H:__00__H; (b) for the upper right corner is _00__H:_4F_H; (c) for the lower left corner is _18__H:_00__H; (d) for the lower right corner is _18___H:_4F_H.

Answers for review exercise 2.INT 10H_ is the BIOS operation for screen handling, and function 02__ in AH tells the operation to set the cursor. Page number, normally 0_, is in the _BH__ register, and row and column are in the _DX__ register.

Answers for review exercise 3. For screen clearing or scrolling, use BIOS INT 10H__ and insert function _06H_ in AH, _00__ for full screen in AL, _attribute___ in BH, starting row:column______ in CX, and ending row:column_____ in DX.

Answers for review exercise 4. INT 21H function 09H for displaying requires defining a display string in the data area, immediately followed by the __$____ character.

Answers for review exercise 5. For INT 21H function 0AH, the area for keyboard input requires definition of a _parameter_ _list___. The first byte contains maximum number of character entered_. The second byte is for the operation to store the __actual number of character entered_. The third byte begins a field that is to contain _entered ______ _characters_________.

Answers for review exercise 6. INT 21H function _40H__ for file handles requests display. Load file handle 01 in the _BX__ register, the number of characters to display in the _CX__ register, and the address of the area to display in the _DX__ register.

Answers for review exercise 7. The hex character for Tab is _09H_, for Line Feed is _0AH_, and for Carriage Return is _0DH_.

Answers for review exercise This code uses the instructions for INT 21H function 40H to display the message "Informatics Computers" followed by a Carriage Return and Line Feed, to begin displaying at row 02, column 18.

Week 5 review A _short_____ address is limited to a distance of -128 to 127 bytes. A _near_____ address is limited to a distance of 32,768 to 32,767 bytes within the same segment. A _far___ address is one that is (usually) in another segment and is reached by a segment:offset value.

Week 5 review The LOOP instruction requires an initial value in the _CX__ register. For each iteration, LOOP deducts 1 from this value; if it is __zero______, control drops through to the following instruction, and if it is _nonzero______, control jumps to the operand address.

Week 5 review The _CALL___ instruction transfers control to a called procedure and the RET___ instruction returns from the called procedure to the original calling procedure.

Week 5 review A CALL to a procedure within the same segment is _near___ (short/near/far) and decrements the _SP__ register by 2, pushes the _IP__ register (containing the offset of the instruction following the CALL) onto the stack, and inserts the offset address of the called procedure in the _IP_ register.

Week 5 review A RET instruction that returns from a near procedure pops the original value from the stack into the _IP__ register and increments the _SP__ register by 2.

Week 5 review AX= 0CX=5 AX=AX+BX = 0+25CX=4 AX=AX+BX = CX=3 AX=AX+BX= CX=2 AX=AX+BX= CX=1 AX=AX+BX= CX=0 (quit) AX= 25*5 = 125