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 !
2 Pascal questions
Re:2 Pascal questions
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.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.
A C compiler?2. I also want to write a simple real-mode OS using Pascal (and inline assembler). Which compiler is the best for this ?
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
What is ISTR Turbo Pascal ? Is it a standard Turbo Pascal or what ... ?
Re:2 Pascal questions
Is there any other Pascal compiler that could be usefull for this task ?
Re:2 Pascal questions
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).