Page 1 of 1

My system in pascal

Posted: Sat Apr 17, 2004 1:21 am
by michalek
I write an OS in Pascal(freepascal)...aND i HAVE SIMPLE CODE:

KERNEL.PAS

unit kernel;
interface
{$ASMMODE intel}
procedure 13h;
implementation
procedure 13h;[public,alias:'13h'];
begin
asm
mov ax, 13h
int 10h
end;
end;

begin
end.

and start.asm(write and compile with nasm):

[BITS 32]
[global start]
[extern 13h]

start:
call 13h

And I have error, when I link those file:
Can't find start(or _start).... Can you help me??

Re:My system in pascal

Posted: Sat Apr 17, 2004 6:30 am
by Adek336
Witaj mlody programisto w czarna rzeczywistosc Programowania Systemowego :)
Welcome, young programmer into the deep realms of System Programming :)

hm.. I'm not an expert in freepascal, but how about asking the linker to change the starting routine: create a linker script and use the command "ENTRY (function-name-or-addr)".

What toolchain are you using? What is the host operating system?

Cheers,
Adrian.

Re:My system in pascal

Posted: Sat Apr 17, 2004 6:47 am
by michalek
Can you napisac to in Polish??

Re:My system in pascal

Posted: Sat Apr 17, 2004 7:27 am
by DennisCGc
Okay, back on-topic, and please talk in English, unless else specified.
I'm not Polish :) So please talk in English. (But you did ;) )
Programowania Systemowego
Programming System ::) = System Programming

Re:My system in pascal

Posted: Sat Apr 17, 2004 2:26 pm
by ASHLEY4
Have you seen this OS made with freepascal:
http://www.thegaineys.fsnet.co.uk/
I made a turbo pascal Dos clone about 3 years go (real mode).
It ended up 90% in line asm, Also as freepascal is made to run in 32bit pmode with dos-extender you may have to do some code hacking :'(

ASHLEY4.