On CP/M 2.2 does the TYPE command have any options for paginating the output and reading it without the text scrolling continuously? I mean something like Unix more(1).
I checked the documentation and other sources but can't find any such pagination options and z80pack ignores [Pnn]. Although flow-control commands such as ^S/^Q can suspend and resume the output, they're an inaccurate workaround even on a slow system.
the view program is on Many z80pack disks, source
Is in z80pack repo.
On Thursday, September 16, 2021 at 6:06:58 PM UTC+2, Udo Munk wrote:
the view program is on Many z80pack disks, source
Is in z80pack repo.
Which of the distribution archives[1] includes the VIEW.COM program? I can't find it in the z80pack source tree.
[1] https://www.autometer.de/unix4fun/z80pack/#download
On Thursday, September 16, 2021 at 11:10:30 AM UTC-4, paolo....@gmail.com wrote:
On CP/M 2.2 does the TYPE command have any options for paginating the output and reading it without the text scrolling continuously? I mean something like Unix more(1).
I checked the documentation and other sources but can't find any such pagination options and z80pack ignores [Pnn]. Although flow-control commands such as ^S/^Q can suspend and resume the output, they're an inaccurate workaround even on a slow system.
No, CP/M TYPE does not paginate
PIP does NOT ignore [Pnn], it just isn't doing what you think. It inserts a form feed every nn lines.
Since CP/M was expected to be used on a teletype, just look "up higher in the roll". Your terminal emulator probably has a "scroll back" function.
Add-on programs provide "more" type function (I use one called VIEW.COM, sorry, don't know where its from). VIEW.COM is 384 bytes long. Here it is as a HEX file (LOAD it)
:10010000C30C017E1223130DC20301C9215C00112F :100110001A010E0CCD0301C34101CD0616C3FB0C21 :10012000CDA00DCDBB0D00B50DC3FB0CCDA00DC3F7 :10013000FB0CCD960DFE38CA7B0CE63602004079EA :10014000E6C3B1012A3D01EB2A3F017D937C9ADA97 :100150009A01210000223F01EB2A3D017B957A9C08 :10016000D28C012A3B0119EB0E1ACD0500111A01A0 :100170000E14CD0500B7C286011180002A3F011977 :10018000223F01C358012A3F01223D011180000E88 :100190001ACD0500210000223F01EB2A3B0119EB9B :1001A0002A3D017DB43E1AC81A2A3F0123223F018D :1001B000C9AF322601323A01210040223D01223FDF :1001C000010E0F111A01CD05003CC2EA010E091102 :1001D000D801CD0500C300000D0A4E4F20444953FD :1001E0004B24494E2046494C45243E17323502CD1A :1001F0004401FE1ACA0000FE0ACA0702F50E025F99 :10020000CD0500F1C3EF013A35023D323502CA1E79 :10021000023E0AF50E025FCD0500F1C3EF013E0A72 :10022000F50E025FCD0500F10E01CD0500FE03CAFB :100230000000C3EA01000000000000000000000010 :1002400000000000000000000000000000000000AE :10025000000000000000000000000000000000009E :10026000000000000000000000000000000000008E :10027000000000000000000000000000000000007E
:00000001FF
VIEW file - any key to go to next page ^C to exit Location 1EB is the
number of lines per page (default 17h, make it whatever you want)
FredW
Am 09/16/2021 05:53 PM, fridtjof.ma...@gmail.com schrieb:system.
On Thursday, September 16, 2021 at 11:10:30 AM UTC-4, paolo....@gmail.com wrote:
On CP/M 2.2 does the TYPE command have any options for paginating the output and reading it without the text scrolling continuously? I mean something like Unix more(1).
I checked the documentation and other sources but can't find any such pagination options and z80pack ignores [Pnn]. Although flow-control commands such as ^S/^Q can suspend and resume the output, they're an inaccurate workaround even on a slow
No, CP/M TYPE does not paginate
PIP does NOT ignore [Pnn], it just isn't doing what you think. It inserts a form feed every nn lines.
Since CP/M was expected to be used on a teletype, just look "up higher in the roll". Your terminal emulator probably has a "scroll back" function.
Add-on programs provide "more" type function (I use one called VIEW.COM, sorry, don't know where its from). VIEW.COM is 384 bytes long. Here it is as a HEX file (LOAD it)
:10010000C30C017E1223130DC20301C9215C00112F :100110001A010E0CCD0301C34101CD0616C3FB0C21 :10012000CDA00DCDBB0D00B50DC3FB0CCDA00DC3F7 :10013000FB0CCD960DFE38CA7B0CE63602004079EA :10014000E6C3B1012A3D01EB2A3F017D937C9ADA97 :100150009A01210000223F01EB2A3D017B957A9C08 :10016000D28C012A3B0119EB0E1ACD0500111A01A0 :100170000E14CD0500B7C286011180002A3F011977 :10018000223F01C358012A3F01223D011180000E88 :100190001ACD0500210000223F01EB2A3B0119EB9B :1001A0002A3D017DB43E1AC81A2A3F0123223F018D :1001B000C9AF322601323A01210040223D01223FDF :1001C000010E0F111A01CD05003CC2EA010E091102 :1001D000D801CD0500C300000D0A4E4F20444953FD :1001E0004B24494E2046494C45243E17323502CD1A :1001F0004401FE1ACA0000FE0ACA0702F50E025F99 :10020000CD0500F1C3EF013A35023D323502CA1E79 :10021000023E0AF50E025FCD0500F1C3EF013E0A72 :10022000F50E025FCD0500F10E01CD0500FE03CAFB :100230000000C3EA01000000000000000000000010 :1002400000000000000000000000000000000000AE :10025000000000000000000000000000000000009E :10026000000000000000000000000000000000008E :10027000000000000000000000000000000000007E
:00000001FF
VIEW file - any key to go to next page ^C to exit Location 1EB is the number of lines per page (default 17h, make it whatever you want)
FredW
Nice litte thing, so I disassembled it ... :-)Martin
It uses SEQIO.LIB, needs MAC.COM to assemble.
Here it is...
==== 8< ====
;
; FILE VIEW PROGRAM
;
CTLC EQU 'C'-64
CTLZ EQU 'Z'-64
;
ORG 0100H
;
MACLIB SEQIO ;SEQUENTIAL I/O LIB
;
FILE INFILE,DISK$IN,,1,,4000H
;
PLOOP: MVI A,23
STA LCOUNT
LLOOP:
GET DISK$IN
CPI CTLZ
JZ 0
CPI LF
JZ LDONE
PUT CON
JMP LLOOP
;
LDONE: LDA LCOUNT
DCR A
STA LCOUNT
JZ PFULL
MVI A,LF
PUT CON
JMP LLOOP
;
PFULL: MVI A,LF
PUT CON
GET KEY
CPI CTLC
JZ 0
JMP PLOOP
;
LCOUNT: DS 1
BUFFERS:
;
END
==== 8< ====
Have fun!
Martin
P.S.:
It it binary identical to the posted HEXDUMP.
I even let the evil "DISK$IN" unmodfied,
which corrupts the error message.
Martin
Thanks! I have wondered where VIEW.COM came from -- I don't think I ever had source for it.
Fred
Am 09/19/2021 02:33 PM, fridtjof.ma...@gmail.com schrieb:Nice work, indeed. Another solution is to use one of the many CCP replacements that implement a paged TYPE command. For over 20 years, I have used Don Kirkpatrick's excellent ZCPR-D&J (a refinement of ZCPR 1.0). It occupies the same 800H byte (2K) space
Martin
Thanks! I have wondered where VIEW.COM came from -- I don't think I ever had source for it.
Fred
Weekend, and a little spare time, it was a lot of fun!
It is very nice to your disk drives, as it uses a buffer of 4000h bytes.
And it's by far the smallest pager around.
It has got a new home on my boot disks :-)
Martin
the view program is on Many z80pack disks, source
Is in z80pack repo.
On 16/09/21 18:06, Udo Munk wrote:
the view program is on Many z80pack disks, sourceI think that could be feasible adding a simple less(1) functionality, decreasing the current line pointer by the content of 1EB...
Is in z80pack repo.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 292 |
Nodes: | 16 (2 / 14) |
Uptime: | 188:17:00 |
Calls: | 6,616 |
Files: | 12,165 |
Messages: | 5,315,029 |