CPCWiki forum

General Category => NC100, NC200, PCW, PDA600 - the rest of the Family! => Topic started by: funkheld on 19:05, 20 September 20

Title: turbo pascal 3.0 : 62903 free und turbo pascal 3.0 : 30224 free
Post by: funkheld on 19:05, 20 September 20

Hi good afternoon.


I have in the turbo pascal booklet free: 62903 byte and when I load it into the joyce only 30224 free.


Why?

thank you.
greeting
Title: Re: turbo pascal 3.0 : 62903 free und turbo pascal 3.0 : 30224 free
Post by: GeoffB17 on 20:59, 20 September 20
Hello,

I'm not really sure what you're expecting here.

I think that this is the TP IDE that you've loaded, this includes an editor and I would assume that this will take up space from your RAM.

The illustration you are comparing with will I assume be from another machine.   Do you know which one?   The numbers may be correct for that machine, but may not be correct for a PCW.   You should not compare things that may not be alike.  Also, the 'Free' figure in the TP manual may be an error, this ### would suggest that nothing is loaded.   No CP/M system would have nore that 64k active RAM, and CP/M system would take up some.   The PCW provedes 61k Free RAM which is a lot compared to CP/M 2.2 systems, this is due to the Banked RAM.

The numbers your system show, i.e. 30k about, seem perfectly reasonable if the IDE is loaded/active.

Geoff
Title: Re: turbo pascal 3.0 : 62903 free und turbo pascal 3.0 : 30224 free
Post by: MaV on 21:38, 20 September 20
The TPA RAM area in a Joyce is 61kb as you can see in the screenshot you've taken. Transient program area (TPA) is the maximum amount of memory you could work with in CP/M (a few kbs are used for system variables). So, within TPA all had to take place; i.e. the compiler is loaded (about 30kb sounds good) and the rest of the available memory is used for the source code.


The close to 60k free RAM is a value taken from a DOS computer. Turbo Pascal 3 in DOS used the 64kb segmentation boundaries to arrange code, data (source code), and heap memory. It thus reserves one 64kb segment of the overall memory for source code.
And while this sounds much at first, it was considered a severe limitation for PCs in its time (1986), because most PC XTs had already at least 256-512kb and some up to the maximum 640kb. TP 3 also only generated COM files, which were also limited to 64kb. That changed when TP 4 arrived in which you could allocate beyond the boundaries of a segment. For that reason all versions above 3 were never released for CP/M.


The manual was likely written with DOS in mind (or a lazy port for a CP/M version). In 1986 CP/M was on its way out.


(I've last programmed in TP 3 about 30 years ago, so take this with a grain of salt.)
Title: Re: turbo pascal 3.0 : 62903 free und turbo pascal 3.0 : 30224 free
Post by: AMSDOS on 08:38, 21 September 20
I don't know why that amount of memory, a 6128 running CP/M Plus allows 61k and PCWs have more memory than that, I noticed a RAMDrive was being used, so I kind of wonder if that would limit.


Otherwise, if limited memory is a problem with Turbo Pascal 3, it's recommended (on page 147 of the Turbo Pascal 3 Manual), to have the source code as a series of Include Files and have one Main File load each file when compiling as .COM, which gives the best chance of Compiling larger files.
Title: Re: turbo pascal 3.0 : 62903 free und turbo pascal 3.0 : 30224 free
Post by: funkheld on 11:42, 21 September 20
hello, thanks for the info.


greeting
Powered by SMFPacks Menu Editor Mod