Hello Steemians I want to briefly explain on the programming of video diaplay. Its a little bit vast but I would like to elaborate it on my own for better understanding
The video display provides a means of visually presenting your application to the user..Because the user bases his conclusions primarily on what he sees and how effective your application executes, The facilities offered by the video system should be of almost important to you as a programmer .
It is impossible to ignore the video display in any serious programming endeavor...
I'm going to describe the methods and means of generating appreciable outputs on the screen..I'm going to rely greatly on the service available in the ROM BIOS video routine
I will be able to explore the video hardware features, Functions that manipulate the screens display ...
MICRO COMPUTER DISPLAY HARDWARE
The video display adapters found on IBM PC-compatible computers have a hybird interface to the central processor. The overall display characteristics, such as vertical and horizontal resolution, background color and palette,are controlled by values written to I/O ports whose addresses are hardwired on the video display adapter.
The appearance of each individual character or graphic pixel on the display ,however are controlled by a specific location withing an area of memory called the REGEN BUFFER, or refresh butter. Both the CPU and the video controller access the memory.the software updates the display by simply writing character codes or bit patterns directly into the regen buffer..This is called MEMORY-MAPPED
DISPLAY PAGES
The amount of ram physically installed in the various subsystem is frequently not enough to contain one screen's worth of video data in the text mode.
In video modes where this is true ,all PC video system support multiple display pages.When you use display pages ,the video buffer is mapped into two or three areas ,or pages ,each of which can hold a screen full data. The video hardware displays one of these pages on the screen , and may be switched among pages under program control.
Information and data can be written to nondisplayed pages as well direct on the displayed pages. Using this technique ,you can build up a screen on a nonvissible page while another page is being displayed. Switching screen images this way makes screen images updates seem instantaneous...
For the EGA,MCGA,VGA,and SVGA, the page concept is also support as in text mode. In fact, there is no reason not to have multiple grapi pages if the memory is there to support it...
The main benefits of multiple pages for either graphics or text is to be able to switch instantly from one display screen to another without taking time to build the display information from scratch .in reality, multiple pages could be used in graphics modes to produce smooth and fine-grained animation effect if there is enough memory to support it.
MAPPING CHARACTERISTICS IN TEXT MODE
In text modes, The memo map begins with the top left corner of the screen with two bytes devoted to each other character position.The memo bytes for the successive characters immediately follow in the order in which you would read them from left to right and from top to buttom
Mode O and I are text modes with a screen formats by 40 columns by 25 roles. Each roles occupy 40×2 ( 80) bytes. A screen occupies 2kb in modes I and O which means the CGA's 16-KB memory can accommodate 8 pages .
If the roles are numbers 0 through 24 and its columns are numbered A through 39,The upset of any screen character in the first display page is given by a basic formula: CharacterOffset=(RowNumber80+(Column number2)
THE ATTRIBUTE BYTE
its been stated that each character display position is allocated two bytes in the regen buffer.The first bytes (even address) contained the ASCII code of the character, which is translated by a special hardware character generator into a dot-matrix partern for the screen.
The second byte(odd address) is the attribute byte.
Several bit fields in this byte control such features as blinking intensity (highlighting) and reverse video,depending on the adapter types and display modes.
The background color and foreground colour are specified by two hexadecimal digits. For example a colour code 17H represents a blue background and white foreground colour, Text written with this attribute is white and appears on a blue background. Again,the colour code 24H represents a text colour of red on a green background. 24H also represent a yellow text on a blue background.
And also guys, You can select background colours in the range of OH to 7H.
Foreground colours range from OH to FH (0-15 decimal). Selecting foreground colours above 7 implies that the intensity bit is set.This actually means the intense versions of colour codes 0-7
To cause a character to blink ,add 8H to the background colour. For example if you want to get a blinking white text on a blue background 17H, you add 8H to the background colour (IH) to obtain 97H. Again to obtain a blinking red text on a green background 24H we add 8H to 2H then the background colour will change to A4H
CONTROLLING THE VIDEO DISPLAY
The control of the display screen can be obtained in three ways
-By using MS-DOS services
-By using BIOS services
-By directly manipulating the hardware via memory..
MS-OOS offers only few supports for display functionality,The services obtained are mainly output of character and string to the display .
The BIOS services are particularly powerful, and provide nearly all functions needed to generate display screen outputs, control the cursor, and manipulate screen information.
For maximum control over the video displah,you can bypass the software services and place data, directly into the video buffer when you feel that you have a good reason to do so..
Direct output certainly has speed advantages and in early days it was the popular way to go . This however has been changed by the introduction of incredible fast hardware devices that today,the speed advantage is less obvious.
THE BIOS VIDEO SERVICES
The BIOS video services are requested by generating interrupt 10H. There are 25 principal services, used by IBM PC and compatible computers. Like all the BIOS services, the video services are numbered beginning with 00H and are selected by placing the service number in the AH register. The service usually request you to specify Addi parameters in register AL,BX,CX or OX.
Thanks guys for having your time out I hope y'all learnt a lot in this my programming section
References
Video display and video adapters-
https://gradestack.com/Programming-in-C-/C-Graphics/Video-Display-And-Display/21213-4330-53323-study-wtw
Programming and design of Dot matrix-
https://www.udemy.com/do