From FreeBASIC I have taken some gfx graphical functions and procedures and set them in a .dll
Both 32 and 64 bit dlls.
Also a .pas test file and compiled .exe files, which you will probably want to overwrite with your own pascal compilers.
Also the FreeBASIC source code is there.
I have put the declaration (dll calls) into a seperate file (gfx.inc) and used {$include gfx.inc} in the .pas files.
(I don't know if this is standard pascal procedure, I am a bit new to pascal)
files;
https://www.mediafire.com/file/wqgt642w93a6va9/gfxgraphics.zip/fileNote: for a bit of fun only.