According to The Kilobug Team:
Do you know how to access the program directory (like Paramstr(0)
does) from an ASM program?
If the main program has been compiled with GPC, it puts a pointer to the vector of parameters on a global variable `Gpc_argv', and `Gpc_argc' carries their number. In Pascal syntax, you can access them directly using
Const many = 1024; (* or whatever *)
Type ArgVector = array [ 0..many ] of CString;
Var GpcArgC: asmname 'Gpc_argc' Integer; GpcArgV: asmname 'Gpc_argv' ^ArgVector;
You know how to access such variables from ASM.
Hope this helps,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]