CS360 Graphics Assignment #1

Date Due: One week following "Bresenham's Line Drawing" lecture.
Points: 50

You are to write several assembly language routines that will comprise the graphics package needed to complete this assignment. Save all of these routines in the file "graphlib.asm" which will be assembled into "graphlib.obj" which can then be used in the Turbo C++ environment. The assembly routines are as follows:

1) extern void hires_mode() - sets the screen to 640 x 200 B/W graphics mode

2) extern void normal_mode() - sets the screen to 80 x 25 color text mode

3) extern void graph_clear() - clears the high resolution graphics display

4) extern void plot_pixel(int xcoord,int ycoord) - plots one high resolution pixel at location (xcoord,ycoord). The screen is as follows:

5) extern void draw_line(int xstart, int ystart, int xend, int yend) - draws a line between the points (xstart,ystart) and (xend,yend). The algorithm to be used is Bresenham's Line Drawing Algorithm which must be the full blown version implemented in all octants.

6) extern void screen_dump() - dumps the contents of the screen to the printer

Note1: Thouroughly test your program. I will link your library to my C driver program and much of your grade will be based on the execution results.

Note2: All variables must be integers.

Note3: Turn in a listing of graphlib.asm along with your diskettes containing the graphlib.asm and graphlib.obj.

Note4: Remember, a full implementation of Bresenham's algorithm involves cases other than 0 <= dy <= dx.

Note5: The plot_pixel routine is not to use any system interrupts as they are too slow.

Note6: Documentation is to be kept in the lab between 9:00am and 5:00pm.

Note7: Finally I will grade your assembly language programs on speed, efficiency, style and documentation. The library "graphlib.asm" will be assembled using MASM and linked using TLINK so make sure you test this completely.


©1995 Douglas J. Ryan
Douglas J. Ryan/ryand@tardis.pacificu.edu