PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Listing a program to a channel  (Read 1538 times)

James Crowther

  • Member
  • **
  • Posts: 11
    • View Profile
Listing a program to a channel
« 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

Ken Sproul

  • Gold Member
  • ****
  • Posts: 60
    • View Profile
Re: Listing a program to a channel
« Reply #1 on: February 05, 2019, 03:02:59 PM »
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
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

James Crowther

  • Member
  • **
  • Posts: 11
    • View Profile
Re: Listing a program to a channel
« Reply #2 on: February 06, 2019, 09:31:57 AM »

Thanks Ken, that got me what I needed.

James