Video memory organization in text mode:

 

 

- Starts at 0B800:0000

-  Each character on the screen takes 2 bytes in memory: attributes + ASCII code

-  Each screen takes 80x25x2 = 4000 bytes of memory (80x50x2 in the HW)

 

IBM PC text mode extended ASCII table:

Examples:

 

Capital ‘A’ has the ASCII code 41H

 

‘0’ has the ASCII code 30H

 


 

 

 

 


Here is we are going to draw on the text screen:

 

1.      Background of size 80x 66 characters                2. The place under the car is saved in          3. The lower part of the image is
is created in a memory array                              in a temporary array and a car is                  copied into the video memory using

      (SCROLLBUFFER)                                            painted on the background                            string operations – this is what you

                                                                                                                                                            see on the screen

                                                     

 

 

4. The background is restored to the original state by restoring the image from under the car.

    To create motion, the background scrolled down one line and the whole process repeats.

    After 16 scrolls new background is drawn on the top of the SCROLLBUFFER