CPCWiki forum

General Category => Programming => Topic started by: AMSDOS on 10:45, 25 September 10

Title: Turbo Pascal 3 Source Code
Post by: AMSDOS on 10:45, 25 September 10
In Future this will be my announcements thread for any new Turbo Pascal programs I add to my website!  :-[

Announcing - Bouncy2.PAS (http://turpas3.angelfire.com/bouncy2.pas) is an update of my original Bouncy Ball Demo which was plotted to screen. This updated version incorporates proper sprite routine to display and move a ball inside the square. Nothing fancy, though the routine is fast and demonstrates techniques used in MCARRAY.PAS (http://turpas3.angelfire.com/mcarray.pas) & the advantages of having Poking 16bit values into a Pascal Procedure. Thanks to everyone & arnoldemu for making the sprite routine possible!  ;D
Title: Re: Turbo Pascal 3 Source Code
Post by: funkheld on 15:42, 09 October 10
hello, good day. I'm from germany.
I program with the CPC6128 and cpcfloppy-emu-sd and cpcfloppy-emu-usb.
where you can download the Turbo Pascal for CPC6128?

gruss
Title: Re: Turbo Pascal 3 Source Code
Post by: MiguelSky on 20:13, 09 October 10
At CP/M User site http://turpas3.angelfire.com/ (http://turpas3.angelfire.com/), the README.TXT file gives you the information for download and use :) , but you can dowload directly from ftp://ftp.nvg.unit.no/pub/cpc/utils/cpc/turbopas.zip (ftp://ftp.nvg.unit.no/pub/cpc/utils/cpc/turbopas.zip)
Title: Re: Turbo Pascal 3 Source Code
Post by: funkheld on 08:44, 10 October 10
hello, thanks you. :)

where there is a help file for turbo-pascal 3.0 or a book-pdf or a helpchm-file for windows ?

gruss
Title: Re: Turbo Pascal 3 Source Code
Post by: AMSDOS on 09:17, 10 October 10
Yes the README.TXT (http://turpas3.angelfire.com/readme.txt) file on my site will give you a brief run down into using the CPC version Turbo Pascal. Unfortunately it dribbles on a bit, but it explains how to run the program once you've inserted the Disk Image or Disc on a CPC.

But your in luck cause the entire Turbo Pascal 3 manual is on the Internet you can find it here (http://www.retroarchive.org/docs/index.html). Better grab it before the powers which made it all possible decide to take it off.  ;D
Title: Re: Turbo Pascal 3 Source Code
Post by: funkheld on 08:16, 11 October 10
jup, thanks(danke) for the help.

gruss
Title: Re: Turbo Pascal 3 Source Code
Post by: AMSDOS on 09:54, 20 November 10
Two new files added to my website:

Firmware.lib (http://turpas3.angelfire.com/firmware.lib) - Includes a set of popular routines found in Locomotive BASIC and some other useful Firmware routines which can be incorporated into Turbo Pascal when using CP/M 2.2. Routines such as MODE, DRAW, PLOT, MOVE, INK, BORDER, PEN, PAPER, etc, are now possible.

Starscrl.pas (http://turpas3.angelfire.com/starscrl.pas) - demonstrates the use of Firmware.lib by incorporating some of the popular routines from that Library. This program was originally published in BASIC as a 10-Liner in ACU by Chris Wootton which features a Space ship moving backwards and fowards across a Starfield. Features UDG and a Scrolling Starfield all thanks to some TP & Inline M/C!  ;D  Some small differences from the original program means any key it will exit back to CP/M, it doesn't even come to you in 10 Lines of Pascal, though it seems to run a little bit faster!  ;D   
Title: Re: Turbo Pascal 3 Source Code
Post by: AMSDOS on 01:20, 27 December 10
I've been extremely keen on giving this "port" statement a go for ages. What better way than to try it on one of these video examples written in BASIC!  ;D

This is what I came up with which works (just as well  ;D ):

Program Wobble_Screen;

(* Demonstration of the use of Port in Turbo Pascal 3 using the Hardware
   from an Amstrad CPC Computer.
   WARNING: Do not attempt to run this on any other computer otherwise
   damage may result. *)
(* Turbo Pascal Example from TP3 Manual - Port[56]:=10; *)

Begin
Repeat
  Port[$BC00]:=2;
  Port[$BD00]:=40+trunc(random*12);
  Port[$BC00]:=7;
  Port[$BD00]:=28+trunc(random*4);
Until Keypressed;
Port[$BC00]:=7;
Port[$BD00]:=30;
Port[$BC00]:=2;
Port[$BD00]:=46;
End.


Eventually it'll go on the website. As you can see Very Straightfoward this is what the original BASIC program looked like which comes from Conrad Bessant series "Naked Video" which was an on and off series between AA51-AA59:

10 WHILE INKEY$=""
20 OUT &BC00,2
30 OUT &BD00,40+INT(RND*12)
40 OUT &BC00,7
50 OUT &BD00,28+INT(RND*4)
60 WEND
70 OUT &BC00,7:OUT &BD00,30
80 OUT &BC00,2:OUT &BD00,46


David Hall has an interesting example written in BASIC too from AA50, so I'll give that a go!  ;D
Title: Re: Turbo Pascal 3 Source Code
Post by: AMSDOS on 11:25, 25 April 11
Well I've finally done something about producing a Disk Image (http://turpas3.angelfire.com/TP3_progs.zip) with all my English Turbo Pascal 3 programs. Some of the programs can be executed through the Turbo Pascal Run feature, though some will need to be compiled first (otherwise the Compiler will crash). Simply put this Disc image into Drive B and have Turbo Pascal 3 in Drive A. Run Turbo Pascal 3, following the prompts and at the main menu Select Drive B, the directory command [D] will allow you to view those files and I usually load a pascal file with Work File Name [W] though I believe you can load it as a Main File [M] as well. I've got instructions in my readme.txt (http://turpas3.angelfire.com/readme.txt) file, though it seriously needs updating!  ???
Powered by SMFPacks Menu Editor Mod