Date : Sat, 22 Jul 1989 01:05:59 GMT
From : ima!cfisun!lakart!dg@decvax.dec.com (David Goodenough)
Subject: New CCP features - summary of suggestions
OK, the polls are in for what you think I should add to Z80CCP. These are
the suggestions:
Ken Yap <lakart!xait!garp!rochester!ken>
Paul Sander <ima!decvax!Atherton.COM!paul>
Jon Peticolas <ima!decvax!decwrl!ucbvax!cbnewsh.att.com!jlp>
These gentlemen all suggested history, something like the C-shell !!
and the likes. Well, with some _REAL_ dirty trickery, and the assumption
that you have a _VANILLA_ DRI V2.2 BDOS, no Z-system, or anything else,
it's in. It works like this: Use ZSID / DDT / Whatever to create a file
of at least 17 blocks, and fill them all with zeros: call it
!CCP.HIS
and put it on A0:
Now, whenever you execute a command, it's saved. To access them, you
enter ^K (that's control K) in response to the A0> prompt, hit return,
and you get the previous one. Hitting ^K ^M again gets you another
command. As it happens, I have 16 programmable function keys on my
machine, so I keep one loaded with < ^X ^K ^M >, where the ^X clears
the command line, ^K is the "up" character, and ^M sends it it. So
repeated hits on this function key step me backwards through my
history. If I were a good kid I'd add ^L or something to go forwards
as well.
Once you have a previous command up, it's just like you typed it in,
but didn't hit return yet - you can then use backspace etc. to edit
it, when you're happy, hit return and away it goes.
Tom Bopp <lakart!xait!uhccux.uhcc.Hawaii.Edu!tbopp>
Suggested the following:
>1. A smarter DIR command, to include file size and space available.
>
> b3>DIR *5:afn should work
> b3>DIR A*:afn should work
> b3>DIR **:afn should work like whereis
OK, I didn't do either of these (i.e. wildcarding drives & users) or
adding filesize / free space since I have utilities to do these,
HOWEVER .....
>2. A command TYPEB (or BTYP, or ???) to produce a DDT-like dump of a
> binary file.
I did this, and called it DUMP (what else :-) ). But, it wouldn't fit in
the CCP, so I dreamed up the following, which will allow any self
respecting hacker to add anything they like to the CCP.
I created a second "section" of the CCP - resident in A0:!CCP.SYS, that
is called if the CCP is trying to match a command it can't find in it's
own table. It's not always present, it gets loaded when you enter '!' as
a command _OR_ start a command with '!', so:
A0>!DUMP B7:FOO.BAR
will load the extra code, and then do the dump command resident in the
extra code. I've set the extra code to live at 0x8000, and with my CCP
starting at 0xd400, I have up to 20K to play with - lots of room :-)
THE POINT OF THIS is that you can put whatever you want into this
extra addon code, so the customization possibilities are limited only
by your imagination.
>3. A command FEED which would send a FF to the printer.
Trivial, it's in the main CCP code.
>4. A command MENU C: which would display a list of all .COM files on
> drive C:, with menu numbers; typing a number would run the program.
Would take a bit of doing - if you want it, throw it in !CCP - you will
find that !CCP is going to become the place where I suggest doing
everything.
>5. A toggle (^F ?) to redirect printer output to a file. To capture screen
> output in a file you go ^P^F. Need to think about filename (PRINTER.LOG
> comes to mind), and how to avoid bombs if disk full, etc. How to close
> file, etc.
Almost impossible from the CCP level - this takes work messing with the
BDOS, with a TSR. Oh well, I'm 4 and 2 so far .....
Mike Morris <morris@jade.Jpl.Nasa.Gov>
Suggested:
> I've always hated ERA, how about adding DEL to the command table, pointing
> to the ERA code? If you don't like that, a conditional assembly?
Trivial to do - it's in on a conditional assembly, just like I call TYPE
CAT, so that's on a C.A. as well.
> My BIOS will handle several disk formats transparently - the DPB is in
> Track 1 sector 0 bytes 0-31. Bytes 32-64 have a ID string in ascii.
> My hacked CCP has a DISK command that displays stuff like the following:
>
> A0: >DISK
>
> A: 1900k RAMdsk - 100k LST: spool
> B: 966k D Sided D Density 50 SPT
> C: 466k S Sided D Density 50 SPT
> D: 241k S Sided S Density 26 SPT
> E: 8192k Hard Disk partition 0
> F: 8192k Hard Disk partition 1
!CCP.SYS again - you've got 20K to work in. ..... No, seriously, that's
why I invented the !CCP.SYS approach - it allows an easy hook for doing
custom mods.
> How about IN, OUT, PEEK, POKE ?
Same again .....
> How about LOAD <COMfilename> and RUN ?
This gets interesting. The only reason to do these is if you're going to
take PEEK & POKE to them, and if you do that, they'd better be 32K or smaller.
I suppose you could move the load address for !CCP.SYS up to (say) 0xb000
or somewhere. Note that RUN can be achieved without any code added to the
CCP by creating a file RUN.COM on A0:, size zero bytes.
> I wish I had the space to implement the multiple byte OUT format.
Now you do :-)
> BTW, on mine I sacrificed
> the SAVE command to get more space. I rarely use it, and when I need it
> I can boot up from a regular CP/M floppy. If I had kept it I would have
> modified it to take memory in K as a decimal parameter, or H as the highest
> address in Hex to save. No more of these "memory paragraphs" B.S. !
Again, I left the memory paragraph SAVE in the regular CCP, but to add
another command to !CCP.SYS - well there's still lots of space to play
with.
Now, for one of my own ideas - COPY needs to go in !CCP.SYS, it would be
a PIP type thing, but I'd have it a bit more flexible:
COPY A3:FILE.XYZ = B7:*.Z
would concatenate all .Z files on B7: and put them in A3:FILE.XYZ, have
it reset before each operation, no more BDOS ERROR on C: R/O
And finally,
Mitchell Wyle <xait!harvard!cs.utexas.edu!uunet!mcvax!inf.ethz.ch!wyle>
Suggested:
> What about a couple of programmable functions (from Bourne's shell):
>
> A0> for FILE in `ls *.TXT` ; do
> > TYPE $FILE
> > done
Again, almost impossible to do from the CCP. However, for those that
are interested, I have a utility to do this sort of thing: I call it
FILSUB. A typical command line might be:
A0>FILSUB [B:*.Z] `EM *.*`
which gets expanded to a $$$.SUB file that takes EM (my editor) to each
.Z file on B:. FILSUB has several other features, but this is the one
that was being asked for, and knowing how I did it, I doubt I could
fit it in the CCP, any more that SUBMIT is part of the CCP.
Again, this is not a closed issue, any other neat ideas will be welcome.
--
dg@lakart.UUCP - David Goodenough +---+
IHS | +-+-+
....... !harvard!xait!lakart!dg +-+-+ |
AKA: dg%lakart.uucp@xait.xerox.com +---+