PASCAL-M for CSL / Salora Manager

Talk about programming CreatiVision (except games programming). Projects of homebrew hardware are also welcome.
Post Reply
User avatar
@username@
Posts: 320
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

PASCAL-M for CSL / Salora Manager

Post by @username@ » Sun Apr 10, 2016 12:19 am

Coming soon ... pascal-M on the Salora Manager / Laser 2001 and CSL.

This is as easy as write P4 compatible code, compile on PC, test on PC, convert to p-code.

So far all is going well - I hope to have a WIP release in a week or so.

The process is 3 steps
Step 1 - write PASCAL P4 compliant code

Code: Select all

program test ;

var
	isdone : integer ;
		
begin
	writeln ('hello world') ;
	writeln ('from Pascal-M 6502') ;
	
	isdone :=1 ;
	while (isdone = 1) do
	begin
		isdone := 1 ;
	end ;
	
end.
This is converted to p-code, which looks like

Code: Select all

P400test    BF
P11FB5000002C2BC0B68656C6C6F20776F726C640B0BBD02BD0602C2BC12667242
P11F6F6D2050617363616C2D4D2036353032A00012A00012BD02BD06018008605A
P10B080196B10045B2003BA1D1
P200010002FC
P9
At this point, it can be interpreted on a PC for testing.

For step 3, I have written a small utility which converts the p-code to bytecode for the 6502 interpreter.

On the CSL / Salora Manager / Laser 2001, it will load just out of the way of BASIC at $5100. The interpreter is around 4k - so it leaves around 24k for program and data!

To run the demo, BLOAD, then call 20736 ($5100)
You do not have the required permissions to view the files attached to this post.
User avatar
@username@
Posts: 320
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Re: PASCAL-M for CSL / Salora Manager

Post by @username@ » Sun Apr 10, 2016 11:13 am

This is a quick howto on getting a working PASCAL-M compiler and intepreter.

The compiler, documentation and tools, can be download from http://pascal.hansotten.com/uploads/mpa ... scalv1.zip

The interpreter, documentation and tools, can be download from http://pascal.hansotten.com/uploads/mpa ... lintv1.zip

Using the FreePASCAL compiler for your platform, compile up TMPASCAL.PAS and TINTERPR.PAS, using command lines

Code: Select all

fpc -MTp -Os
Once built, you can compile PASCAL-M source with TMPASCAL, and test with TINTEPR.

The final part to get it working on Salora Manager and Laser 2001, is to use the attached utility, which will combine the OBP output and the 6502 interpreter to a loadable binary.

This can be further processed with SMBLoader to cassette WAV or emulator CAS file.

Load address is currently $5000.

STDOUT is working ok with this MPI.BIN
You do not have the required permissions to view the files attached to this post.
User avatar
Scouter3d
Posts: 646
Joined: Mon Jun 28, 2010 7:02 am
Location: Wien
Contact:

Re: PASCAL-M for CSL / Salora Manager

Post by Scouter3d » Sun Apr 10, 2016 12:43 pm

WOW!
User avatar
Mobsie
Posts: 708
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: PASCAL-M for CSL / Salora Manager

Post by Mobsie » Thu Apr 14, 2016 1:30 pm

Works great!
Post Reply