Browse Source

Add TE Editor

Added latest RomWBW version of TE Editor from @Laci1953.

Co-Authored-By: ladislau szilagyi <87603175+Laci1953@users.noreply.github.com>
pull/519/head
Wayne Warthen 10 months ago
parent
commit
af21691d4e
No known key found for this signature in database GPG Key ID: 8B34ED29C07EEB0A
  1. BIN
      Doc/RomWBW Applications.pdf
  2. BIN
      Doc/RomWBW Disk Catalog.pdf
  3. BIN
      Doc/RomWBW Hardware.pdf
  4. BIN
      Doc/RomWBW Introduction.pdf
  5. BIN
      Doc/RomWBW System Guide.pdf
  6. BIN
      Doc/RomWBW User Guide.pdf
  7. 2
      ReadMe.md
  8. 2
      ReadMe.txt
  9. 2
      Source/Apps/ZDE/ReadMe.md
  10. 60
      Source/Doc/Catalog.md
  11. 207
      Source/Images/Common/All/u10/TE.DOC
  12. BIN
      Source/Images/Common/All/u15/TE.COM

BIN
Doc/RomWBW Applications.pdf

Binary file not shown.

BIN
Doc/RomWBW Disk Catalog.pdf

Binary file not shown.

BIN
Doc/RomWBW Hardware.pdf

Binary file not shown.

BIN
Doc/RomWBW Introduction.pdf

Binary file not shown.

BIN
Doc/RomWBW System Guide.pdf

Binary file not shown.

BIN
Doc/RomWBW User Guide.pdf

Binary file not shown.

2
ReadMe.md

@ -7,7 +7,7 @@
**RomWBW Introduction** \
Version 3.5 \
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
31 Mar 2025
01 Apr 2025
# Overview

2
ReadMe.txt

@ -1,6 +1,6 @@
RomWBW Introduction
Wayne Warthen (wwarthen@gmail.com)
31 Mar 2025
01 Apr 2025

2
Source/Apps/ZDE/ReadMe.md

@ -4,6 +4,8 @@
Using the source code of [VDE 2.67]
(http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/enterprs/cpm/utils/s/vde267sc.lbr)
as a guide, I've reconstituted the source code for [ZDE 1.6](http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/cpm/editor/zde16.lbr).
The resulting source code is available from the GitHub repository
https://github.com/mecparts/zde.
The source has been assembled with:

60
Source/Doc/Catalog.md

@ -688,34 +688,34 @@ RomWBW enhancements. These applications are typically documented in the
"RomWBW Applications.pdf" document in the Doc directory of the
RomWBW Distribution.
| **File** | **Source** | **Description** |
|----------------|-----------------|---------------------------------------------------------------|
| `ASSIGN.COM` | RomWBW | Assign,remove,swap drive letters of RomWBW disk slices |
| `CLRDIR.COM` | Max Scane | Initializes the directory area of a disk |
| `COPYSL.COM` | M.Pruden | Copy CPM Hard Disk Slices |
| `COPYSL.DOC` | M.Pruden | Documentation for COPYSL.COM |
| `CPUSPD.COM` | RomWBW | CPU Speed |
| `FAT.COM` | RomWBW | MS-DOS FAT filesystem tool (list, copy, delete, format, etc.) |
| `FDISK80.COM` | John Coffman | Hard disk partitioning tool |
| `FDU.COM` | RomWBW | Floppy Disk Utility, Test and format floppy disks |
| `FDU.DOC` | RomWBW | Documentation for FDU |
| `FLASH.COM` | Will Sowerbutts | Program FLASH chips in-situ |
| `FLASH.DOC` | Will Sowerbutts | Documentation for FLASH |
| `FORMAT.COM` | RomWBW | Placeholder application with formatting instructions |
| `HTALK.COM` | Tom Plano | Terminal utility talking directly to HBIOS Character Units |
| `MODE.COM` | RomWBW | Change serial line characteristics (baud rate, etc.) |
| `REBOOT.COM` | MartinR | Cold or Warm Boot the RomWBW System |
| `RTC.COM` | Andrew Lynch | Test real time clock hardware on your system |
| `SURVEY.COM` | RomWBW | Display system resources summary |
| `SYSCOPY.COM` | RomWBW | Copy system tracks to disks (make bootable) |
| `TALK.COM` | RomWBW | Route console I/O to & from specified serial port |
| `TIMER.COM` | RomWBW | Test and display system timer ticks |
| `TUNE.COM` | RomWBW | Play .PT2, .PT3, and .MYM audio files on supported hardware |
| `VGMPLAY.COM` | | Simple player for VGM (Video Game Music) files. |
| `WDATE.COM` | Kevin Boone | Utility to configure RTC Date. |
| `XM.COM` | RomWBW | XModem file transfer application |
Then we have some more general purpose applcations.
| **File** | **Source** | **Description** |
|----------------|-------------------|---------------------------------------------------------------|
| `ASSIGN.COM` | RomWBW | Assign,remove,swap drive letters of RomWBW disk slices |
| `CLRDIR.COM` | Max Scane | Initializes the directory area of a disk |
| `COPYSL.COM` | M.Pruden | Copy CPM Hard Disk Slices |
| `COPYSL.DOC` | M.Pruden | Documentation for COPYSL.COM |
| `CPUSPD.COM` | RomWBW | CPU Speed |
| `FAT.COM` | RomWBW | MS-DOS FAT filesystem tool (list, copy, delete, format, etc.) |
| `FDISK80.COM` | John Coffman | Hard disk partitioning tool |
| `FDU.COM` | RomWBW | Floppy Disk Utility, Test and format floppy disks |
| `FDU.DOC` | RomWBW | Documentation for FDU |
| `FLASH.COM` | Will Sowerbutts | Program FLASH chips in-situ |
| `FLASH.DOC` | Will Sowerbutts | Documentation for FLASH |
| `FORMAT.COM` | RomWBW | Placeholder application with formatting instructions |
| `HTALK.COM` | Tom Plano | Terminal utility talking directly to HBIOS Character Units |
| `MODE.COM` | RomWBW | Change serial line characteristics (baud rate, etc.) |
| `REBOOT.COM` | MartinR | Cold or Warm Boot the RomWBW System |
| `RTC.COM` | Andrew Lynch | Test real time clock hardware on your system |
| `SURVEY.COM` | RomWBW | Display system resources summary |
| `SYSCOPY.COM` | RomWBW | Copy system tracks to disks (make bootable) |
| `TALK.COM` | RomWBW | Route console I/O to & from specified serial port |
| `TIMER.COM` | RomWBW | Test and display system timer ticks |
| `TUNE.COM` | RomWBW | Play .PT2, .PT3, and .MYM audio files on supported hardware |
| `VGMPLAY.COM` | | Simple player for VGM (Video Game Music) files. |
| `WDATE.COM` | Kevin Boone | Utility to configure RTC Date. |
| `XM.COM` | RomWBW | XModem file transfer application |
Then we have some more general purpose applications.
In general, there is no documentation for these applications included with the RomWBW
distribution. Some provide command line help themselves. Some are fairly obvious.
@ -742,7 +742,9 @@ distribution. Some provide command line help themselves. Some are fairly obvio
| `SUPERSUB.DOC` | | Documentation for SUPERSUB |
| `SYSGEN.COM` | DRI | Copy system tracks to disks |
| `TBASIC.COM` | Dimitri Theulings | Tasty Basic. This also exists as a Rom appication |
| `TDLBASIC.COM` | | TDL Zapple 12K BASIC language interpreter |
| `TDLBASIC.COM` | | TDL Zapple 12K BASIC language interpreter |
| `TE.COM` | Ladislau Szilagyi | RomWBW enhanced version of TE editor |
| `TE.DOC` | Ladislau Szilagyi | TE Editor Documentation |
| `UNARC.COM` | | Extract file(s) from .ARC or .ARK archive |
| `UNARC.DOC` | | Documentation for UNARC |
| `UNCR.COM` | | Decompress Crunched file(s). See CRUNCH.COM |

207
Source/Images/Common/All/u10/TE.DOC

@ -0,0 +1,207 @@
The version of TE included with RomWBW is provided by Ladislau Szilagyi.
It is distributed from his GitHub repository at
https://github.com/Laci1953/RC2014-CPM/tree/main/System/te%20text%20editor.
RomWBW includes the RomWBW specific version of TE (TEWBW), but is called
just TE. TEWBW is distributed as a hex file. It has already been
converted to a .COM file in the RomWBW distribution.
The following is a copy of the ReadMe file from the TE distribution.
-- WBW 11:14 AM 4/1/2025
# Updated on April 2025
-----------------------------
The text editor TE was written by Miguel Garcia.
It's simple, user friendly, and edits the text in the RAM (it's fast...).
But, because the CP/M's 64KB RAM is limited as capacity (the operating system, the program and the text file must fit inside these 64KB RAM), the original TE allowed only small files to be edited (up to 20K).
I made this adaptation to harness the advantages of being provided with some extra RAM, in certain Z80 hardware platforms.
This version of the text editor TE works on the following hardware environments:
TE64 - any RC2014 with 64KB RAM
TE128 - Z80 systems provided with SC108, SC114, SC118, SC150, SC152 or the Phillip Stevens memory module (128 KB RAM),
TE512 - Z80 systems provided with the 512KB RAM + 512KB ROM module
TEZ80ALL - Z80ALL (25MHz Z80, 4 x 32KB RAM, VGA 48x64, keyboard) (see https://github.com/Laci1953/Software-for-Z80ALL-retro-computer/tree/main/TE)
TES80 - Simple80 (2 x 64KB RAM)
TEWBW - RC2014 running RomWBW
Use the HiTech tools to compile & link the sources.
Settings:
TE64: 64K RAM systems - up to 2048 lines, VT100 compatible, with WordStar style keyboard (accepts also arrow keys)
TE128: 128K RAM systems - up to 4093 lines, VT100 compatible, with WordStar style keyboard (accepts also arrow keys)
TE512: 512K RAM systems - up to 8192 lines, VT100 compatible, with WordStar style keyboard (accepts also arrow keys)
TEZ80ALL: Z80ALL standalone retro computer - up to 8192 lines, VGA 48x64, with WordStar style keyboard (accepts also arrow keys)
TES80: 128K RAM systems - up to 4093 lines, VT100 compatible, with WordStar style keyboard (accepts also arrow keys)
TEWBW: up to 4096 lines, VT100 compatible, with WordStar style keyboard (accepts also arrow keys)
Design details and some constraints:
1. For the 512KB version:
-------------------------
To handle the memory allocation requests, a new memory allocator was written.
How it works:
The 512KB RAM module uses 32 16KB "virtual" RAM pages, mapped to one of 4 "physical" pages 0000-3FFF, 4000-7FFF, 8000-BFFF and C000-FFFF.
Any virtual page can be mapped to any physical page.
The memory physical area from 8000H to BFFFH (let's name-it "work area") is used to load one of the 32 "virtual" 16KB pages from the 512KB RAM, and the memory allocator returns a pointer to the available buffer and a byte containing the index of the 16KB page that contains this buffer (let's name-it "page index").
When that buffer needs to be accessed for read/write operations, the 16KB RAM page must be first loaded into the "work area",
using a function call with the "page index" as parameter.
Of course, to "free" the allocated buffer, this "page index" must be provided too.
Text files up to 400KB can be edited.
The 521KB version can be run on any CP/M version, regardless of its TPA area size.
2. For the 128KB version:
-------------------------
To handle the memory allocation requests, a new memory allocator was written.
How it works:
The 128KB RAM is divided into 2 "virtual" 64KB banks: the lower and the upper bank. A port selects which "virtual" 64KB RAM bank is mapped to the physical 64KB RAM.
In order to execute code that switches from the lower to the upper bank (and back...),
that piece of code must be present at the same physical address in both of banks (the so called "shadow code)".
It is impossible to store shadow code in the upper bank using only programs resident in RAM,
for this only ROM-based code may help; SCM contains an API function ( $2B ) which moves a byte to a given address of the upper RAM bank.
In early SCM version (e.g. v1.0), this API call is not documented (it cannot be found in the SCM manual), I've found-it by browsing through the SCM source code...
Therefore, by using this $2B SCM API call, the shadow code can be moved to the upper RAM bank.
As a second possibility, this routine can be stored also, at a fixed address (7F00H) in the EPROM used to boot CP/M (see https://github.com/Laci1953/RC2014-CPM/tree/main/BOOT ).
But, for the memory allocator, we have also another important constraint: the shadow code must be stored in top of the physical 64KB RAM, in order to offer as much possible RAM available to be allocated (storing at the bottom of the physical 64KB RAM is out of question, we have there the 100H BIOS buffers area). There is only one possible solution: storing a small shadow code on top of CP/M's BIOS. My shadow code is less than 40H.
Studying the "classic" RC2014 CP/M that is currently used with 64/128MB CF's, I discovered that the BIOS "eats" practically all the space to FFFF ! There was no room for my shadow code!
I solved this issue by building a smaller CP/M, for both 64MB & 128MB CF's. You may find this CP/M in the PutSys folder.
The algorithm used to allocate memory is the following: if the usual call to malloc fails, the new allocator accesses the upper 64KB RAM bank and allocates there the buffer.
Besides the address of the buffer, a byte containing the RAM bank index is returned too (0=lower 64KB RAM, 1=upper 64KB RAM).
To access a buffer reserved in the upper 64KB RAM bank, special functions must be used to read/write a byte, a word, or a string.
Text files up to 80KB can be edited.
But, this comes with a cost: when opening a file to be edited, the editor reads all the text and store this text in the dynamic memory, and this takes time, because every single byte that has to be moved to the upper RAM bank is not simply moved, as in case of the lower bank, but is passed to the shadow code in order to be stored in the upper RAM bank. Also, a buffer for every new text line that is read must be allocated, and this allocation means also accessing the shadow code, in order to manage (read/write) the data structures that handle the available memory pool.
Once the file is read, the browse/search operations prove to be quick (compared for example with the performance of WordStar), because no more file read operations are needed, all the text is in the memory.
As a conclusion: the TE editor 128KB version will work only for RC2014 systems provided with my "custom CP/M"
Comparing the two versions of TE (128KB vs. 512KB), the 512KB version is by far the best.
First, the size of files that can be edited is larger (400KB vs. 80KB).
Then, the initial phase of file reading when starting the editor is faster.
But, I consider both versions of the TE editor as a step forward in the right direction, allowing larger files to be edited in memory, with an elegant an efficient user interface.
February 2022
-------------
TE now supports TABs.
The files, when loaded, will be displayed using TABs indentation.
The TAB interval (4 or 8) may be set from the command line: >TE file.ext [ 4 | 8 ] ; default = 8.
March 2023
----------
I made some improvements mainly related to the usability of the tool.
1. First, I opted to display a small help message, in the case when RE is executed without parameters; the message is showing all the available options.
-------------
D>te
TE text editor
Copyright (c) 2015-2021 Miguel Garcia / FloppySoftware
Adapted for 128KB RAM by Ladislau Szilagyi
Use: >TE [options] [filename]
where options (lowercase or uppercase) are:
-Tn (n = 4 or 8) sets the tabs to n spaces, default is 8
-Hnn sets the screen height (up to 99, default is 24)
-Wnnn sets the screen width (up to 200, default is 80)
Continue? (N/n = quit) :
------------
You can press N/n to quit to CP/M, or any other key to continue TE, being presented with an empty screen, ready for text input...
2. Tabs can be used freely in the text; you have two options related to TAB's alignment ( 4 or 8 ); the default is 8.
You can change-it to 4 using the option -T in the command line.
It important to mention that the use of TABs does not increase the size of the text file, nor the size of buffers allocated in memory to store the text; this is because TABs are inflated/deflated to/from blanks only when needed, (e.g.) when displayed on screen.
3. When reading/writing files, a line containing a counter of the lines being processed is displayed, to offer to the user a clue related to the status of the I/O operation.
4. The number of columns/lines can now be selected directly in the command line, using the -W or -H options; default values are 24 for lines, and 80 for columns.
I opted to unify the two versions of source code (128/512), now there is a single set of source files for both 128KB and 512KB TE versions.
As a reminder, the TE128 can edit files with sizes up to 80KB, and TE512 up to 400KB.
April 2023
----------
I made a major improvement, allowing text files with long lines to be processed (lines with up to 145 chars for 80 column screens, up to 115 chars for 64 column screens).
I have now also a TE adapted for Bill Shen's Z80ALL (Z80 at 25MHz, 4 x 32KB RAM, VGA 48x64, keyboard).
Text files up to 64KB can be edited.
This version is fast enough to allow handling large files without the handicap of long waiting interval until the whole file is read - some seconds are enough...
September 2023
--------------
I improved the code related to cursor placement, in the line and up/down between lines; this involves keeping track of TAB's, and assuring that the cursor is always positioned to a position containing a "real" character (e.g. when moving the cursor in a line containing multiple TAB's, the cursor is never placed to a position that does not contain a character or a TAB)
Also, BackSpace behavior was aligned to the above rule.
October 2023
--------------
The 128KB RAM version is now capable to edit text files with size up to 80KB; also, the initial "read file" step is faster.
March 2025
----------
Besides the "arrow" keys (UP, DOWN, LEFT, RIGHT), in the TE version 1.12, also the following keys can be used to move the cursor:
-PgUp (displays the previous page of text),
-PgDn (displays the next page of text),
-Home (displays the first page of text),
-End (displays the last page of text)
Also, here are some clarifications related to the "text blocks handling" feature:
TE is able to select, copy, paste and delete contiguous sets of lines of text (blocks).
Use ^KB to mark the starting line of a block and ^KK to mark the ending line of a block.
Then, you may use block-related operations, e.g.:
Type ^O to copy this block to the clipboard (the block will be displayed on video reverse),
move the cursor to another place in the file and type ^W to paste the block.
April 2025
----------
The TEWBW.HEX file is built to be used on RC2014 computers running RomWBW (version 3.5.0 or later)
The size of the files that can be edited depends on the RomWBW configuration (more exactly on the number of RAM banks available for apps).
For example, if installing RCZ80_std.rom on a RC2014 provided with 512KB ROM + 512KB RAM, we get 3 x 32KB = 96KB available to store the files.
Files up to 4096 lines are accepted.

BIN
Source/Images/Common/All/u15/TE.COM

Binary file not shown.
Loading…
Cancel
Save