Page 1 of 1

2 Pascal questions

Posted: Fri Jun 20, 2003 3:24 pm
by kerim
1. I wrote a simple Pascal program which writes 'Hello world!!!' on the screen.

begin
writeln('Hello world!!!');
end.

Then I compiled it to .EXE version. What I want is to make it .COM program. So I tried to do it with EXE2BIN and EXE2COM, but both of them said that the .EXE file cannot be converted to .COM/.BIN version.
Why not ? If anyone knows how to do this, please tell me.

2. I also want to write a simple real-mode OS using Pascal (and inline assembler). Which compiler is the best for this ?

Best regards !

Re:2 Pascal questions

Posted: Fri Jun 20, 2003 4:18 pm
by Tim
kerim wrote:Then I compiled it to .EXE version. What I want is to make it .COM program. So I tried to do it with EXE2BIN and EXE2COM, but both of them said that the .EXE file cannot be converted to .COM/.BIN version.
Why not ? If anyone knows how to do this, please tell me.
The answer to "why not" is long and mainly irrelevant. Check your Pascal compiler; ISTR Turbo Pascal had an option to output a .COM file.
2. I also want to write a simple real-mode OS using Pascal (and inline assembler). Which compiler is the best for this ?
A C compiler? ;)

If you're targetting real mode then you're probably best off with Borland Pascal, if you can get hold of it (I don't think it's free). It has a pretty good inline assembler -- it's not up to gcc standards, but it should do what you want.

Re:2 Pascal questions

Posted: Sat Jun 21, 2003 5:27 pm
by kerim
What is ISTR Turbo Pascal ? Is it a standard Turbo Pascal or what ... ?

Re:2 Pascal questions

Posted: Sun Jun 22, 2003 4:39 am
by Tim
"ISTR" means "I seem to remember".

Re:2 Pascal questions

Posted: Wed Jun 25, 2003 4:49 pm
by kerim
Is there any other Pascal compiler that could be usefull for this task ?

Re:2 Pascal questions

Posted: Wed Jun 25, 2003 5:24 pm
by Tim
The only other Pascal compiler I know of is Free Pascal (gpc), which only targets 32-bit machines (since it uses the same back-end as gcc).