Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-12

I can't get my pascal compiler to run because I don't know how

7 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Robert Waring

I recently downloaded the pascal compiler for windows, I installed it but I don't understand how to do the things it then asked me to do. My computer knowledge is not great but I'm doing a correspondence course and I'm trying to learn, so if any one could explain in simple terms how to: Extend the path variable with 'c:\pp\bin\win32'
To compile files enter 'ppc386[file]'
To start IDE type 'FP' at commamd line prompt
I would be very grateful.

It said in the read-me file where I found this address that I should point out that I am not subscribed to the mailing list so that you can send me a copy of your answer. My e-mail address is

Thanks for your help

Rob Waring

Reply by email

Alan Grimes
to Robert Waring

om

I am getting back to work again... My current half-baked plan is to skip making the thing load on a raw system and instead use DOS's brilliantly designed and perfectly reliable loader. ;)

The units document could use a master units index that collects all the unit overviews into a few pages of description. -- again I'm looking for roadmaps and guideposts....

My biggest questions at the moment have to do with actually writing a kernel in FPC; and then writing programs that can be loaded and run correctly in my far-from-standard OS environment...

It seems that my biggest enemy is the 'system' unit... From the description, it seems that it is loaded IMPLICITLY by the compiler with no "uses" statement. This is doublepluss ungood because My OS design is about a 180 degree departure from what the current system unit does, How do I get the compiler to require the system unit be loaded explicitly?

DPMI is an application level interface. This is an OS project which will use the lower VCPI interface; How do I write my kernel loader for VCPI?

The compiler -? switch reports that the system can output several types of object files. What file format specifications do these comply with? Are there currently available units that can work with and load these file formats?

In Unix land, more is actually less. DOS is much more streight forward. ;) http://users.erols.com/alangrimes/ <my website.

Reply by email

Marco van de Voort
to Alan Grimes
Show quoted text 5 lines
It seems that my biggest enemy is the 'system' unit... From the description, it seems that it is loaded IMPLICITLY by the compiler with no "uses" statement. This is doublepluss ungood because My OS design is about a 180 degree departure from what the current system unit does, How do I get the compiler to require the system unit be loaded explicitly?

You can't.

However, not all in System is required.

See rtl/fakertl and rtl/template for examples of ultra tin System.

Note however that certain parts of the System unit are necessary for certain language features:

- Nearly all string handling needs external routines in System
- Certain Set operations do.
- File IO does, and with that writeln and readln.
- coprocessor (floating point types)
- int64 handling
- Nearly all delphi language extensions need help (provided in pseudo system unit objpas)

IOW that unit IS mandatory. However its contents and their implementation are only for a small part.

If you move certain parts of the system unit (like e.g. memory management, which is a "larger" part) to the kernel, the system unit can be very thin.

Reply by email

Alan Grimes
to Marco van de Voort
You can't.

Then how do I get it to link to an alternate?

See rtl/fakertl and rtl/template for examples of ultra tin System.

k
So RTL== System unit?
or is that not perfectly accurate?

Show quoted text 7 lines
Note however that certain parts of the System unit are necessary for certain language features: - Nearly all string handling needs external routines in System - Certain Set operations do. - coprocessor (floating point types) - int64 handling

These, ofcourse stay...

Memory managment needs to be totally revamped though. =\ Additionally, there will need to be system managment functions...

- File IO does, and with that writeln and readln.

File support is optional in my OS. This is the case so that all persistant storage schemes is equally well supported...

- Nearly all delphi language extensions need help (provided in pseudo system unit objpas)
If you move certain parts of the system unit (like e.g. memory management, which is a "larger" part) to the kernel, the system unit can be very thin.

In a standard OS, there needs to be a two-level memory managment scheme. A system/protection level, and an object level scheme. The system level providing hardware level protection and the object level being light-weight and quick.

Thanx for the pointers, I'll see what I can do with them.

In Unix land, more is actually less. DOS is much more streight forward. ;) http://users.erols.com/alangrimes/ <my website.

Reply by email

Marco van de Voort
to Alan Grimes
> You can't. Then how do I get it to link to an alternate?

- Create the alternate. (see also the "Internal" developper docs, which lists some of the external systems) 1)
Also watch the name of the system unit.
- Compile the new system unit with -Us
- Now it will link with own made programs. Use special LD options to get the effect you want. You can get full control over assembling and linking by doing it by hand (use -s)
- Thoroughly test it.

> See rtl/fakertl and rtl/template for examples of ultra tin System. So RTL== System unit?

No. RTL is simply the base system as it is standardly distributed with the compiler. The rest are "extra" packages.

The RTL mostly contains basic functionality, and often some OS specific base units. (like the Windows API definitions)

The System unit is a part of the RTL, and at the same time also the _minimal_ possible RTL. ( minimal as in minimal number of units used, 1)

Show quoted text 9 lines
> Note however that certain parts of the System unit are necessary for > certain language features: > - Nearly all string handling needs external routines in System > - Certain Set operations do. > - coprocessor (floating point types) > - int64 handling These, ofcourse stay...

Coprocessor handling and even routines might be system dependant, since your kernel may initialize the coprocessor in a different way.

Memory managment needs to be totally revamped though. =\

Don't forget that a linear address space for the basic segments is mandatory. Extra segments can only be used by extra code. (or via the FS construct of Go32V2)

Additionally, there will need to be system managment functions...

One first has to define the kernel -> program interface.

> - File IO does, and with that writeln and readln. File support is optional in my OS. This is the case so that all persistant storage schemes is equally well supported...

Standard IO to the screen also uses the concept of files in a limited way.

Show quoted text 8 lines
> If you move certain parts of the system unit (like e.g. memory > management, which is a "larger" part) to the kernel, the system unit > can be very thin. In a standard OS, there needs to be a two-level memory managment scheme. A system/protection level, and an object level scheme. The system level providing hardware level protection and the object level being light-weight and quick.

I'm talking about the usermode interface, and the way how user and kernel mode memory management interact (how can the application request a block from the kernel)

Also some Delphi features (and maybe more code nowadays) needs a way to retrieve the size of an allocated block. This could be a consideration in designing your userland memory system.

var p : pointer;
getmem (p,1000000);
freemem(p);				// freemem must be able to deallocate P
	  			  	   without getting the size of the allocated block
					as param.
Thanx for the pointers, I'll see what I can do with them.

Try to find Ozon OS on the net. I had some discussions with them about these subjects before.

In Unix land, more is actually less.

Actually, no :-) There is a "more" and there is a "less".

Some stupid Linux distro's might symlink more to less though.

DOS is much more streight forward. ;)

Actually, I find protected mode programming easier than the old 16- bit dos way.

One can program PM programs under Dos, but always has to consider 16-bit issues when interfacing with the kernel (io.sys, msdos.sys)

Marco van de Voort ( or )

Reply by email

Florian Klaempfl
to Alan Grimes: om I am getting back to work again... My current half-baked plan is to skip making the…
you wrote 19 lines
om I am getting back to work again... My current half-baked plan is to skip making the thing load on a raw system and instead use DOS's brilliantly designed and perfectly reliable loader. ;) The units document could use a master units index that collects all the unit overviews into a few pages of description. -- again I'm looking for roadmaps and guideposts.... My biggest questions at the moment have to do with actually writing a kernel in FPC; and then writing programs that can be loaded and run correctly in my far-from-standard OS environment... It seems that my biggest enemy is the 'system' unit... From the description, it seems that it is loaded IMPLICITLY by the compiler with no "uses" statement. This is doublepluss ungood because My OS design is about a 180 degree departure from what the current system unit does, How do I get the compiler to require the system unit be loaded explicitly?

The compiler needs the system unit because it loads all type definitions from the system. I think Marco gave already the hint with the fake rtl. Put only things which the compiler needs into the system unit and the OS specific things into an extra unit.

Reply by email

Jonas Maebe
to Robert Waring: I recently downloaded the pascal compiler for windows, I installed it but I don't…
Robert Waring wrote 5 lines
I recently downloaded the pascal compiler for windows, I installed it but I don't understand how to do the things it then asked me to do. My computer knowledge is not great but I'm doing a correspondence course and I'm trying to learn, so if any one could explain in simple terms how to: Extend the path variable with 'c:\pp\bin\win32' To compile files enter 'ppc386[file]' To start IDE type 'FP' at commamd line prompt I would be very grateful.

This should be explained in the user's manual. Alternatively, you could download BloodShed dev-pascal from
<http://www.bloodshed.net/devpascal.html>, they have built a very nice interface round the Free Pascal Compiler.

Jonas

Reply by email