Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:56 21 Oct 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : LPRINT

Author Message
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 26
Posted: 12:09pm 19 Oct 2025
Copy link to clipboard 
Print this post

I have a thermal printer connected to the Pico. Is there any way to print the programme, something like ‘LIST#5’ or ‘LLIST’ as in the Spectrum?
Best regards.
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 471
Posted: 02:58pm 19 Oct 2025
Copy link to clipboard 
Print this post

  grroel.tech said  I have a thermal printer connected to the Pico. Is there any way to print the programme, something like ‘LIST#5’ or ‘LLIST’ as in the Spectrum?
Best regards.


How is the printer connected?  I have an Epson thermal receipt printer (41 col paper) connected to COM1: and I have this in my library:

SUB LLIST(fname$)
OPTION console serial
IF fname$="" THEN
 LIST all
ELSE
 LIST all fname$
END IF
PRINT :PRINT :PRINT :PRINT :PRINT
PRINT :PRINT
OPTION console screen
END SUB


All those PRINTs are there because I want the listing to be at the right place to tear off.
 
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 26
Posted: 05:53pm 19 Oct 2025
Copy link to clipboard 
Print this post

I had thought of a more ‘rustic’ solution:

SUB LLIST
   SAVE ‘A:LLIST.BAS’
   OPEN ‘A:LLIST.BAS’ FOR INPUT AS #9
   DO
       LINE INPUT #9, L$
DEVICE SERIALTX GP0, 9600, L$ + CHR$(10) + CHR$(13)
   LOOP UNTIL (EOF#9)
   PRINT#9:PRINT#9:PRINT#9
   CLOSE#9
   KILL ‘A:LLIST.BAS’
END SUB

To include it in the library. But your solution is more elegant. I'll make a note of it.

Best regards.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025