Hi,
i'm a brazilian programmer and i'm reading about OS development.
Initially, i write my own OS using asm and C. I write a lot of functions, and now I started a new OS using asm and Pascal (I prefer)...
My question: How can I use a function written in C in a pascal code?
I don't wanna write it again...
(I generated the .o file using: gcc -Wall -O -nostdlib -fno-builtin -fno-exceptions -I./include -c -o isrs.o isrs.c).
(Sorry for my english..)
Thanks!
pascal x C
You might want to check out the wiki page on Pascal. It has some info about interfacing with ASM, at least. C, I don't know, having no experience with pascal.
If you are using FP (its your only choice if you want to combine C into it, and if yer OS is 32bit), you can attach this into your function declaration:
function Blahblah(Foo: Integer); stdcall; [public, alias:'NameOfThisFunctionInGCC'];
Happy coding
Regards
inflater
function Blahblah(Foo: Integer); stdcall; [public, alias:'NameOfThisFunctionInGCC'];
Happy coding
Regards
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )