Page 1 of 2

Printing SuperBASIC programs

Posted: Tue Feb 21, 2012 10:36 am
by EmmBee
Does anyone know of any software capable of printing out a SuperBASIC program?

I use ED from toolkit 2 to construct my programs, but they don't print out as displayed on the QL screen. Using windows software I always have to spend time formatting the text, and even then make mistakes.

Michael
EmmBee

Re: Printing SuperBASIC programs

Posted: Tue Feb 21, 2012 3:32 pm
by polka
You should use evenly-spaced fonts like "Courrier New", then there would be no formatting issues.

Paul (or I don't understand your problem ?)

Re: Printing SuperBASIC programs

Posted: Tue Feb 21, 2012 4:55 pm
by Mr_Navigator
I assume you are using an emulator, if so save the SuperBASIC file to a DOS/WINDOWS folder as normal e.g. Myprogram_BAS.

Then in Windows open the file using Wordpad which comes installed on all versions of Windows, the file should display perfectly in Wordpad as it defaults to 'courier new' for basic text files which is how Wordpad see's the SuperBASIC program.

Select PRINT in the normal way

If you do not like the font in Wordpad, Select all, change font to something you do like

If you want a font that looks like what you see on the QL then you can down load from Dilwyn's site one that I made earlier based on the JS ROM character set here http://www.dilwyn.me.uk/fonts/index.html and look for Sinclair-style Font True Type/ATM/Proforma and the name ql_jsrom.zip (21KB) - True Type version.

Install on your system and then you can view and print all your listings in this font.

Re: Printing SuperBASIC programs

Posted: Wed Feb 22, 2012 12:19 am
by RWAP
The other option is to purchase and install QPCPrint - that can be used on Windows computers with any of the QL emulators (and even DOS programs).

It basically takes the QL output (text, and graphics, using EPSON codes) and then converts it so that it can be printed under Windows in basically the same layout as you would get on a standard QL to a fully ESC/P2 compatible Epson printer

An excellent program and what I always use for my printing from the QL.

Re: Printing SuperBASIC programs

Posted: Wed Feb 22, 2012 4:20 pm
by EmmBee
I was concerned more about how a SuperBASIC program could be printed out, especially one that contains long lines. Using ED, the lines after the first one are indented four spaces in. On the QL screen there are a maximum of 85 characters to the line. I am using Q-emuLator, which has a virtual printer, but this can only print out 69 characters to the line – and that doesn't allow for margins. Also, how about word-wrap? I was just wondering whether anyone had already written something specifically for this purpose. There could be a program somewhere that asks you to enter the number of characters to line, and about various options about word-wrap, indenting of long lines etc. This program would then read your existing SuperBASIC code and produce a text file ready for printing out on your chosen printer. If no such program exists, it could be an idea for someone to write such a program. Do you think this could be popular?

Michael
EmmBee

Re: Printing SuperBASIC programs

Posted: Wed Feb 22, 2012 7:24 pm
by Mr_Navigator
On the old ZX Spectrum you did this LLIST straight to a ZX printer or the American Alphacom printer on nice shiny grey metallic paper and I believe it did retain exactly what appeared on screen.

Not so simple on the QL though :(

Re: Printing SuperBASIC programs

Posted: Wed Feb 22, 2012 11:10 pm
by RWAP
I am not quite sure I understand the issue....

I would just use:

OPEN #3,'par'
LIST #3
CLOSE #3

Re: Printing SuperBASIC programs

Posted: Thu Feb 23, 2012 4:18 pm
by Mr_Navigator
See, told you not so simple, however you could do this

10000 DEFine PROCedure LLIST
10010 OPEN #3,'par'
10020 LIST #3
10030 CLOSE #3
10040 END DEFine

Re: Printing SuperBASIC programs

Posted: Mon Nov 24, 2014 2:59 pm
by stevepoole
I use the following procedure added at the end of my code :
To get a printed listing from any printer, just typre the command print_out after a break.
But note that when the listing has been printed, you need to turn off the printer manually!
I do this very often, and it has never failed in years.

1000 REM merge this listing onto your code.
1010 ::
1020 DEfine PROCedure print_out
1030 LOCal loop,i$,j$
1040 SAVE_O win1_programname_bas: PAUSE 500: REMark tweak this...
1050 OPEN#3,win1_programname_bas: OPEN#4,par: REM ditto
1060 REPeat loop
1070 INPUT#3,i$
1080 if EOF(#3): EXIT loop
1090 j$=i$&CHR$(13): PRINT#4,j$
1100 END REPeat loop
1110 PRINT#4,CHR$(12)
1120 ClOSE#4: CLOSE#3
1130 END DEFine
1120 ::

Re: Printing SuperBASIC programs

Posted: Mon Nov 24, 2014 10:20 pm
by RWAP
Is there a reason why you can't just use:

OPEN #3,par
LIST #3
CLOSE #3

(may need to use OPEN #3,ser1c if your printer is connected via the serial port)...