64K RAM SYSTEM 38911 BYTES OF STUFF I MADE
ASM Graphics Example
This project was another coursework given by uni, the aim was to write a handful of functions in assembly to draw shapes into video memory.
These we're split into steps, with the first 3 being to:
- Draw lines onto the screen using the bresenham line drawing algorithm.
- Use the stack to store variables being passed into the function.
- Manipulate video memory directly instead of using the bios interrupt.
You can see my generated image here:
Step 4 required me to add a function that would draw circles, and another to draw filled rectangles.
I started on the filled rectangle and did some research into bit manipulation instructions since we were not allowed to just loop x and y coordinates, i solved this by using the "rep" and "storeb" instructions to draw a line before moving to the next line.
For the circle drawing function i used the bresenham circle drawing algorithm, you can see the results here:
The final step was to implement a polygon drawing function. For this i added a handful of helper functions that would create a custom array "type" variable in memory that could be stepped through and give the coordinates to draw lines between. These arrays would have a header and footer bytes for error checking and had a function for populating it.
You can see the final image generated here:
If you would like to see the code for this project let me know in an email.
Tech Used
Info
Date Written:
11/2022