Simple signal drawing on graphical LCD routines

During my spare time, I have been playing with graphical LCD. This time I decided to display simple signals that are stored in microcontroller memory. The idea was to read signal values from a lookup table and display waveform on Graphical LCD. To make things more interesting, I divided the LCD screen into four smaller screens to activate them separately and draw signals in them. Graphical LCD is the same old HQM1286404 with KS0108 controller. I have used Proteus simulator 128×64 graphical LCD(LGM12641BS1R), which is based on KS0108. How to implement and connect LCD there was a blog post (Simulate KS0108 graphical LCD with Proteus simulator )about it. I am just going to show main program routine. As I mentioned I have split 128×64 in to four smaller screens like this: So I get four smaller 32×63 screens where I can put different information. To do this, you can think of many ways of implementation. I have chosen a simple solution. I have created a simple structure that holds a currently active window position and size: