Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VDE 2.66 source reconstruction/adaptation

231 views
Skip to first unread message

Russell Marks

unread,
Nov 26, 2020, 9:28:39 PM11/26/20
to
I either hadn't realised or had forgotten that VDE has source
available, e.g. on the Walnut Creek CP/M CD as here:

http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/enterprs/cpm/utils/s/vde267sc.lbr

But that source doesn't match the last pre-ZDE CP/M binary version,
2.66. So I thought, that's only about 0.01 versions different, surely
I could reconstruct source files which build 2.66. I mean, how hard
could it be?

So hours later :-) I got it assembling with the same setup I used
recently, the ZSM4 assembler, and LINK from CP/M 3. I did it from
Linux using zxcc, but ZSM4 and LINK are both CP/M programs. While
there are still minor and hopefully harmless differences past EOF that
I couldn't easily see how to fix (^Zs rather than NULs, and vinst.com
having some uninitialised data actually included as NULs), aside from
that all three COM files end up the same as the binary release
byte-for-byte.

Since VDE has an "interesting" history - being derived from an editor
originally printed in a magazine, I believe - I personally have some
doubts about the copyright situation. So I'd rather not upload the
source anywhere, instead I'm just posting a diff relative to that
2.67b source. To get it to apply you'll need the filenames to be in
lowercase, then remove the CRs, ^Zs, and (weirdly) NUL bytes from the
original source files before patching - one simple approach to doing
that on e.g. Linux is to extract the LBR with lbrate, then do:

for i in *.asm; do tr -dc '\n\t[:print:]' <$i >tmp;mv tmp $i; done

Bear in mind that the source as patched essentially builds the
original VDE 2.66 *without* the important "vde266.fix" bugfix, so be
sure to apply that afterwards before using any resulting binaries!

Links for the tools used:

lbrate - http://www.ibiblio.org/pub/Linux/utils/compress/lbrate-1.1.tar.gz
zxcc - https://www.seasip.info/Unix/Zxcc/index.html
ZSM4 - https://github.com/hperaza/ZSM4
LINK from CP/M 3 - http://www.cpm.z80.de/download/yazecpm3.zip

With zxcc being a CP/M emulator of sorts, it should be easy to see
from the Makefile what to do to build natively on CP/M (it's pretty
straightforward anyway).

The patch will also create the Makefile I used, FWIW.

==================== vde-2.67b-to-2.66.diff ====================
diff -urN vde267b-src/makefile vde266-src/makefile
--- vde267b-src/makefile 1970-01-01 01:00:00.000000000 +0100
+++ vde266-src/makefile 2020-11-27 01:43:55.316491442 +0000
@@ -0,0 +1,27 @@
+# Makefile
+
+all: vde vdm vinst
+
+vde: vde.com
+
+vdm: vdm.com
+
+vinst: vinst.com
+
+vde.com: vde.asm vdx1.asm vdx2.asm vdx3.asm
+ zxcc zsm4 vde,vde=vde.asm
+ zxcc cpm3link vde
+
+vdm.com: vdm.asm vdx1.asm vdx2.asm vdx3.asm
+ zxcc zsm4 vdm,vdm=vdm.asm
+ zxcc cpm3link vdm
+
+vinst.com: vi.asm
+ zxcc zsm4 vinst,vinst=vi.asm
+ zxcc cpm3link vinst
+
+clean:
+ $(RM) *~ *.bak *.prn *.rel *.sym
+
+spotless: clean
+ $(RM) vde.com vdm.com vinst.com
diff -urN vde267b-src/vde.asm vde266-src/vde.asm
--- vde267b-src/vde.asm 2020-11-27 00:50:00.898974983 +0000
+++ vde266-src/vde.asm 2020-11-27 00:35:28.777084442 +0000
@@ -39,8 +39,8 @@
ERRM EQU 45
;
;
-INCLUDE VDX1.ASM ;core code
-INCLUDE VDX2.ASM ;functions
-INCLUDE VDX3.ASM ;print, video, data
+INCLUDE vdx1.asm ;core code
+INCLUDE vdx2.asm ;functions
+INCLUDE vdx3.asm ;print, video, data
;
END
diff -urN vde267b-src/vdx1.asm vde266-src/vdx1.asm
--- vde267b-src/vdx1.asm 2020-11-27 00:50:00.948974594 +0000
+++ vde266-src/vdx1.asm 2020-11-27 01:22:51.828379929 +0000
@@ -23,10 +23,12 @@
; backward find; ShoRCu
; 2.65 - 4/88 - ^OI/N args; Esc-TAB; ^OA; menu removal; minor fixes
; 2.66 - 6/24/88 - Printer margins; Minor fixes. LAST RELEASE!
-; 2.67b - 10/14/88 - Minor fixes
; -------------------
;
- ORG 0100H
+;2020 Nov 27 - 2.66 source based on 2.67b (as suitable for ZSM4) by RJM
+;(Rebuilds byte-for-byte, aside from some differing zero/^Z past EOF)
+;
+; ORG 0100H
JP Start ;Entry and exit vectors
Boot: JP 0
;
@@ -43,158 +45,140 @@
VersID: ;0113H: version message (28 chars, used in menu)
IF VDM
; [----5----10---15---20---25--]
- DB ' VDE-M 2.67b(c)1988 E.Meyer ',0
+ DB ' VDE-M 2.66 (c)1988 E.Meyer ',0
ELSE
- DB ' VDE 2.67b (c)1988 E.Meyer ',0
+ DB ' VDE 2.66 (c)1988 E.Meyer ',0
ENDIF
;
;
;USER PATCHABLE VALUES
;
- ORG 0130H
-BAKFlg: DB 0 ;0130H - create BAK files (y/n)
+ ORG 0130H-0100H
+BAKFlg: DB 0FFh ;0130H - create BAK files (y/n)
DFMode: DB 'A' ;default file mode W/A/N
FDflt1: DB 'ASMN' ;1st default override
-FDflt2: DB 'C N' ;2nd
+FDflt2: DB '....' ;2nd
InsFlg: DB 0 ;default insert on (y/n)
RulFlg: DB 0 ;default ruler on (y/n)
HCDflt: DB 0FFh ;default HCR disp on (y/n)
-HypFlg: DB 0FFH ;enable hyphenation (y/n)
+HypFlg: DB 0 ;enable hyphenation (y/n)
DfltLM: DB 1 ;left margin column (1=OFF)
-DfltRM: DB 78 ;right margin column (1=OFF)
+DfltRM: DB 1 ;right margin column (1=OFF)
Ovlap: DB 2 ;scroll overlap (0=none)
DirSys: DB 0 ;include SYS files (y/n)
-FixDsk: DB 'P@' ;fixed drives
+FixDsk: DB '@@' ;fixed drives
Ring: DB 0 ;errors ring bell (y/n)
-Help: DB 0 ;use help menus (y/n)
-AltHdr: DB 0FFH ;use alt video in header (y/n)
+Help: DB 0FFH ;use help menus (y/n)
+AltHdr: DB 0 ;use alt video in header (y/n)
NoHdrF: DB 0 ;suppress header (y/n)
IF VDM
-MHz: DB 80H ;clock speed (40h=4MHz)
-Timer: DB 01H ;horiz scroll delay (01...FF)
+MHz: DB 40H ;clock speed (40h=4MHz)
+Timer: DB 40H ;horiz scroll delay (01...FF)
ELSE
-MHz: DB 50H
+MHz: DB 40H
Timer: DB 40H
ENDIF
TabCnt: DB 8-1 ;hard tab cols -1 (1/3/7/15)
-VTList: DB 6,15,35,55,0,0,0,0 ;variable tab columns (8)
+VTList: DB 5,15,35,55,0,0,0,0 ;variable tab columns (8)
VTNum EQU $-VTList
WildCd: DB '_' ;wildcard character
BlkChr: DB 00H ;block character (^@)
-TogTbl: DB 02h,14h,13h,19h ;toggles ^B,^T[^D],^S,^Y
+TogTbl: DB 02h,04h,13h,19h ;toggles ^B,^T[^D],^S,^Y
NTgTbl: DB 11h,17h,05h,12h ;switches ^Q,^W,^E,^R (last 015C)
;
;INSTALLATION
;
IF VDM ;Memory Mapped installation
- ORG 0160H
+ ORG 0160H-0100H
DB 'Osborne Exec ' ;ID
- ORG 0170H
+ ORG 0170H-0100H
View: DB 80 ;viewable columns (max 128)
Extra: DB 48 ;empty cols in logical line
Lines: DB 24 ;viewable lines (min 8)
UsrKys: DB 0FFh ;DEL key
DB 0BH,0AH,0CH,0FFH ;arrows up,down,right,left
- ORG 0180H
+ ORG 0180H-0100H
TInit: DB 1, 1AH,0,0,0,0,0,0 ;terminal init, 7 bytes
TUInit: DB 1, 1AH,0,0,0,0,0,0 ;terminal uninit
- ORG 0190H
+ ORG 0190H-0100H
CuOff: DB 3, ESC,'.0',0,0,0 ;cursor hide, 6 bytes
CuOn: DB 3, ESC,'.2',0,0,0 ;cursor unhide
VidRAM: DW 0C000H ;Video RAM address
VidIN: PUSH AF ;Switch Video IN, 16 bytes
- LD A,41H
- OUT 0,A
+ IN A,(0)
+ SET 6,A
+ OUT (0),A
POP AF
RET
- ORG 01B0H
+ ORG 01B0H-0100H
VidOUT: PUSH AF ;Switch Video OUT
- LD A,01H
- OUT 0,A
+ IN A,(0)
+ RES 6,A
+ OUT (0),A
POP AF
RET
ELSE ;Generic Installation
- ORG 0160H
- DB 'Unidos Osb4 Emul' ;ID
- ORG 0170H
+ ORG 0160H-0100H
+ DB 'Generic CRT ' ;ID
+ ORG 0170H-0100H
View: DB 80 ;viewable columns (max 128)
AuWrap: DB 0FFh ;does autowrap occur
Lines: DB 24 ;lines
UsrKys: DB 0FFh ;DEL key
- DB 0BH,0AH,0CH,0FFH ;arrows up,down,right,left
- ORG 0179H
-ClL: DB 2, ESC,'T',0,0,0,0 ;clear to end of line, 6 bytes
+ DB 0FFH,0FFH,0FFH,0FFH ;arrows up,down,right,left
+ ORG 0179H-0100H
+ClL: DB 0, 0,0,0,0,0,0 ;clear to end of line, 6 bytes
TInit: DB 1, 1AH,0,0,0,0,0,0 ;terminal init, 7 bytes
TUInit: DB 1, 1AH,0,0,0,0,0,0 ;terminal uninit
-AltOn: DB 2, ESC,'j',0,0,0,0 ;alt video on, 6 bytes
-AltOff: DB 2, ESC,'k',0,0,0,0 ;alt video off
+AltOn: DB 0, 0,0,0,0,0,0 ;alt video on, 6 bytes
+AltOff: DB 0, 0,0,0,0,0,0 ;alt video off
AltBit: DB 0 ;high bit gives alt video?
Filter: DB 7FH ;highest ASCII to send to screen
-PosMod: DB 'S' ;curpos mode (Std/Rev/ANSI/None)
-PCu: DB ESC,'=',20h,20h ;position cursor to (0,0)
+PosMod: DB 'N' ;curpos mode (Std/Rev/ANSI/None)
+PCu: DB 1EH,0,0Ch,0 ;position cursor to (0,0)
PosDly: DB 0 ;delay after curpos (00-FF)
-InsL: DB 2, ESC,'E',0,0,0,0 ;insert line [1], 6 bytes
-DelL: DB 2, ESC,'R',0,0,0,0 ;delete line [1], 6 bytes
+InsL: DB 0, 0,0,0,0,0,0 ;insert line [1], 6 bytes
+DelL: DB 0, 0,0,0,0,0,0 ;delete line [1], 6 bytes
OddDel: DB 0 ;ins/del line specific?
ENDIF
;
- ORG 01C0H ;Printer codes
- DB 'Alps ALQ 200 ' ;ID
- ORG 01D0H
+ ORG 01C0H-0100H ;Printer codes
+ DB 'Teletype ' ;ID
+ ORG 01D0H-0100H
UseLF: DB 0FFh ;use LF after CR in print?
-FormL: DB 56 ;form length (0=no pag)
+FormL: DB 58 ;form length (0=no pag)
PTMarg: DB 0 ;top margin skip
DotPO: DB 0 ;left margin skip
-PInit: DB 19, 18H,ESC,'!',1 ;printer init, 19 bytes
- DB ESC,'x0',ESC,'r0',ESC,'%0',ESC,'l',8,ESC,'Q`'
- ORG 01E8H ;printer uninit, 7 bytes
-PUInit: DB 6, ESC,'x0',ESC,'!',01H
- ORG 01F0H
-PCodes: DB 2, ESC,'E',0,0,0,0,0 ;^B toggle on
- DB 2, ESC,'F',0,0,0,0,0 ;...and off
- DB 3, ESC,'S0',0,0,0,0 ;^T [^D] toggle on
- DB 2, ESC,'T',0,0,0,0,0 ;...and off
- DB 3, ESC,'-1',0,0,0,0 ;^S toggle on
- DB 3, ESC,'-0',0,0,0,0 ;...and off
- DB 2, ESC,'4',0,0,0,0,0 ;^Y toggle on
- DB 2, ESC,'5',0,0,0,0,0 ;...and off
-UCodes: DB 1, 0FH,0,0,0,0,0,0 ;sw 1 (^Q)
- DB 3, ESC,'w1',0,0,0,0 ;sw 2 (^W)
- DB 3, ESC,'W1',0,0,0,0 ;sw 3 (^E)
- DB 6, ESC,'w0',ESC,'!',1,0 ;sw 4 (^R)
+PInit: DB 0,0,0,0,0 ;printer init, 19 bytes
+ DB 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0
+ ORG 01E8H-0100H ;printer uninit, 7 bytes
+PUInit: DB 0, 0,0,0,0,0,0
+ ORG 01F0H-0100H
+PCodes: DB 0, 0,0,0,0,0,0,0 ;^B toggle on
+ DB 0, 0,0,0,0,0,0,0 ;...and off
+ DB 0, 0,0,0,0,0,0,0 ;^T [^D] toggle on
+ DB 0, 0,0,0,0,0,0,0 ;...and off
+ DB 0, 0,0,0,0,0,0,0 ;^S toggle on
+ DB 0, 0,0,0,0,0,0,0 ;...and off
+ DB 0, 0,0,0,0,0,0,0 ;^Y toggle on
+ DB 0, 0,0,0,0,0,0,0 ;...and off
+UCodes: DB 0, 0,0,0,0,0,0,0 ;sw 1 (^Q)
+ DB 0, 0,0,0,0,0,0,0 ;sw 2 (^W)
+ DB 0, 0,0,0,0,0,0,0 ;sw 3 (^E)
+ DB 0, 0,0,0,0,0,0,0 ;sw 4 (^R)
;
- ORG 0250H
+ ORG 0250H-0100H
UsrPat: ;0250-027FH - User Patch Area
;(Can extend back into UCodes section if fewer switches used)
;
- ORG 0280H ;0280-047FH - Macro keys
+ ORG 0280H-0100H ;0280-047FH - Macro keys
UPatL EQU $-UsrPat
Keys: DS 2 ;free count (VDE does this)
-K0: DB K1-K0-1, 8EH,90H,13H,0FH,06H ;key 0: horiz. bar
- DB 05H,16H,10H,13H,16H,CR
-K1: DB K2-K1-1, 8EH,90H,02H,'Eric Meyer' ;1: personal address
- DB 10H,02H,0FH,03H,ESC,'+9'
-K2: DB K3-K2-1, 8EH,90H,02H,'APTERYX SOFTWARE' ;2: business
- DB 10H,02H,0FH,03H,ESC,'+9'
-K3: DB K4-K3-1, 90H,9AH,ESC,'1',11H,13H,18H ;3: soften para
- DB ESC,'= 2',ESC,'=',CR,'2',13H
- DB 16H,' ',16H,04H,ESC,'!1'
- DB ESC,'2',11H,10H,7FH
-K4: DB K5-K4-1, 8FH,8CH,'7',CR,0FH,12H,'70',CR ;4: quote margins
-K5: DB K6-K5-1, 8FH,8CH,'1',CR,0FH,12H,'78',CR ;5: text margins
-K6: DB 0 ;null keys 6-7
-K7: DB 0
-K8: DB K9-K8-1, 8EH,X+'C','ompuServe [74415,1305]' ;8: phone/CIS
- DB 0FH,06H,05H,'Phone (405)329-5777',CR
-K9: DB KT-K9-1, 8EH,X+'4','01 12th Ave SE, #139' ;9: address/phone
- DB 0FH,03H,0EH,'Norman, OK 73071',0FH,03H
- DB ESC,'+0'
-KT:
;
;
;----- EXECUTION BEGINS HERE -------
;
- ORG 0480H
+ ORG 0480H-0100H
;
Start: SUB A ;check for Z80
RET PE
diff -urN vde267b-src/vdx2.asm vde266-src/vdx2.asm
--- vde267b-src/vdx2.asm 2020-11-27 00:50:00.968974438 +0000
+++ vde266-src/vdx2.asm 2020-11-27 00:23:12.390508796 +0000
@@ -1048,16 +1048,10 @@
CALL YesNo ;..and ask
JR C,RepFC0
JR Z,RepFC1
- LD A,(FBackw) ;NC,NZ = No
- OR A
- JR NZ,RepFCB
LD A,(FndStr)
CALL GoRtA ;skip ahead
OR A
RET
-RepFCB: CALL Left ;(or back)
- OR A
- RET
RepFC0: RET NZ ;C,NZ means Esc: abort
RepFC1: CALL RepChg ;Z (C or NC) means Yes
LD A,(EdErr)
@@ -1370,6 +1364,7 @@
LD A,(Horiz)
LD HL,TabCnt
ADD (HL)
+ DEC A
LD HL,View
CP (HL)
CALL NC,HorScl ;scroll if needed
@@ -2163,14 +2158,12 @@
LD BC,0
Save02: LD HL,(AftCu) ;point at first byte
CALL MSOut ;write it out
- JR NC,Save03
- CALL Error3
- JR Save04
-Save03: XOR A
- LD (Modify),A ;clean slate
-Save04: LD HL,(LastCu)
+ CALL C,Error3
+ LD HL,(LastCu)
DEC HL
- CALL MoveR ;go back
+ CALL MoveR
+ XOR A
+ LD (Modify),A
JP IOoff
;
;
@@ -2181,7 +2174,7 @@
CALL NewNam
LD A,(EdErr) ;check entry error
OR A
- JR NZ,WrXit
+ JR NZ,WrDone
CALL IOon ;say wait
LD HL,(AftCu) ;save position
LD (LastCu),HL
@@ -2201,8 +2194,8 @@
WrDone: LD HL,(LastCu)
DEC HL
CALL MoveR ;go back
- CALL IOoff
-WrXit: CALL GetNam ;restore orig FCB
+ CALL GetNam
+WrXit: CALL IOoff
JP ShoLn1
;
;
@@ -2590,9 +2583,9 @@
POP HL
LD B,A
CC1: INC B ;count char
- LD A,B
- CP 254
- JR Z,CC2 ;too long? return column 255 forever
+ LD A,254
+ CP B
+ JR C,CC2
XOR A
CP C
JR NZ,CCLp ;get hidden space?
@@ -2600,10 +2593,18 @@
CALL LCnt ;compare HL to BefCu
POP BC
JR NC,CCLp ;get another, if more exist
-CC2: INC B
+ INC B
LD A,B ;that is curcol.
RET
;
+CC2: DEC HL
+ LD (HL),CR
+ PUSH HL
+ CALL IncV
+ POP HL
+ LD BC,0FF00H
+ JR CCLp
+;
;
;Do wordwrap if needed
;
@@ -2810,21 +2811,15 @@
RfmNL0: CALL Right
CALL Fetch ;(may be blank)
CP CR
- JR NZ,RfmNL1 ;bald CR next? also give up
- CALL Up
- SCF
- RET
+ JP Z,RfmNLx ;bald CR next? also give up
RfmNL1: CP ' '
- JR Z,RfmNL2
- CALL QuikLf ;no, fine, we're here
+ JR Z,RfmNL0
+ CALL QuikLf
+ OR A
+ RET
+RfmNLx: CALL Right
OR A
RET
-RfmNL2: CALL Right
- CALL Fetch
- CP CR
- JR NZ,RfmNL1 ;just spaces and CR? doublespacing,
- CALL Right ; go on to next line
- JR RfmNL1
RfmPL: CALL QuikLf ;return to previous line of text
RfmPL0: CALL Left
CALL FetchB ;(may be blank)
diff -urN vde267b-src/vdx3.asm vde266-src/vdx3.asm
--- vde267b-src/vdx3.asm 2020-11-27 00:50:00.998974205 +0000
+++ vde266-src/vdx3.asm 2020-11-27 00:23:22.350228851 +0000
@@ -52,12 +52,9 @@
LD (HL),D
POP HL
RET
-BIOSws: LD DE,0 ;<--- Warm boot vector
- LD HL,(0001H)
- INC HL
- LD (HL),E ;restore it
- INC HL
- LD (HL),D
+;
+BIOSws: LD HL,0
+ LD (0001H),HL
LD SP,Stack ;reset stack
CALL RDlog ;and disks
CALL Error3 ;Give I/O message
@@ -138,7 +135,7 @@
ADD E ;*(8+2)+units = user
LD E,A
DEC HL
- CP 32
+ CP 16
JR NC,ZPBAD ;illegal?
ZPAR1: LD A,E
LD (FCBU),A ;set user
@@ -549,8 +546,8 @@
MSOcls: LD DE,FCB ;all done, close up
LD C,FCLO
CALL BDOS
+ OR A
INC A
- OR A ;bug fix 2.67
RET NZ
MSOerr: SCF
RET
diff -urN vde267b-src/vi.asm vde266-src/vi.asm
--- vde267b-src/vi.asm 2020-11-27 00:50:01.018974049 +0000
+++ vde266-src/vi.asm 2020-11-27 01:16:47.519863406 +0000
@@ -43,7 +43,7 @@
KVERSN EQU 5002H ;for key files
PVERSN EQU 6602H ;for prt files
;
- ORG 0100H
+; ORG 0100H
;
START: SUB A ;check for Z80
RET PE
@@ -282,7 +282,7 @@
LD E,L
INC DE
LD (HL),0
- LD BC,(MACKEYS-1)-(USERPAT-100H)
+ LD BC,(MACKEYS-1-USERPAT+100H)
LDIR
CALL ISVDE
LD HL,DEFTRM
@@ -1736,7 +1736,7 @@
COMTYP: DB 'COM'
VDETYP: DB 'VDE' ;<---Changes to VDM or VDK (VDETYP+2)
;
-IFCB: DS 36,0
+IFCB: DS 36
;
;----- DATA -----
;
@@ -1776,10 +1776,10 @@
FormL: DB 58 ;lines per page (0=no pgn)
PTMarg: DB 0 ;top margin
PrLMrg: DB 0 ;left margin
-PInit: DS 20,0 ;Printer init (19 bytes)
-PUInit: DS 8,0 ;Printer deinit (7 bytes)
-PCodes: DS 8*8,0 ;4 toggles on and off
-UCodes: DS 4*8,0 ;4 switches (last 022F)
+PInit: DS 20 ;Printer init (19 bytes)
+PUInit: DS 8 ;Printer deinit (7 bytes)
+PCodes: DS 8*8 ;4 toggles on and off
+UCodes: DS 4*8 ;4 switches (last 022F)
PRTLEN EQU $-NULPRT
;
;
@@ -2125,9 +2125,9 @@
DB 0, 0,0,0,0,0,0 ;CuOn
DW 0F800H ;VidRAM
RET ;VidIN
- DS 15,0
+ DS 15
RET ;VidOUT
- DS 15,0
+ DS 15
;
;OLD KAYPROS WON'T WORK WITH VDM; BANK SWITCHING AFFECTS 0000-3FFF!
IF 0
@@ -2141,16 +2141,16 @@
DB 0, 0,0,0,0,0,0 ;CuOn
DW 03000H ;VidRAM
PUSH AF ;VidIN
- IN A,1CH
+ IN A,(1CH)
OR 80H
- OUT 1CH,A
+ OUT (1CH),A
POP AF
RET
DS 7,0
PUSH AF ;VidOUT
- IN A,1CH
+ IN A,(1CH)
AND 7FH
- OUT 1CH,A
+ OUT (1CH),A
POP AF
RET
DS 7,0
@@ -2166,9 +2166,9 @@
DB 0, 0,0,0,0,0,0 ;CuOn
DW 0F000H ;VidRAM
RET ;VidIN
- DS 15,0
+ DS 15
RET ;VidOUT
- DS 15,0
+ DS 15
;
OSB2: DB 'Osborne Exec ' ;terminal ID
DB 80,48,24 ;View,Extra,Lines
@@ -2180,19 +2180,19 @@
DB 3, ESC,'.2',0,0,0 ;CuOn
DW 0C000H ;VidRAM
PUSH AF ;VidIN
- IN A,0
+ IN A,(0)
SET 6,A
- OUT 0,A
+ OUT (0),A
POP AF
RET
- DS 7,0
+ DS 7
PUSH AF ;VidOUT
- IN A,0
+ IN A,(0)
RES 6,A
- OUT 0,A
+ OUT (0),A
POP AF
RET
- DS 7,0
+ DS 7
;
DB 'TRS80-Holmes CPM' ;terminal ID
DB 80,0,24 ;View,Extra,Lines
@@ -2204,19 +2204,19 @@
DB 1, 04H,0,0,0,0,0 ;CuOn
DW 0F800H ;VidRAM
PUSH AF ;VidIN
- IN A,3FH
+ IN A,(3FH)
AND 7BH ;bits 2,7 OFF
- OUT 3FH,A
+ OUT (3FH),A
POP AF
RET
- DS 7,0
+ DS 7
PUSH AF ;VidOUT
- IN A,3FH
+ IN A,(3FH)
OR 04H ;bit 2 ON
- OUT 3FH,A
+ OUT (3FH),A
POP AF
RET
- DS 7,0
+ DS 7
;
DB 'TRS80-Mont.Micro' ;terminal ID
DB 80,0,24 ;View,Extra,Lines
@@ -2229,16 +2229,16 @@
DW 0F800H ;VidRAM
PUSH AF ;VidIN
LD A,8EH
- OUT 84H,A
+ OUT (84H),A
POP AF
RET
- DS 9,0
+ DS 9
PUSH AF ;VidOUT
LD A,8FH
- OUT 84H,A
+ OUT (84H),A
POP AF
RET
- DS 9,0
+ DS 9
;
DB 'TRS-80 mod 2 P&T' ;terminal ID
DB 80,0,24 ;View,Extra,Lines
@@ -2260,7 +2260,7 @@
POP BC
POP AF
RET
- DS 2,0
+ DS 2
PUSH AF ;VidOUT
PUSH BC
PUSH DE
@@ -2272,7 +2272,7 @@
POP BC
POP AF
RET
- DS 2,0
+ DS 2
;
VDMEND EQU $
;
==================== vde-2.67b-to-2.66.diff ====================

-Rus.

Martin

unread,
Nov 26, 2020, 11:59:06 PM11/26/20
to
Am 11/27/2020 03:28 AM, Russell Marks schrieb:
> I either hadn't realised or had forgotten that VDE has source
> available, e.g. on the Walnut Creek CP/M CD as here:
>
> http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/enterprs/cpm/utils/s/vde267sc.lbr
>
> But that source doesn't match the last pre-ZDE CP/M binary version,
> 2.66. So I thought, that's only about 0.01 versions different, surely
> I could reconstruct source files which build 2.66. I mean, how hard
> could it be?


Nice work, thank you!


There is a great "Site devoted to the VDE editor":
<https://sites.google.com/site/vdeeditor/>

It has a huge collection of everything "VDE"
<https://sites.google.com/site/vdeeditor/Home/vde-files>

IMHO, the "VDE_CPM.ZIP" there is the last pre-ZDE version:
VDE 2.67a.

The differences to 2.67b are small.
Anyway, here are my findings done a few years ago:

Note: The diff goes from 2.67a to 2.67b,
to go back from 2.67b, you need to use "-R".

==== 8< ====
--- ./vdx1.asm
+++ ./vdx1.asm
@@ -44,9 +44,9 @@
VersID: ;0113H: version message (28 chars, used in menu)
IF VDM
; [----5----10---15---20---25--]
- DB ' VDE-M 2.67a(c)1988 E.Meyer ',0
+ DB ' VDE-M 2.67b(c)1988 E.Meyer ',0
ELSE
- DB ' VDE 2.67a (c)1988 E.Meyer ',0
+ DB ' VDE 2.67b (c)1988 E.Meyer ',0
ENDIF
;
;
@@ -186,9 +186,9 @@
K6: DB 0 ;null keys 6-7
K7: DB 0
K8: DB K9-K8-1, 8EH,X+'C','ompuServe [74415,1305]' ;8: phone/CIS
- DB 0FH,06H,05H,'Phone (812)332-5018',CR
-K9: DB KT-K9-1, 8EH,X+'4','27 N. Washington #4' ;9: address/phone
- DB 0FH,03H,0EH,'Bloomington, IN 47401',0FH,03H
+ DB 0FH,06H,05H,'Phone (405)329-5777',CR
+K9: DB KT-K9-1, 8EH,X+'4','01 12th Ave SE, #139' ;9: address/phone
+ DB 0FH,03H,0EH,'Norman, OK 73071',0FH,03H
DB ESC,'+0'
KT:
;
--- ./vdx2.asm
+++ ./vdx2.asm
@@ -1048,10 +1048,16 @@
CALL YesNo ;..and ask
JR C,RepFC0
JR Z,RepFC1
+ LD A,(FBackw) ;NC,NZ = No
+ OR A
+ JR NZ,RepFCB
LD A,(FndStr)
CALL GoRtA ;skip ahead
OR A
RET
+RepFCB: CALL Left ;(or back)
+ OR A
+ RET
RepFC0: RET NZ ;C,NZ means Esc: abort
RepFC1: CALL RepChg ;Z (C or NC) means Yes
LD A,(EdErr)
@@ -2175,7 +2181,7 @@
CALL NewNam
LD A,(EdErr) ;check entry error
OR A
- JR NZ,WrDone
+ JR NZ,WrXit
CALL IOon ;say wait
LD HL,(AftCu) ;save position
LD (LastCu),HL
@@ -2195,8 +2201,8 @@
WrDone: LD HL,(LastCu)
DEC HL
CALL MoveR ;go back
- CALL GetNam ;restore orig FCB
CALL IOoff
+WrXit: CALL GetNam ;restore orig FCB
JP ShoLn1
;
;
--- ./vdx3.asm
+++ ./vdx3.asm
@@ -138,7 +138,7 @@
ADD A,E ;*(8+2)+units = user
LD E,A
DEC HL
- CP 16
+ CP 32
JR NC,ZPBAD ;illegal?
ZPAR1: LD A,E
LD (FCBU),A ;set user
@@ -550,6 +550,7 @@
LD C,FCLO
CALL BDOS
INC A
+ OR A ;bug fix 2.67
RET NZ
MSOerr: SCF
RET
==== 8< ====


Martin

Lawrence Nelson

unread,
Nov 27, 2020, 12:45:08 AM11/27/20
to
ZDE was derived from the last version of VDE. I use ZDE quite a bit but there are some minor problems. I have yet to locate any source code for ZDE. Has any one run across such a beast?
Lars

Russell Marks

unread,
Nov 27, 2020, 7:26:59 AM11/27/20
to
Martin <this.is...@so.its.invalid> wrote:

> Am 11/27/2020 03:28 AM, Russell Marks schrieb:
>> I either hadn't realised or had forgotten that VDE has source
>> available, e.g. on the Walnut Creek CP/M CD as here:
>>
>> http://www.classiccmp.org/cpmarchives/cpm/Software/WalnutCD/enterprs/cpm/utils/s/vde267sc.lbr
>>
>> But that source doesn't match the last pre-ZDE CP/M binary version,
>> 2.66. So I thought, that's only about 0.01 versions different, surely
>> I could reconstruct source files which build 2.66. I mean, how hard
>> could it be?
>
>
> Nice work, thank you!
>
>
> There is a great "Site devoted to the VDE editor":
> <https://sites.google.com/site/vdeeditor/>
>
> It has a huge collection of everything "VDE"
> <https://sites.google.com/site/vdeeditor/Home/vde-files>
>
> IMHO, the "VDE_CPM.ZIP" there is the last pre-ZDE version:
> VDE 2.67a.

Ah, I did notice the site but missed that there was a different VDE
release there. Still, 2.66 does seem to have been Eric Meyer's last
CP/M release I think, with anything after that actually having been
released by Carson Wilson it sounds like? So I suppose there was some
limited value to doing it still.

-Rus.

Wayne Hortensius

unread,
Nov 27, 2020, 12:56:22 PM11/27/20
to
On Thu, 26 Nov 2020 21:45:07 -0800 (PST)
Lawrence Nelson <larsn...@adelphia.net> wrote:

> ZDE was derived from the last version of VDE. I use ZDE quite a bit
> but there are some minor problems. I have yet to locate any source
> code for ZDE. Has any one run across such a beast? Lars

Using the source for VDE 2.67 as a basis, I've been able to approximate
source code for ZDE 1.6. <https://github.com/mecparts/zde> As a back of
the envelope guess, the code was ~90% identical. Assembling it gives a
byte for byte copy of zde16.com. I don't think I've mistaken any fixed
addresses for other things, as I've been able to fix the "timestamps on
files > 1 extent under ZSDOS" bug without breaking things.

Regards,
Wayne

Martin

unread,
Nov 27, 2020, 8:19:31 PM11/27/20
to
Yes, it's more interesting to have the source of the last official CP/M release.

According to Eric Meyer talking about the CP/M source in the "VDE Editor list"
<https://groups.google.com/forum/?_escaped_fragment_=topic/vde_editor/MEViPGhTNUI>
the source in "vde267sc.lbr" very likely comes from him:

[An interesting trip down memory lane. This does look like my own Z80 source
code, and from the header I would guess that I produced "2.67b" as a beta
version for my own use in the months after the 2.66 release (as I often
do/did). This is probably what I passed on to Carson as the basis for ZDE,
and has somehow found its way onto the site you located. Any changes from
2.66 would be quite minor. (I see only one comment "bug fix 2.67", though the
"b" would suggest at least two.)]


Martin

Russell Marks

unread,
Nov 28, 2020, 5:31:45 AM11/28/20
to
Martin <this.is...@so.its.invalid> wrote:

> Am 11/27/2020 01:26 PM, Russell Marks schrieb:
>> Martin <this.is...@so.its.invalid> wrote:
[...]
>>> IMHO, the "VDE_CPM.ZIP" there is the last pre-ZDE version:
>>> VDE 2.67a.
>>
>> Ah, I did notice the site but missed that there was a different VDE
>> release there. Still, 2.66 does seem to have been Eric Meyer's last
>> CP/M release I think, with anything after that actually having been
>> released by Carson Wilson it sounds like? So I suppose there was some
>> limited value to doing it still.
[...]
> Yes, it's more interesting to have the source of the last official CP/M release.
>
> According to Eric Meyer talking about the CP/M source in the "VDE Editor list"
> <https://groups.google.com/forum/?_escaped_fragment_=topic/vde_editor/MEViPGhTNUI>
> the source in "vde267sc.lbr" very likely comes from him:
>
> [An interesting trip down memory lane. This does look like my own Z80 source
> code, and from the header I would guess that I produced "2.67b" as a beta
> version for my own use in the months after the 2.66 release (as I often
> do/did). This is probably what I passed on to Carson as the basis for ZDE,
> and has somehow found its way onto the site you located. Any changes from
> 2.66 would be quite minor. (I see only one comment "bug fix 2.67", though the
> "b" would suggest at least two.)]

So, he seems to be assuming that he made the changes, but it also
sounds like he doesn't think he released a 2.67b personally. That
seems compatible with what I said above; we might not know *for sure*
who ultimately released it, but there's a very obvious implication.

-Rus.
0 new messages