PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: James Crowther on February 05, 2019, 12:05:04 PM
-
When listing a program to a channel
list (my_channel)
Pxplus is breaking up the listed line if it is too long.
Rather than this in the file:
0010 print x$;print y$
I get something like this:
0010 print x$;pr
0010:int y$
How do I get the list to have each line complete?
Thanks,
James
Master Electronics
-
I solved the problem by creating a command program to "print" the program in memory to a specified file channel.
For example, copy and paste the program below into command mode and save it as *cmd/l2c (list to channel). Now you can open a file or device to a channel and enter l2c followed by the channel # and it will list the program in memory to that file without splitting the lines.
0010 ! *cmd/l2c - list to channel
0020 enter c$,err=USAGE
0030 c=num(c$,err=USAGE),m=65000,l=tcb(12)-1
0040 x$=lst(pgm(++x,l)),x=num(x$(1,pos(" ?":x$)-1)); if x<m then print (c,err=USAGE)x$; goto *same
0050 exit
0060 USAGE:
0070 print "Usage: l2c channel",'LF',"channel: the channel # to output to"
0080 exit
-
Thanks Ken, that got me what I needed.
James