My system in pascal

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
michalek

My system in pascal

Post 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??
Adek336

Re:My system in pascal

Post 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.
michalek

Re:My system in pascal

Post by michalek »

Can you napisac to in Polish??
DennisCGc

Re:My system in pascal

Post 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
ASHLEY4

Re:My system in pascal

Post 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.
Post Reply