News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_erikarn

turbo basic 3 docs?

Started by erikarn, 15:34, 16 September 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

erikarn

Hi,

Does anyone have a copy of docs for turbo pascal 3 for CP/M?

I've got a copy here and I'm just tinkering with some stuff, but I can't seem to get it to compile - I get "error 93, press <ESC>"  and pressing escape does nothing. :-)

Thanks!

AMSDOS

Yes!! And at one stage the Turbo Pascal 3 Manual was on the Internet - yes you can still find it here! Error 93 relates to "Invalid Compiler Directive" - specifically it's referring to the "{$<letter>}" directives which can determine what the compiler does at compilation. In some cases if you have a comment which uses "{" or "}" and for some reason there's a "$" sign in it, it may confuse the compiler into thinking it's a compiler directive when it's not. In that situation it's better to use "(*" and "*)" which TP3 will happily accept as a comment and in some ways it overrides the "{" & "}" so you can have a comment within a comment or it's good for blocking out code if you aren't using it but saves deleting it. The more likely reason you might get an error like that is if you're taking a program which was written after Turbo Pascal 3, so it maybe something written for TP4 and TP7. If that's the situation then you may have to consider rewriting it to suit TP3. Later versions of TP seem to extend on those Compiler Directives and unfortunately I'm unsure what it all means, the only way around this is to remove them and hope the program still works. Unfortunately TP4 and later is a lot more advanced and adds stuff to make the programs execute faster with the ability of making programs small - the worse of these TP programs uses a LongInt, no such thing exists in TP3, there are a couple of examples of it for TP3 on the Internet (if you look hard), though their 16 bit versions which run under DOS or CP/M-86 (not CP/M). Using it in TP3 probably wouldn't mean much anyway since maths isn't TP3s strength. But yeah it's possible to make programs from later versions of Pascal work in TP3 and TP3 does add some of the useful stuff found in later versions of TP - the demonstration of a Mandelbrot was modified from something generated in TP6 and then I adapted it to take advantage of making the program run faster in TP3, I probably could have improved on it again in the generation of the Mandelbrot in relation to Skipping the plotting of the Background colour, though with some understand of the CPC Screen and utilising the effects to create the desired effect, I thought it worked really well in the end considering it was a done on it's PC counterpart!
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

erikarn

Cool, thanks. I'll go read and see what I can put into the Wiki about it.

re: mandelbrot - I tried it using a TP-3 + CP/M+ disk I found in this collection here; but it just hangs on execution. i've triple-checked the inline directives and they match your example. Is there something I'm missing? Some graphics extension for CP/M that I've not loaded?

AMSDOS

I hope you've got the 4 Mandelbrot Data Files in the same place as your AMSMNDEL file? If you haven't you either need to run MDELSTUP.PAS - use Turbo Pascal 3 to Compile it as a COM file and run it in CP/M (don't compile it as Memory in Turbo Pascal as this may crash, select "O" for compiler options and select "C" to Compile it as a "COM File"). This is a lengthy process though unless you switch off the Realtime mode of the emulator and even then it takes a few minutes, the alternative is to get the Data Files from MANDLBRT.ZIP which is attached in the Mandelbrot thread (on the bottom of the first page). Because AMSMNDEL isn't really checking to see if the files are there, I'm guessing that's what is making it crash. If you have those files and AMSMNDEL is still crashing, then again it maybe memory which is making it crash. AMSMNDEL sets aside &4000-&7FFF to load the colour data in and then displays it. If Turbo Pascal is running in the background, then I think that will cause a problem. Like MDELSTUP.PAS, AMSMNDEL.PAS needs to be compiled as a COM file and executed out of Turbo Pascal. Hope that helps.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

erikarn

I'm trying to run the earlier version which plots data directly.

AMSDOS

Ah I see!! It won't work in CP/M Plus, I'm being naughty because I'm doing everything at the moment in CP/M v2.2 . This is the version of CP/M which is on the Turbo Pascal 3 disc - or Side 4 if you have the CP/M Plus disc set. I have made the odd CP/M Plus program out of TP, but after looking at some of Kevin's Assembly code, which works out the method used to determine which version of CP/M is being used and use the approriate firmware, I've decided that my methology to working out which is which is incorrect and it could even be leading to more problems. Accessing Firmware is the problem here and CP/M v2.2 and CP/M Plus have different ways of accessing it. I'm keeping my programs CP/M v2.2 compliant because everyone with a 464 + Disc Drive up can use them. So if whenever there's doubt about what to do in CP/M v2.2, you'll be right as long as you keep the System Disc in Drive A and CTRL+C for Inserting and changing Discs!
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod