The motion of the car controlled by the player is created as:

1.      The background in SCROLLBUFFER is scrolled down 1 row

2.      The area where the player’s car is going to be painted is saved in a temporary buffer (UNDERCAR)

3.      The player’s car is drawn in the SCROLLBUFFER

4.      The last 50 rows of the SCROLLBUFFER are copied to the video memory, so they appear on the screen

5.      The program is paused for a short period of time, so you can see the image on the screen

6.      The background image is restored by restoring the area under the player’s car from UNDERCAR

7.      The process is repeated from step 1

 

 

In this assignment you have to perform 4 tasks that will enable you to see the player’s car moving:

 

  1. Create a procedure to save an area under the player’s car in SCROLLBUFFER
  2. Create a procedure to restore the area under the player’s car in SCROLLBUFFER
  3. Create a procedure that will scroll the content of the SCROLLBUFFER one line
  4. Create a procedure that will create a short delay

 

Email you executable and turn in the .asm file of the compiled program printed in Courier New 9pts font.

 

!!!! Late submissions for this assignment will not be accepted !!!!

 

The details of the assignment and hints are given in the source code.

Before running the program, do the following:

1. Make sure that the window size for Windows command prompt is set to be 50 characters

 

 

After all 4 tasks are complete, the program will show the road scrolling under the car. The program terminates with the following image. Use it to check correctness of  your program.