2 Pascal questions

Programming, for all ages and all languages.
Post Reply
kerim

2 Pascal questions

Post 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 !
Tim

Re:2 Pascal questions

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

Re:2 Pascal questions

Post by kerim »

What is ISTR Turbo Pascal ? Is it a standard Turbo Pascal or what ... ?
Tim

Re:2 Pascal questions

Post by Tim »

"ISTR" means "I seem to remember".
kerim

Re:2 Pascal questions

Post by kerim »

Is there any other Pascal compiler that could be usefull for this task ?
Tim

Re:2 Pascal questions

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