Write a procedure, PaintIthBar, that assumes values in the following variables to be set before it is invoked.
color db ? ; a valid color value height db ? ; a value between 0 and 200 i db ? ; a value between 0 and 19The procedure will paint the portion of the screen for the Ith bar that corresponds to its height with the given color pixels. The writing of the pixels should be done directly to the video area in memory.
Hint: The address (offset from start of video area) of the top left corner of the Ith bar would be computed by the following formula:
320 * (200 - height) + (16 * I) + 4Once this address is computed, a loop can be set up to write the pixels to paint the Ith bar.
PaintIthBar proc near
PaintIthBar endp