Hi,
Have attatched some files that may be of help, basically its from my assembler program for the more modern spi glcds that a friend has modifed to run the 12864 glcd on his Mikroe dev board.
The .dsn / .jpeg files show the circuit, but when used with the .hex file it will actually run as a live demo.
If you do not know how to do that let me know and I will send you details of how to do it.
As for the main assembler coding - its 1500 lines long and not easy to follow.
What little I know about C , you are using Cs glcd library I think, but not sure if you still need to define the i/o ports and importantly, specify the initialisation routine.
I have sent the assember init routinue which I think you can follow and convert if necessary.