1 / 15

3 Types of Video Output for Text

3 Types of Video Output for Text. DOS-level INT (Int 21) Output can be easily redirected to other devices (printer, disk) Slow Speed Cannot control the text color BIOS-level INT (Int 10) Higher speed than DOS (when filling large areas, a slight delay detected).

dennis
Download Presentation

3 Types of Video Output for Text

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3 Types of Video Output for Text • DOS-level INT (Int 21) • Output can be easily redirected to other devices (printer, disk) • Slow Speed • Cannot control the text color • BIOS-level INT (Int 10) • Higher speed than DOS (when filling large areas, a slight delay detected). • User can control the text color • Output cannot be redirected • Direct video Access (Memory Mapped Graphics) • Characters are moved directly to video RAM, so execution is instantaneous • Output cannot be redirected • Usage restricted to full-screen mode under Windows NT, 2000, and XP

  2. Basic Text Screen

  3. Text Modes(can only display characters from the IBM extended Character set)

  4. Graphics Mode-(can draw any combination of pixels(dots)

  5. BIOS • Basic Input Output Service – a set of X86 routines stored in ROM that can be used by any operating system for low level I/O to various devices. • Int 10h – Video Services • Int 16h – Keyboard Services • Int 17h – Printer Services • Int 33h - Mouse Services

  6. Bios Interrupt 10h – Video Services

  7. Lab 7A – Positioning the Cursor • Irvine Library Function – Clrscr • Dos Int 21h, Function 7 – get char with no echo • ‘w’- move “up” - ‘a’ – move left • ‘s’ – move “down” - ‘d’ – move right • Procedure “Setcur” – uses BIOS int 10h, function 2 to set cursor position.

  8. Value Attributes 07 Normal 87 Blinking 0F Bright(highlight) 70 Reverse(inverse) 01 Underline 09 Bright underline Monochrome Attributes

  9. Color Attributes – foreground – chars; background – screen behind chars b7 b0

  10. BIOS Interrupt 10h- Video Services

  11. Lab 7B – Character Attributes • Procedure setcur – positions cursor • Procedure wchar – writes character with attribute at current cursor position (will have to increment column)

  12. Random Number Generation • Irvine Library Functions • Randomize – Re-seeds the random number generator. Current time value is seed value. No input or output required. Only needs to be called once at the beginning of a program. • Random_Range – Returns a pseudo-random 32-bit integer between 0 and n. Input: EAX = n.

  13. Lab 7C – Pseudo-Random Numbers; Delay • Randomize and Random-Range used for random number generation. EAX = 10 to produce the values 0-9. To display ASCII value, 30h added to returned value. • Procedure mywait – waits the number of milliseconds in CX.

  14. Mywait Procedure • Uses 64-bit timer • Timer accessed through timget procedure • Uses rdtsc (read time stamp counter) • Windows 95 and some 98 versions have problems with the timget procedure • Inner loop of mywait waits number of timeticks equivalent to 1 millisecond (TICS_MS = CLKFREQ*1000) • Need to set CLKFREQ = your PC clock frequency

  15. CLKFREQ • START->Search->Find->FILES/Folders • Find ‘msinfo32.exe’ • Programs->Accessories->System Tools->SystemInfo • System Summary • Reboot PC – watch BIOS screen information

More Related