Galvo and Gcode

Hello everyone.
I am doing galvolaser project and ı am using galvomotors. I have a DAC circuit with mcp4725 for my galvomotors and I can scan square area. I need to read g code but I don't know how can I do. Anyone can help me ?

You could use an existing GCode parser like GRBL or Marlin. They generally work with Step-and-Direction stepper drivers so you might have to adapt the code to drive the D/A outputs.

Are you sure you want to use GCode? It's designed for machining metal so it is not optimized for speed and may slow down your display. Perhaps a 2D drawing format like DXF would be better for a fast machine.

How can adapt that ı have no idea

I have no idea for dxf format. I have a project and ı am doing galvolaser. and ı need to transfer any shape or figure working area. how can ı do it with dxf format ?