Page 1 of 1

PASCAL-M for CSL / Salora Manager

Posted: Sun Apr 10, 2016 12:19 am
by @username@
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)

Re: PASCAL-M for CSL / Salora Manager

Posted: Sun Apr 10, 2016 11:13 am
by @username@
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

Re: PASCAL-M for CSL / Salora Manager

Posted: Sun Apr 10, 2016 12:43 pm
by Scouter3d
WOW!

Re: PASCAL-M for CSL / Salora Manager

Posted: Thu Apr 14, 2016 1:30 pm
by Mobsie
Works great!