Additional cursor keys for ZDE

484 views
Skip to first unread message

Peter Onion

unread,
Mar 4, 2025, 3:05:36 AM3/4/25
to RC2014-Z80
I generally getting on OK with ZDE (40 year ol muscle memory from running Wordstar!) but I do keep pressing Page Up and Page Down keys and ending up with escape sequencies inserted in my code !

I've tried using ZDENST16 but I can't see anything that looks like an appropriate configuration item to set. 

Is there anything else I can use to change key mappings ?

PeterO

Wayne Hortensius

unread,
Mar 4, 2025, 12:28:03 PM3/4/25
to rc201...@googlegroups.com
"'Peter Onion' via RC2014-Z80" wrote:

> I generally getting on OK with ZDE (40 year ol muscle memory from
> running Wordstar!) but I do keep pressing Page Up and Page Down keys
> and ending up with escape sequencies inserted in my code !

You might be able to extend the basic ANSI cursor key handling embedded
into ZDE.

ANSIcu: CALL RptKey ;Handle ANSI cursor
SUB 'A' ;keys ESC-[...
JP Z,Up
DEC A
JP Z,Down
DEC A
JP Z,Right
DEC A
JP Z,Left
JP Error2

Up/down/left/right use a very simple <ESC>[c sequence (where c is
[A..D]. Page up/down use <ESC>[c~ (where c is 5 or 6). So you'd have to
check for the trailing '~' character when you saw a 5 or 6. It's been
ages since I've tinkered with the ZDE source so I'm not 100% sure that
it'd work. But if I was going to try adding the page up/down keys, this
is where I'd start looking.

Wayne

Peter Onion

unread,
Mar 4, 2025, 2:09:18 PM3/4/25
to RC2014-Z80
Where would I find this code ?

PeterO

Wayne Hortensius

unread,
Mar 4, 2025, 2:44:21 PM3/4/25
to rc201...@googlegroups.com
"'Peter Onion' via RC2014-Z80" wrote:

> Where would I find this code ?

It's on GitHub. Just search for zde editor.

Peter Onion

unread,
Mar 4, 2025, 5:05:29 PM3/4/25
to RC2014-Z80
I've reassembled the zde16.asm with m80, but the resulting zde16.com is using ESC key in place of ctrl-K
PeterO

Peter Onion

unread,
Mar 5, 2025, 2:44:42 AM3/5/25
to RC2014-Z80
Further to this, when I examined the ZDE.COM that I have been using,  it claims to be version 1.8.  Is the source or config for this version available anywhere ?
PeterO

Wayne Warthen

unread,
Mar 5, 2025, 3:25:39 AM3/5/25
to rc201...@googlegroups.com
RomWBW Slice 5, User Area 1

Thanks, Wayne

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/28e4d2d7-260c-4fa9-9835-0cb1faa019cdn%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

Peter Onion

unread,
Mar 5, 2025, 5:59:40 AM3/5/25
to RC2014-Z80
I'm sorry Wayne, but I don't know what to do with that information. I'm still a RomWBW noob and there are large parts of it that I've just not looked into yet !
I have the github cloned on my linux machine, I've looked but I can't find the source code in there anywhere.
PeterO

Peter Onion

unread,
Mar 5, 2025, 5:59:41 AM3/5/25
to RC2014-Z80
Ok, now I've found the assign command....  I still don't see any source code there Wayne.
PeterO


On Wednesday, 5 March 2025 at 08:25:39 UTC Wayne Warthen wrote:

Peter Onion

unread,
Mar 5, 2025, 5:59:41 AM3/5/25
to RC2014-Z80
Wayne,
As far as I can tell there in noting in Slice 5 User 1.  User 0 has Wordstar files.

PeterO

PS: Seems my earlier replies have mysteriously been deleted !

On Wednesday, 5 March 2025 at 08:25:39 UTC Wayne Warthen wrote:

Wayne Warthen

unread,
Mar 5, 2025, 6:17:34 AM3/5/25
to rc201...@googlegroups.com
I’m afraid I’m traveling in China right now.  Very difficult to help further for a couple more weeks.   I will try to help when I return.

Sorry, Wayne

Peter Onion

unread,
Mar 5, 2025, 6:32:14 AM3/5/25
to RC2014-Z80
No problem Wayne.

I think I could make progress if only I could work out why ^K is being translated to line up rather than being the start of the normal ^K sequence.  I'm looking at the source for 1.6 and keep going round in circles :-)
I did find the reference to 1.8 in RomWBW/Source/Images/d_ws4/u1/README.MD but there is nothing to show where 1.8  source can be found or what the differences are to 1.6 (or 1.7 for that matter).
I'll keep trying to figure it out.

Thanks and Safe Traveling,  
PeterO

Wayne Warthen

unread,
Mar 5, 2025, 7:13:09 AM3/5/25
to rc201...@googlegroups.com
The ZDE configuration tool is used to do that.

Thanks, Wayne

Peter Onion

unread,
Mar 5, 2025, 7:32:53 AM3/5/25
to RC2014-Z80
I can't see how to do it with zdenst16.  I find prompts are a bit obscure. 

I'll look again more closely.

Thanks

PeterO

Peter Onion

unread,
Mar 5, 2025, 7:38:27 AM3/5/25
to RC2014-Z80
Worked it out...  :-)
Thanks for the hint :-)
PeterO

Peter Onion

unread,
Mar 5, 2025, 9:04:27 AM3/5/25
to RC2014-Z80
Wayne,

Thanks to your prompt I've got it working.  Now to fix some other minor annoyances :-)
Here is my code :

ANSIcu: CALL RptKey ;Handle ANSI cursor keys ESC-[...
SUB '5'
JR Z,ANSIpu
DEC A
JR Z,ANSIpd

SUB 'A' - '6'

JP Z,Up
DEC A
JP Z,Down
DEC A
JP Z,Right
DEC A
JP Z,Left
JP Error2
ANSIpu: CALL RptKey ; Swallow the trailing ~
JP PageB
ANSIpd: CALL RptKey ; Swallow the trailing ~
JP PageF


On Tuesday, 4 March 2025 at 17:28:03 UTC Wayne Hortensius wrote:

Mark Pruden

unread,
Mar 6, 2025, 1:04:19 AM3/6/25
to RC2014-Z80
Hi Peter.

Which version of the source code did you use?  

as well as ZDE18 COM file in RomWBW there also appear to be a ZDE16A COM file, with .PAT file description, but unclear if this is in the "Reconstituted source"

Which assembler did you use? Did you assemble this on device, or on a PC ?

Can you provide some pointers to best location of useful documentation, for the basic install and usage ?

Thanks
Mark

Mark Pruden

unread,
Mar 6, 2025, 1:07:25 AM3/6/25
to RC2014-Z80

Note : I have been using TE (text editor) because the C code is a bit more approachable, I have the same issue with Page Up and Down, and changing TE seem a lot easier., it was more of less designed to support multiple different terminals, but it does have significant limitations.. 

Peter Onion

unread,
Mar 6, 2025, 3:11:45 AM3/6/25
to rc201...@googlegroups.com
On Wed, 2025-03-05 at 22:04 -0800, Mark Pruden wrote:
> Hi Peter.
>
> Which version of the source code did you use? 

zde16.asm from https://github.com/mecparts/zde

>
> as well as ZDE18 COM file in RomWBW there also appear to be a ZDE16A COM
> file, with .PAT file description, but unclear if this is in the
> "Reconstituted source"

I've not looked at that.

> Which assembler did you use? Did you assemble this on device, or on a PC ?

M80 and L80 on the Z80. These are the versions I used back in the 1980s recovered from an
8" floppy a few years ago. I'm editing the asm code with emacs on linux, so I have to try
hard to avoid "Doh! wrong editor!" moments :-)

> Can you provide some pointers to best location of useful documentation, for
> the basic install and usage ?

Not really, no. As far as usage, there is onscreen help included and it mostly uses
Wordstar key sequences. The source code is commented and not to hard to understand once
you get the hang of the way characters are decoded using the "case" function and its
associated lookup table.

There is still one issue I want to look at though. After a message is displayed in the
screen header it seems to wait for ESC to be pressed, but if that comes in as the start of
an ANSI sequence (like cursor down) then the rest of the sequence gets inserted into the
text. It might be better to wait for a particular ANSI sequence (like F0 key) to avoid
this problem ?


>
> Thanks
> Mark
>

Peter Onion

unread,
Mar 6, 2025, 10:48:38 AM3/6/25
to RC2014-Z80


;ESCLp: CALL RptKey ;await ESC from console
; CP ESC
; RET Z
; CP ' '
; JR NZ,ESCLp
; RET

ESCLp: ; PJO
LD HL,F0str
LD BC,5
ESCLp1:
PUSH HL
PUSH BC
CALL RptKey
POP BC
POP HL
CPI
JR NZ,ESCLp
RET PO
JR ESCLp1

F0str: db ESC,'[','1','1','~'

Peter Onion

unread,
Mar 6, 2025, 10:51:27 AM3/6/25
to RC2014-Z80
ARGH !   Last post is my solution to the problem with escape sequences after a header menu.  ESCLp now wait for the complete sequence for F1 key before returning which in a quick test stops the insertion of spurious characters.
PeterO

MartinR

unread,
Mar 14, 2025, 1:16:50 PM3/14/25
to RC2014-Z80
Is there a version of ZDE now available that supports cursor keys?

I was an avid user of Wordstar from 1986 to 1992, but my muscle memory of the 'Wordstar Diamond' has long since faded and I'd love to have a text editor that supports cursor keys for my RC2014 system.

Are the files available somewhere? Or is there a detailed 'how to' available? I need something easy and straightforward to implement.

Grateful if someone can help me.

Many thanks -


MartinR

Peter Onion

unread,
Mar 14, 2025, 1:51:26 PM3/14/25
to rc201...@googlegroups.com
On Fri, 2025-03-14 at 10:16 -0700, MartinR wrote:
> Is there a version of ZDE now available that supports cursor keys?
>
> I was an avid user of Wordstar from 1986 to 1992, but my muscle memory of the 'Wordstar
> Diamond' has long since faded and I'd love to have a text editor that supports cursor
> keys for my RC2014 system.
>
> Are the files available somewhere? Or is there a detailed 'how to' available? I need
> something easy and straightforward to implement.
>
> Grateful if someone can help me.


ZDE16 as included in RomWBW does support cursor keys, but it is not vert well done.
You can easily end up with spurious characters being inserted into your text if you press
a cursor key at an inappropriate moment or if you press a key that sends an unsupported
escape sequence (like PgUp/PgDn/Home/End/Insert/Delete).

I have a patched version that has better support for ANSI key escape sequences but I don't
know how such modifications to old code are handled. Maybe Warren can advise.


PeterO


Wayne Warthen

unread,
Mar 14, 2025, 8:58:13 PM3/14/25
to rc201...@googlegroups.com
Hi Folks,

My situation in China makes it hard to provide a full explanation and response.  I will provide a thorough response in a week or so.

Thanks, Wayne

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.

MartinR

unread,
Mar 16, 2025, 3:21:19 AM3/16/25
to RC2014-Z80
Thanks, Peter and Wayne. 

I'll take a look at the version of ZDE that's already distributed with RomWBW. 

It feels like a text editor that can properly handle the cursor keys that we've all become used to would be a useful enhancement to RomWBW. I've located several versions of ZDE in \Source\Images\d_ws4\u1 this maybe the place to include Peter's improved version of ZDE. I appreciate that there are space constraints with some of the disk images, but perhaps the space can be found somewhere.

Many thanks, 


MartinR

Peter Onion

unread,
Mar 16, 2025, 3:54:20 AM3/16/25
to rc201...@googlegroups.com
On Sun, 2025-03-16 at 00:21 -0700, MartinR wrote:
> Thanks, Peter and Wayne. 
>
> I'll take a look at the version of ZDE that's already distributed with RomWBW. 
>
> It feels like a text editor that can properly handle the cursor keys that we've all
> become used to would be a useful enhancement to RomWBW.

Martin,

Are you familiar with using a Z80 assembler ?

If so and if you want to give my version a try I'll put the source code on my web site,
but I'll say now that I've only looked at a few very small sections of the source code so
I can't help with any issues outside of those.

PeterO




MartinR

unread,
Mar 16, 2025, 5:37:13 AM3/16/25
to RC2014-Z80
Hi Peter - 

I'm reasonably OK with a Z80 assembler. Not quite as proficient as I was back in the 1980s, but able to write the simple bits of code I want to. As time permits - my current project is a strain-gauge/load-cell/HX711-ADC that I want to take readings from and output as a CSV file for subsequent processing with Excel.

I'm not sure I'd know where to start with the code for ZDE, but I'm happy to have a go with your  modified source code if you're happy to share. Is your code now complete insofar as it assembles and produces the final .COM file?

Many thanks


MartinR

Peter Onion

unread,
Mar 16, 2025, 5:54:48 AM3/16/25
to rc201...@googlegroups.com
On Sun, 2025-03-16 at 02:37 -0700, MartinR wrote:
> Hi Peter - 
>
> I'm reasonably OK with a Z80 assembler. Not quite as proficient as I was back in the
> 1980s, but able to write the simple bits of code I want to. As time permits - my current
> project is a strain-gauge/load-cell/HX711-ADC that I want to take readings from and
> output as a CSV file for subsequent processing with Excel.
>
> I'm not sure I'd know where to start with the code for ZDE, but I'm happy to have a go
> with your  modified source code if you're happy to share. Is your code now complete
> insofar as it assembles and produces the final .COM file?
>

Yes (almost) !

I'm assembling with M80 and L80 to produce the .COM file, but any Z80 assembler (native or
cross) should do the job just as well.

PeterO



MartinR

unread,
Mar 16, 2025, 6:23:00 AM3/16/25
to RC2014-Z80
I can remember using M80/L80 back in the day, but that was when my only machine was a 64K Z80A machine running CP/M. Since starting with RomWBW I've been using TASM on my Win11 PC, primarily because of things like Notepad++ as an editor, but I have an aim of writing/assembling code natively on my SC126. I think that there are some minor differences between TASM's and M80's assembler directives, but there's nothing stopping me assembling your code with M80/L80 on my SC126.

MartinR

Peter Onion

unread,
Mar 16, 2025, 6:51:50 AM3/16/25
to rc201...@googlegroups.com
On Sun, 2025-03-16 at 03:23 -0700, MartinR wrote:
> I can remember using M80/L80 back in the day, but that was when my only machine was a
> 64K Z80A machine running CP/M. Since starting with RomWBW I've been using TASM on my
> Win11 PC, primarily because of things like Notepad++ as an editor, but I have an aim of
> writing/assembling code natively on my SC126. I think that there are some minor
> differences between TASM's and M80's assembler directives, but there's nothing stopping
> me assembling your code with M80/L80 on my SC126.

Here you go...
https://www.peteronion.org.uk/Z80/zde16.mac

Escape sequences that work : cursor keys/Page Up/Page Down/Home/End/Delete
To continue after an "error" or banner message, press F1 rather than escape.

I'm using putty with keyboard setings or Function keys and keypad set to "ESCn["

In ZDE config I have these terminal settings (<<<<< are the things I change from
default) Note I run 80x43 terminal size.

EDIT TERMINAL.
Terminal ID: ANSI standard :
Viewable columns: 80 :
Auto wrap at line end: Y :
Viewable lines: 43 : <<<<<<<<<<<<<<
Extra DELete key: 08 : <<<<<<<<<<<<<<
Extra arrow keys u/d/r/l: 00000000 : <<<<<<<<<<<
Clear to end of line [06]: (03)1B5B4B :()
Terminal init [07]: (06)1B5B481B5B4A :()
Terminal deinit [07]: (06)1B5B481B5B4A :()
Alternate video on [06]: (04)1B5B376D :()
Alternate video off [06]: (03)1B5B6D :()
Alt video uses high bit: N :
Output filter limit: 7F :
Cursor position mode (Std/Rev/ANSI/None): A :
[Non-ANSI] Cursor position sequence: 00000000 :
Delay after cursor positioning: 00 :
Insert line [06]: (03)1B5B4C :()
Delete line [06]: (03)1B5B4D :()
Ins/del specific to line 1: N :
Cursor off [06]: (03)1B3B41 :()
Cursor on [06]: (03)1B3B49 :()




HTH

PeterO




MartinR

unread,
Mar 16, 2025, 10:26:25 AM3/16/25
to RC2014-Z80
Peter -

That's great! Thank-you. Much appreciate you sharing your code. Over the next day or two I'll have a go with M80/L80 and report back.

Many thanks -

MartinR

MartinR

unread,
Mar 18, 2025, 4:28:52 AM3/18/25
to RC2014-Z80
Hi Peter -

I've been trying to get your source code to assemble with M80, but have failed dismally - and I'm not sure where to go from here. Note - I renamed your MAC file to avoid confusion. 

I've been using the versions of M80/L80 that can be found in the RomWBW distribution at: Tools\cpm\bin80 And get the following results:

C>DIR
C: M80      COM : L80      COM : ZDE16PO  MAC
C>M80

*ZDE16PO,ZDE16PO=ZDE16PO/Z/L
%No END statement
%No END statement

No Fatal error(s)


The /Z switch is for M80 to use Z80 mnemonics, and the /L is to force a listing.  I'm aware that I could have shortened the M80 command line to reduce typing, but I typed the whole thing for completeness and clarity. Upon execution, M80 complains of there being no END statement, when there definitely is one.

Doing a STAT of the files gives the following:

C>A:STAT ZDE16PO.*

 Recs  Bytes  Ext Acc
 1098   140k    5 R/W C:ZDE16PO.MAC
    2     4k    1 R/W C:ZDE16PO.PRN
    1     4k    1 R/W C:ZDE16PO.REL
Bytes Remaining On C: 7964k


The REL file in only 1 record in length, meaning a file size of no more than 128bytes which is far too small. The PRN listing is nothing more than a couple of pages that are blank save for headers and footers - there is no listing at all, but it does reveal that I am using MACRO-80 3.44 of 09-Dec-81.

This is all repeatable.

Do you have any hints/tips as to what I am doing wrong? What was the command line you used for M80??

Grateful for any clues as to where I'm going wrong.

Very many thanks -


MartinR

Pascal COURTOIS

unread,
Mar 18, 2025, 4:47:16 AM3/18/25
to rc201...@googlegroups.com
Hi,

With the source from link :

 >m80 =zde16.mac/L
No Fatal error(s)
 >l80 zde16,zde16/N/E
Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft

Data    0100    42F1    <16881>

36937 Bytes Free
[0000   42F1       66]

Check your source is UTF-8 and/or the end-of-lines are correct (CRLF) after your transfert.

Pascal


--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.

Peter Onion

unread,
Mar 18, 2025, 4:54:47 AM3/18/25
to RC2014-Z80
Here's what I do (with blank lines removed).

E>m80 = zde16
No Fatal error(s)
E>l80 zde16,zde16/n/e

Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft
Data    0100    42F1    <16881>
27209 Bytes Free
[0000   42F1       66]
E>stat zde*.*
 Recs  Bytes  Ext Acc
  132    20k    1 R/W E:ZDE16.COM
 1161   148k    5 R/W E:ZDE16.MAC
  141    20k    1 R/W E:ZDE16.REL
Bytes Remaining On E: 4888k

You don't need the ".mac" or the /L on the m80 command line.
AH, Pascal has replied in the mean time. 

PeterO

MartinR

unread,
Mar 18, 2025, 3:45:44 PM3/18/25
to RC2014-Z80
Thanks both!

The answer was that there were no carriage returns in the MAC file that I downloaded. 

I tried downloading again, using right-click/'Save As' in Chrome and then examined the file using a hex editor which showed that the end of each line was terminated by linefeed only. Once I changed those LFs to CRLFs then M80 worked perfectly. I'll now feed the REL into L80...

I'm unable to explain whether this this is a problem with my downloading process, or whether the file that's hosted on the website has only LFs.

Many thanks.

MartinR

Peter Onion

unread,
Mar 19, 2025, 5:00:23 AM3/19/25
to RC2014-Z80
It might be that when I used kermit to transferred the source code from my linux box to my RC2014, it expanded unix end of line into cp/m end of line.  I will check when I next have cp/m booted.
PeterO

MartinR

unread,
Mar 23, 2025, 12:48:00 PM3/23/25
to RC2014-Z80
Hi Peter -

A quick update to let you know that I've not abandoned getting to grips with your implementation of ZDE. I've assembled and linked to get a COM file - so that's all good. 

My current struggle is getting it to work with the VT100 emulation in Tera-Term. I've no doubt that it's me rather than Tera-Term! I'll continue tweaking settings.....

One thing I'd like to have my go-to CP/M text editor do is to perform a 'delete character' when the 'delete' key is pressed (mirrors Win11 editors - Notepad++). For clarity - this is the key above the 'enter' key on a modern keyboard. Currently that key performs the same function as the the left-arrow cursor key. Would this be difficult to implement?

Kinde regards -

MartinR

Peter Onion

unread,
Mar 23, 2025, 1:09:12 PM3/23/25
to rc201...@googlegroups.com
On Sun, 2025-03-23 at 09:48 -0700, MartinR wrote:
> Hi Peter -
>
> A quick update to let you know that I've not abandoned getting to grips with your
> implementation of ZDE. I've assembled and linked to get a COM file - so that's all
> good. 
>
> My current struggle is getting it to work with the VT100 emulation in Tera-Term. I've no
> doubt that it's me rather than Tera-Term! I'll continue tweaking settings.....

Have you run the ZDE configuration tool on your zde.com file ?

I may have said already but I'm using putty which I've found to be the best VT100
emulator when using it on a real PDP-11. I had one of the museum's PDP-11s here last year
to write some demos on it.

> One thing I'd like to have my go-to CP/M text editor do is to perform a 'delete
> character' when the 'delete' key is pressed (mirrors Win11 editors - Notepad++). For
> clarity - this is the key above the 'enter' key on a modern keyboard. Currently that key
> performs the same function as the the left-arrow cursor key. Would this be difficult to
> implement?

That's what it does here -)

PeterO




MartinR

unread,
Mar 27, 2025, 4:35:05 PM3/27/25
to RC2014-Z80
Hi Peter - 

Noting that I used Tera Term rather that Putty, I've had another go, but have been a little more thorough in setting up the environment first - and it all went perfectly! I followed your configuration settings, though changed the number of lines on the terminal to 24. I've not used your tweaked version of the editor in anger, but just playing with it, I love the cursor keys and backspace!!! It's a lot more intuitive for a modern-day user compared with the WordStar "diamond". This will now become my go-to text editor under CP/M (not that I used CP/M for any non-text editing!).

Thanks for your work on this - I really do appreciate being able to use it, and I am sure that others will too.

If Wayne's reading this - please can I recommend that this more intuitive version of ZDE somehow be distributed with RomWBW??

Kind regards - 


MartinR

Wayne Warthen

unread,
Mar 27, 2025, 5:55:15 PM3/27/25
to RC2014-Z80
Hi Martin,

On Thursday, March 27, 2025 at 1:35:05 PM UTC-7 MartinR wrote:
If Wayne's reading this - please can I recommend that this more intuitive version of ZDE somehow be distributed with RomWBW??

Your timing on this message is fortuitous.  I have been virtually inactive with RomWBW for the last month due to multiple personal issues, but I am finally getting a bit more time for this.  I actually spent a few hours earlier today researching the past versions of ZDE and looking at Peter's changes.  I have been following Peter's changes with the intention of including them in the upcoming RomWBW distribution.

First, I want to make sure everyone is aware that the existing version of ZDE in RomWBW does support the use of VT100/ANSI arrow keys (up, down, left right).  Peter has augemented this with Page Up, Page Down, Home, and End key support (a nice change).

The history of ZDE is a bit messy.  Here is what I am aware of:
  • Carson Wilson releases his final version of ZDE (v1.6).  This was a binary only distribution and based on VDE to some extent.
  • Harold Bower releases a patch for v1.6 to correct a bug in preserving date/time stamps for multi-extent files and also allow disabling auto-indent.  This patch must be applied to the official v1.6 binary from Carson Wilson.
  • MECPARTS disassembles ZDE v1.6 (https://github.com/mecparts/zde), so we now have workable source code for ZDE!
  • MECPARTS releases ZDE v1.7 which claims to fix the same date/time stamp issue that Harold Bower's patch fixes.  He does not indicate if he also incorporated the second part of Harold Bower's patch (to allow disabling auto-indent).
  • Lars Nelson provides me with ZDE v1.8 (an update to to v1.7) which adds the ability to retain creation date/time stamps for CP/M+ (which are different from typical ZSDOS date/time stamps).  This is the version of ZDE currently included with RomWBW.
  • Peter Onion (working from v1.6 source I think) provides a set of updates to support ANSI/VT100 Page Up, Page Down, Home, and End and support use of F1 to "escape" from errors/menus.
So, here is what I plan to do.

I am going to include Lars Nelson's source (v1.8) in the RomWBW repository and include a build step for it.  I will then add Peter's enhancements to that version.  Finally, I will reapply the RomWBW configuration defaults to this code base.  I think this will result in a combination of all the latest ZDE efforts.  For lack of a better approach, I will label this v1.9.

I hope this makes sense to everyone.

Thanks, Wayne

MartinR

unread,
Mar 27, 2025, 6:10:31 PM3/27/25
to RC2014-Z80
Hi Wayne - 

Very much appreciate that you have been incredibly busy with your wife's health and your travel to the far East - so it's really appreciated that you can find the time to answer minor questions such as this.

I think that your proposal to include the slightly different versions of ZDE within RomWBW works as it gives users the options. I guess that the documentation needs to reflect these changes/options to ensure new users become aware.

Is a labelling of V1.9 likely to ever cause confusion with developments elsewhere? Possibly?? But I should think it works for this community. 

Personally, I think that Peter's enhancements make it a great editor for 21st century CP/M users.

All the very best -

MartinR  

Peter Onion

unread,
Mar 27, 2025, 7:08:05 PM3/27/25
to rc201...@googlegroups.com
On Thu, 2025-03-27 at 14:55 -0700, Wayne Warthen wrote:
> Hi Martin,
>
> On Thursday, March 27, 2025 at 1:35:05 PM UTC-7 MartinR wrote:
> > If Wayne's reading this - please can I recommend that this more intuitive version of
> > ZDE somehow be distributed with RomWBW??
>
> Your timing on this message is fortuitous.  I have been virtually inactive with RomWBW
> for the last month due to multiple personal issues, but I am finally getting a bit more
> time for this.  I actually spent a few hours earlier today researching the past versions
> of ZDE and looking at Peter's changes.  I have been following Peter's changes with the
> intention of including them in the upcoming RomWBW distribution.
>
> First, I want to make sure everyone is aware that the existing version of ZDE in RomWBW
> does support the use of VT100/ANSI arrow keys (up, down, left right).  Peter has
> augemented this with Page Up, Page Down, Home, and End key support (a nice change).

And Delete (but not insert as there doesn't seem to be existing functionality in ZDE that
would use it).

> The history of ZDE is a bit messy  Here is what I am aware of:
>  * Carson Wilson releases his final version of ZDE (v1.6).  This was a binary only
> distribution and based on VDE to some extent.
>  * Harold Bower releases a patch for v1.6 to correct a bug in preserving date/time
> stamps for multi-extent files and also allow disabling auto-indent.  This patch must be
> applied to the official v1.6 binary from Carson Wilson.
>  * MECPARTS disassembles ZDE v1.6 (https://github.com/mecparts/zde), so we now have
> workable source code for ZDE!
>  * MECPARTS releases ZDE v1.7 which claims to fix the same date/time stamp issue that
> Harold Bower's patch fixes.  He does not indicate if he also incorporated the second
> part of Harold Bower's patch (to allow disabling auto-indent).
>  * Lars Nelson provides me with ZDE v1.8 (an update to to v1.7) which adds the ability
> to retain creation date/time stamps for CP/M+ (which are different from typical ZSDOS
> date/time stamps).  This is the version of ZDE currently included with RomWBW.
>  * Peter Onion (working from v1.6 source I think) provides a set of updates to support
> ANSI/VT100 Page Up, Page Down, Home, and End and support use of F1 to "escape" from
> errors/menus.

Yes I started from the v1.6 sources.

There is an issue I have found with using F1 since I started using the HBIOS VT100
emulation layer with my CRT device rather than using Putty as a terminal via RS232..

The HBIOS emulation send different escape sequences for the function keys which I think
are the VT100 sequences for PF1..PF4 on a real VT100. Putty sends the ANSI escapes for
F1..F12 on a PS/2 keyboard though I think there is a configuration option to change o true
VT100 escapes.

I'll investigate (though it might be Sunday before I get much tme to check) and get a
definitive answer for you, but I'm pretty sure I've changed my patches to accept the VT100
sequence rather than the ANSI sequence. I can probably make it accept both which may
avoid potential "not working" reports :-)

PeterO




> So, here is what I plan to do.
>
> I am going to include Lars Nelson's source (v1.8) in the RomWBW repository and include a
> build step for it.  I will then add Peter's enhancements to that version.  Finally, I
> will reapply the RomWBW configuration defaults to this code base.  I think this will
> result in a combination of all the latest ZDE efforts.  For lack of a better approach, I
> will label this v1.9.
>
> I hope this makes sense to everyone.
>
> Thanks, Wayne
>
> --
> You received this message because you are subscribed to the Google Groups "RC2014-Z80"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> rc2014-z80+...@googlegroups.com.
> To view this discussion, visit
> https://groups.google.com/d/msgid/rc2014-z80/7d907275-c437-433a-9af8-72565427b6f3n%40googlegroups.com
> .

Wayne Warthen

unread,
Mar 27, 2025, 8:52:06 PM3/27/25
to RC2014-Z80
On Thursday, March 27, 2025 at 4:08:05 PM UTC-7 Peter Onion wrote:
There is an issue I have found with using F1 since I started using the HBIOS VT100
emulation layer with my CRT device rather than using Putty as a terminal via RS232..

The HBIOS emulation send different escape sequences for the function keys which I think
are the VT100 sequences for PF1..PF4 on a real VT100. Putty sends the ANSI escapes for
F1..F12 on a PS/2 keyboard though I think there is a configuration option to change o true
VT100 escapes.

I'll investigate (though it might be Sunday before I get much tme to check) and get a
definitive answer for you, but I'm pretty sure I've changed my patches to accept the VT100
sequence rather than the ANSI sequence. I can probably make it accept both which may
avoid potential "not working" reports :-)

Yes.  F1...F12 are likely to be unsupported in many VT100 scenarios since they did not exist until later in the VT series (VT320 maybe?)

In fact, using PF1 may also be a problem if the user has a non-ANSI terminal, right?

Thanks, Wayne

Peter Onion

unread,
Mar 28, 2025, 2:32:36 AM3/28/25
to RC2014-Z80
Yes Wayne, I need to come up with a solution that works for as many terminal types as possible.

My friend who is a DEC expert often comments that VTxxx keyboards were a bit of a mess when it came to function keys and escape keys.

Is the source code available for ZDENST16 if adding an extra configuration item is needed ? 

PeterO

Wayne Warthen

unread,
Mar 28, 2025, 4:53:31 PM3/28/25
to RC2014-Z80
On Thursday, March 27, 2025 at 11:32:36 PM UTC-7 Peter Onion wrote:
Is the source code available for ZDENST16 if adding an extra configuration item is needed ? 

Sadly, no.

-Wayne 

Wayne Warthen

unread,
Mar 28, 2025, 11:19:38 PM3/28/25
to RC2014-Z80
RomWBW Release Candidate 1 now has ZDE source code and incorporates the ANSI control sequences from Peter.  I have omitted the new escape key processing for now.

Thanks, Wayne

Peter Onion

unread,
Mar 29, 2025, 3:26:02 AM3/29/25
to RC2014-Z80
Thanks Wayne,

There's no pressure for me to sort out the escape key then LOL !!!  Hopefully I'll get to it tomorrow (I'm out at the museum today).

PeterO

Peter Onion

unread,
Mar 29, 2025, 4:28:28 PM3/29/25
to RC2014-Z80

Wayne, here's a version of ESCLp that works with the escape sequencies for F1 (ANSI) and PF1 (VT100).
Without this it is easy to end up with parts of escape sequences in your text if you don't notice the banner message such as [[[ Not Found ]]] when searching for text.


; Wait for F1 or PF1 from console
ESCLp:
LD HL,F1StrA
LD DE,F1StrB
LD BC,0503H

ESCLp1: PUSH HL
PUSH DE
PUSH BC
CALL RptKey
POP BC
POP DE
POP HL

CP (HL)
JR NZ,ESCLp2 ; Restart StrA
INC HL
DEC B
RET Z
JR ESCLp3
ESCLp2:
LD HL,F1StrA
LD B,5
ESCLp3:
EX DE,HL
CP (HL)
JR NZ,ESCLp4 ; Restart StrB
INC HL
DEC C
RET Z
JR ESCLp5
ESCLp4:
LD HL,F1StrB
LD C,3
ESCLp5:
EX DE,HL
JR ESCLp1

F1StrA: db ESC,'[','1','1','~'
F1StrB: db ESC,'O','P'

Wayne Warthen

unread,
Mar 29, 2025, 4:42:43 PM3/29/25
to RC2014-Z80
Thanks for the quick work on this Peter.  However, if I understand things, this will only work on ANSI/VT terminals.  It will prevent all other terminal types from working correctly since they will never send either string.  I have many users using alternate terminals.

I think a generalized solution for this requires a more comprehensive approach and I don't think it should be rushed.  I am about to release RomWBW v3.5 and I am not sure this is a good change to introduce at the last minute.  I was fine with the handling of the Page Up, Page Down, etc. keys because that change was very simple and easy to test with little chance of a functional regression.

Anyway, my point is that I would like to leave ZDE the way it is (including your original changes) for the v3.5 release.  I will gladly consider the additional changes once they can be fully vetted.  I hope you are OK with this.

Thanks, Wayne

Peter Onion

unread,
Mar 29, 2025, 5:00:41 PM3/29/25
to RC2014-Z80
Ah I see, I hadn't appreciated the issue with other terminal types.
I'll have a look to see if/how the terminal type can be picked up and try to make the F1/PF1 code conditional on the configured terminal type.

It may be that disassembling ZSENST16.COM is a way forward.  I had a look at that, and used "strings" on the .COM file

-rw-r--r-- 1 petero petero  10624 Mar 29 20:21 zdenst16.com
-rw-r--r-- 1 petero petero   4403 Mar 29 20:56 zdenst16.strings

so 10624-4403 = 6221 ish bytes of code which isn't a huge task to reconstruct.

PeterO

Peter Onion

unread,
Mar 30, 2025, 6:03:31 PM3/30/25
to RC2014-Z80
I've started to disassemble ZDENST16.COM and (so far) it's quite straight forward code.  I've just got to the point where it has taken the first user key press and is using a table to act on the character.  This is quite similar to the way ZDE decodes
user input (not surprising really !).

PeterO

Peter Onion

unread,
Mar 30, 2025, 6:09:07 PM3/30/25
to RC2014-Z80

I just checked in the ZDE source, and it exactly the same "case statement".  Code from ZDE16.MAC
;
;Case selection subroutine
;    CALL Case
;    DB   # of entries in list
;    DW   Default subroutine if no match
;    DB   value1
;    DW   subroutine1....
;    <return point>
;
Case: POP HL
LD B,(HL) ;entries
INC HL
LD E,(HL) ;DE=default sbr
INC HL
LD D,(HL)
INC HL
Lp1Ca: CP (HL) ;Value matches?
INC HL
JR NZ,Sk2Ca
LD E,(HL) ;yes, get address
INC HL
LD D,(HL)
JR Sk3Ca ;finish up
;
Sk2Ca: INC HL ;No match, skip ahead
Sk3Ca: INC HL
DJNZ Lp1Ca ;Try again
EX DE,HL ;Swap sbr and return
PUSH DE ;Store return (end of list)
JP (HL) ;Go do sbr (LAST match)
;
;

Code from ZDENST16.MAC

sub_1d48h:
pop hl ;1d48 e1 .
ld b,(hl) ;1d49 46 F
inc hl ;1d4a 23 #
ld e,(hl) ;1d4b 5e ^
inc hl ;1d4c 23 #
ld d,(hl) ;1d4d 56 V
inc hl ;1d4e 23 #
l1d4fh:
cp (hl) ;1d4f be .
inc hl ;1d50 23 #
jr nz,l1d58h ;1d51 20 05   .
ld e,(hl) ;1d53 5e ^
inc hl ;1d54 23 #
ld d,(hl) ;1d55 56 V
jr l1d59h ;1d56 18 01 . .
l1d58h:
inc hl ;1d58 23 #
l1d59h:
inc hl ;1d59 23 #
djnz l1d4fh ;1d5a 10 f3 . .
ex de,hl ;1d5c eb .
push de ;1d5d d5 .
jp (hl) ;1d5e e9

ladislau szilagyi

unread,
Mar 31, 2025, 2:14:16 PM3/31/25
to RC2014-Z80
Hi Peter,

ZDE is not the only CP/M text editor offering compatibility with the WordStar commands.

Please take a look at my version of Miguel Garcia's TE ( https://github.com/Laci1953/RC2014-CPM/tree/main/System/te%20text%20editor ).

TE is simple, user friendly, and edits the text in the RAM (it's fast when moving around in the text...).

I liked-it at first sight, some years ago, and I decided to improve its features.

Mainly, in my version I added some useful things that were missing in the original version:
- customizable TABs (at multiple of 4 or 8), using a command-line option
- customizable screen size, using command line options
- support for lines of text that are longer than the screen width
- cursor movement using the arrow keys, plus the PgUp, PgDn, Home & End keys.

Also, because the size of the files being edited by TE is limited by the size of the CP/M's TPA, I developed TE versions adapted for computers provided with 128/512 KB RAM. This way, larger files can be edited (the text file is stored not only in the "main" 64KB RAM, but also in the "extra" RAM space available...).

I'm working these days on a ROMWBW-compatible version of TE.. but, until I will finish-it, please try the "basic" TE, running on all RC2014's provided with 64KB RAM ( TE64.HEX on my GitHub page).

Of course, you will be able to handle only small text files (less than 20KB), but nevertheless, you will get a basic idea about this editor...

thanks,
Ladislau

Peter Onion

unread,
Mar 31, 2025, 2:22:42 PM3/31/25
to rc201...@googlegroups.com
On Mon, 2025-03-31 at 11:14 -0700, ladislau szilagyi wrote:
> Hi Peter,
>
> ZDE is not the only CP/M text editor offering compatibility with the WordStar commands.
>
> Please take a look at my version of Miguel Garcia's TE
> ( https://github.com/Laci1953/RC2014-CPM/tree/main/System/te%20text%20editor ).
>

I'm sure it's great, but I'm not about to abandon the not inconsiderable effort I've put
into this so far.

PeterO

Peter Onion

unread,
Apr 4, 2025, 7:29:51 AM4/4/25
to RC2014-Z80
ZdeNewOption.png
My recreated source code for the ZDE installation program ZDENSTxx.COM is working, and I've been able to add a new item to the USER OPTIONS section.
I've not tested much else yet so it might be a few days before I consider it ready.

I just noticed looking at the picture, that the prompt is wrong, it should read "Use F1 instead of ESC in header"... 
 
Once it is ready it will mean changes can be made to ZDE that require additional configuration during installation.

PeterO

Wayne Warthen

unread,
Apr 4, 2025, 11:37:28 AM4/4/25
to RC2014-Z80
Very nice Peter.  Making it configurable makes the most sense.

Thanks, Wayne

Reply all
Reply to author
Forward
0 new messages