Browse Source

ZXCC Sync

- Attempting to sync ZXCC with latest source in repository by Tony Nicholson.  Generally a failure, but it is closer.
pull/283/head
Wayne Warthen 4 years ago
parent
commit
8c9ce2184e
  1. 12
      Source/Apps/Build.cmd
  2. 6
      Source/Apps/Test/Build.cmd
  3. 20
      Source/Apps/XM/Build.cmd
  4. 6
      Source/Apps/XM/Makefile
  5. 38
      Source/Apps/ZMD/Build.cmd
  6. 4
      Source/Apps/ZMD/Makefile
  7. 10
      Source/Apps/ZMP/Build.cmd
  8. 2
      Source/Apps/ZMP/Makefile
  9. 14
      Source/BPBIOS/Build.cmd
  10. 2
      Source/BPBIOS/Makefile
  11. 8
      Source/BPBIOS/ZCPR33/Build.cmd
  12. 4
      Source/BPBIOS/ZCPR33/Makefile
  13. 6
      Source/CBIOS/Build.cmd
  14. 30
      Source/CPM22/Build.cmd
  15. 80
      Source/CPM3/Build.cmd
  16. 16
      Source/CPM3/Makefile
  17. 10
      Source/Forth/Build.cmd
  18. 6
      Source/HBIOS/Build.cmd
  19. 4
      Source/HDIAG/Build.cmd
  20. 6
      Source/RomDsk/Build.cmd
  21. 10
      Source/ZCPR-DJ/Build.cmd
  22. 2
      Source/ZCPR-DJ/Makefile
  23. 14
      Source/ZCPR/Build.cmd
  24. 4
      Source/ZCPR/Makefile
  25. 22
      Source/ZPM3/Build.cmd
  26. 4
      Source/ZPM3/Makefile
  27. 10
      Source/ZSDOS/Build.cmd
  28. 8
      Source/ZSDOS/Clock/Build.cmd
  29. 4
      Source/ZSDOS/Makefile
  30. 5
      Tools/Makefile.inc
  31. 0
      Tools/cpm/bin80/ARCV.COM
  32. 0
      Tools/cpm/bin80/AS.COM
  33. 0
      Tools/cpm/bin80/BASCOM.COM
  34. 0
      Tools/cpm/bin80/CC.COM
  35. 0
      Tools/cpm/bin80/CNM.COM
  36. 0
      Tools/cpm/bin80/CRC.COM
  37. 0
      Tools/cpm/bin80/CREF80.COM
  38. 0
      Tools/cpm/bin80/CZ.COM
  39. 0
      Tools/cpm/bin80/DIRX.COM
  40. 0
      Tools/cpm/bin80/DISKINFO.COM
  41. 0
      Tools/cpm/bin80/GENCPM.COM
  42. 0
      Tools/cpm/bin80/HEX80.COM
  43. 0
      Tools/cpm/bin80/HEXCOM.COM
  44. 0
      Tools/cpm/bin80/L80.COM
  45. 0
      Tools/cpm/bin80/LBREXT.COM
  46. 0
      Tools/cpm/bin80/LIB.COM
  47. 0
      Tools/cpm/bin80/LIB80.COM
  48. 0
      Tools/cpm/bin80/LIBUTIL.COM
  49. 0
      Tools/cpm/bin80/LINK.COM
  50. 0
      Tools/cpm/bin80/LN.COM
  51. 0
      Tools/cpm/bin80/M80.COM
  52. 0
      Tools/cpm/bin80/MAC.COM
  53. 0
      Tools/cpm/bin80/MLOAD25.COM
  54. 0
      Tools/cpm/bin80/NULU.COM
  55. 0
      Tools/cpm/bin80/RMAC.COM
  56. 0
      Tools/cpm/bin80/SIDSYM.COM
  57. 0
      Tools/cpm/bin80/SLR180.COM
  58. 0
      Tools/cpm/bin80/SLRMAC.COM
  59. 0
      Tools/cpm/bin80/SLRNK.COM
  60. 0
      Tools/cpm/bin80/SQZ.COM
  61. 0
      Tools/cpm/bin80/TEX21.COM
  62. 0
      Tools/cpm/bin80/TEX21A.COM
  63. 0
      Tools/cpm/bin80/TEX21B.COM
  64. 0
      Tools/cpm/bin80/UCRLZH.COM
  65. 0
      Tools/cpm/bin80/UNARC.COM
  66. 0
      Tools/cpm/bin80/UNCR.COM
  67. 0
      Tools/cpm/bin80/UNZIP.COM
  68. 0
      Tools/cpm/bin80/UNZIP154.COM
  69. 0
      Tools/cpm/bin80/UNZIP186.COM
  70. 0
      Tools/cpm/bin80/USQ.COM
  71. 0
      Tools/cpm/bin80/Z80ASM.COM
  72. 0
      Tools/cpm/bin80/ZMAC.COM
  73. 0
      Tools/cpm/bin80/ZML.COM
  74. 0
      Tools/cpm/bin80/ZMLIB.COM
  75. 0
      Tools/cpm/bin80/ZSM.COM
  76. 0
      Tools/cpm/include80/CTYPE.H
  77. 0
      Tools/cpm/include80/ERRNO.H
  78. 0
      Tools/cpm/include80/FCNTL.H
  79. 0
      Tools/cpm/include80/IO.H
  80. 0
      Tools/cpm/include80/LIBC.H
  81. 0
      Tools/cpm/include80/MATH.H
  82. 0
      Tools/cpm/include80/SETJMP.H
  83. 0
      Tools/cpm/include80/SGTTY.H
  84. 0
      Tools/cpm/include80/STDIO.H
  85. 0
      Tools/cpm/lib80/C.LIB
  86. 0
      Tools/cpm/lib80/M.LIB
  87. 0
      Tools/cpm/lib80/ROM.LIB
  88. 0
      Tools/cpm/lib80/T.LIB
  89. 2
      Tools/unix/Makefile
  90. 37
      Tools/unix/zx/Makefile
  91. 16
      Tools/unix/zx/config.h.darwin
  92. 17
      Tools/unix/zx/config.h.linux
  93. 9
      Tools/unix/zx/config.h.windows
  94. 126
      Tools/unix/zx/cpmparse.c
  95. 72
      Tools/unix/zx/readme.txt
  96. 191
      Tools/unix/zx/xlt.c
  97. 132
      Tools/unix/zx/zx.html
  98. 21
      Tools/unix/zxcc/Build-OW.cmd
  99. 25
      Tools/unix/zxcc/Build-VC.cmd
  100. 0
      Tools/unix/zxcc/COPYING

12
Source/Apps/Build.cmd

@ -4,13 +4,11 @@ setlocal
set TOOLS=../../Tools
set APPBIN=..\..\Binary\Apps
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
call :asm syscopy || exit /b
call :asm assign || exit /b
@ -21,10 +19,10 @@ call :asm rtc || exit /b
call :asm timer || exit /b
call :asm rtchb || exit /b
zx Z80ASM -SYSGEN/F || exit /b
zxcc Z80ASM -SYSGEN/F || exit /b
zx MAC SURVEY.ASM -$PO || exit /b
zx MLOAD25 -SURVEY.COM=SURVEY.HEX || exit /b
zxcc MAC SURVEY.ASM -$PO || exit /b
zxcc MLOAD25 -SURVEY.COM=SURVEY.HEX || exit /b
pushd XM && call Build || exit /b & popd
pushd FDU && call Build || exit /b & popd

6
Source/Apps/Test/Build.cmd

@ -4,13 +4,11 @@ setlocal
set TOOLS=../../../Tools
set APPBIN=..\..\Binary\Apps
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
pushd DMAmon && call Build || exit /b & popd
pushd tstdskng && call Build || exit /b & popd

20
Source/Apps/XM/Build.cmd

@ -3,22 +3,20 @@ setlocal
set TOOLS=..\..\..\Tools
set PATH=%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\zxcc;%PATH%
set ZXBINDIR=%TOOLS%\cpm\bin\
set ZXLIBDIR=%TOOLS%\cpm\lib\
set ZXINCDIR=%TOOLS%\cpm\include\
set CPMDIR80=%TOOLS%/cpm/
zx mac xmdm125.asm $PO || exit /b
zxcc mac xmdm125.asm $PO || exit /b
zx slr180 -xmhb/HF || exit /b
zx mload25 XM=xmdm125,xmhb || exit /b
zxcc slr180 -xmhb/HF || exit /b
zxcc mload25 XM=xmdm125,xmhb || exit /b
rem zx slr180 -xmuf/HF || exit /b
rem zx mload25 XMUF=xmdm125,xmuf || exit /b
rem zxcc slr180 -xmuf/HF || exit /b
rem zxcc mload25 XMUF=xmdm125,xmuf || exit /b
zx slr180 -xmhb_old/HF || exit /b
zx mload25 XMOLD=xmdm125,xmhb_old || exit /b
zxcc slr180 -xmhb_old/HF || exit /b
zxcc mload25 XMOLD=xmdm125,xmhb_old || exit /b
rem set PROMPT=[Build] %PROMPT%
rem %comspec%

6
Source/Apps/XM/Makefile

@ -7,10 +7,10 @@ OTHERS = *.hex
include $(TOOLS)/Makefile.inc
xm.com: xmdm125.hex xmhb.hex
$(ZXCC) $(CPM)/MLOAD25 XM=xmdm125,xmhb
$(ZXCC) MLOAD25 XM=xmdm125,xmhb
xmuf.com: xmdm125.hex xmuf.hex
$(ZXCC) $(CPM)/MLOAD25 XMUF=xmdm125,xmuf
$(ZXCC) MLOAD25 XMUF=xmdm125,xmuf
xmold.com: xmdm125.hex xmhb_old.hex
$(ZXCC) $(CPM)/MLOAD25 XMOLD=xmdm125,xmhb_old
$(ZXCC) MLOAD25 XMOLD=xmdm125,xmhb_old

38
Source/Apps/ZMD/Build.cmd

@ -3,35 +3,33 @@ setlocal
set TOOLS=..\..\..\Tools
set PATH=%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\zxcc;%PATH%
set ZXBINDIR=%TOOLS%\cpm\bin\
set ZXLIBDIR=%TOOLS%\cpm\lib\
set ZXINCDIR=%TOOLS%\cpm\include\
set CPMDIR80=%TOOLS%/cpm/
zx z80asm -zmd/fm
zx l80 -zmd,zmd/n/e
zxcc z80asm -zmd/fm
zxcc l80 -zmd,zmd/n/e
zx z80asm -zmap/fm
zx l80 -zmap,zmap/n/e
zxcc z80asm -zmap/fm
zxcc l80 -zmap,zmap/n/e
zx z80asm -znews/fm
zx l80 -znews,znews/n/e
zxcc z80asm -znews/fm
zxcc l80 -znews,znews/n/e
zx z80asm -znewp/fm
zx l80 -znewp,znewp/n/e
zxcc z80asm -znewp/fm
zxcc l80 -znewp,znewp/n/e
zx z80asm -zfors/fm
zx l80 -zfors,zfors/n/e
zxcc z80asm -zfors/fm
zxcc l80 -zfors,zfors/n/e
zx z80asm -zforp/fm
zx l80 -zforp,zforp/n/e
zxcc z80asm -zforp/fm
zxcc l80 -zforp,zforp/n/e
zx z80asm -zmdel/fm
zx l80 -zmdel,zmdel/n/e
zxcc z80asm -zmdel/fm
zxcc l80 -zmdel,zmdel/n/e
zx z80asm -zmdhb/fh
zx mload25 -zmd=zmd.com,zmdhb
zxcc z80asm -zmdhb/fh
zxcc mload25 -zmd=zmd.com,zmdhb
copy /Y zmd.com ..\..\..\Binary\Apps\ || exit /b

4
Source/Apps/ZMD/Makefile

@ -6,5 +6,5 @@ OTHERS = *.hex zmd.rel
include $(TOOLS)/Makefile.inc
zmd.com: zmd.rel zmdhb.hex
$(ZXCC) $(CPM)/L80 -zmd,zmd/n/e
$(ZXCC) $(CPM)/MLOAD25 -zmd=zmd.com,zmdhb
$(ZXCC) L80 -zmd,zmd/n/e
$(ZXCC) MLOAD25 -zmd=zmd.com,zmdhb

10
Source/Apps/ZMP/Build.cmd

@ -3,14 +3,12 @@ setlocal
set TOOLS=..\..\..\Tools
set PATH=%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\zxcc;%PATH%
set ZXBINDIR=%TOOLS%\cpm\bin\
set ZXLIBDIR=%TOOLS%\cpm\lib\
set ZXINCDIR=%TOOLS%\cpm\include\
set CPMDIR80=%TOOLS%/cpm/
zx Z80ASM -ZMO-RW01/H || exit /b
zx MLOAD25 -ZMP.COM=ZMPX.COM,ZMO-RW01 || exit /b
zxcc Z80ASM -ZMO-RW01/H || exit /b
zxcc MLOAD25 -ZMP.COM=ZMPX.COM,ZMO-RW01 || exit /b
copy /Y zmp.com ..\..\..\Binary\Apps\ || exit /b
copy /Y *.ovr ..\..\..\Binary\Apps\ || exit /b

2
Source/Apps/ZMP/Makefile

@ -7,4 +7,4 @@ NODELETE = *.ovr zmp.doc *.hlp
include $(TOOLS)/Makefile.inc
zmp.com: zmo-rw01.hex
$(ZXCC) $(CPM)/MLOAD25 -ZMP.COM=ZMPX.COM,ZMO-RW01
$(ZXCC) MLOAD25 -ZMP.COM=ZMPX.COM,ZMO-RW01

14
Source/BPBIOS/Build.cmd

@ -3,11 +3,9 @@ setlocal
pushd ZCPR33 && call Build || exit /b & popd
set PATH=%PATH%;..\..\Tools\zx;..\..\Tools\cpmtools;
set PATH=%PATH%;..\..\Tools\zxcc;..\..\Tools\cpmtools;
set ZXBINDIR=../../tools/cpm/bin/
set ZXLIBDIR=../../tools/cpm/lib/
set ZXINCDIR=../../tools/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
call :makebp 33
call :makebp 33bnk
@ -45,7 +43,7 @@ echo.
copy def-ww-z%VER%.lib def-ww.lib || exit /b
rem if exist bpbio-ww.rel del bpbio-ww.rel || exit /b
zx ZMAC -BPBIO-WW -/P || exit /b
zxcc ZMAC -BPBIO-WW -/P || exit /b
if exist bp%VER%.prn del bp%VER%.prn || exit /b
ren bpbio-ww.prn bp%VER%.prn || exit /b
if exist bp%VER%.err del bp%VER%.err || exit /b
@ -56,18 +54,18 @@ rem pause
rem BPBUILD attempts to rename bpsys.img -> bpsys.bak
rem while is is still open. Real CP/M does not care,
rem but zx fails due to host OS. Below, a temp file
rem but zxcc fails due to host OS. Below, a temp file
rem is used to avoid the problematic rename.
if exist bpsys.img del bpsys.img || exit /b
if exist bpsys.tmp del bpsys.tmp || exit /b
copy bp%VER%.dat bpsys.tmp || exit /b
rem bpsys.tmp -> bpsys.img
zx bpbuild -bpsys.tmp <bpbld1.rsp || exit /b
zxcc bpbuild -bpsys.tmp <bpbld1.rsp || exit /b
if exist bpsys.tmp del bpsys.tmp || exit /b
copy bpsys.img bpsys.tmp || exit /b
rem bpsys.tmp -> bpsys.img
zx bpbuild -bpsys.tmp <bpbld2.rsp || exit /b
zxcc bpbuild -bpsys.tmp <bpbld2.rsp || exit /b
if exist bp%VER%.img del bp%VER%.img || exit /b
if exist bpsys.img ren bpsys.img bp%VER%.img || exit /b

2
Source/BPBIOS/Makefile

@ -37,7 +37,7 @@ clobber::
$(eval VER := $(subst .img,,$(subst bp,,$@)))
cp def-ww-z$(VER).lib def-ww.lib
rm -f bpbio-ww.rel
$(ZXCC) $(CPM)/ZMAC -BPBIO-WW -/P
$(ZXCC) ZMAC -BPBIO-WW -/P
mv bpbio-ww.prn bp$(VER).prn
cp bp$(VER).dat bpsys.dat
$(ZXCC) ./bpbuild.com -bpsys.dat 0 < bpbld1.rsp

8
Source/BPBIOS/ZCPR33/Build.cmd

@ -1,13 +1,11 @@
@echo off
setlocal
set PATH=%PATH%;..\..\..\Tools\zx;..\..\..\Tools\cpmtools;
set PATH=%PATH%;..\..\..\Tools\zxcc;..\..\..\Tools\cpmtools;
set ZXBINDIR=../../../tools/cpm/bin/
set ZXLIBDIR=../../../tools/cpm/lib/
set ZXINCDIR=../../../tools/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
copy ..\z3base.lib . || exit /b
zx ZMAC -zcpr33.z80 -/P || exit /b
zxcc ZMAC -zcpr33.z80 -/P || exit /b
del z3base.lib || exit /b
move zcpr33.rel .. || exit /b

4
Source/BPBIOS/ZCPR33/Makefile

@ -9,10 +9,10 @@ DIFFPATH = $(DIFFTO)/Source/BPBIOS
zcpr33t.rel: ../z3baset.lib
cp ../z3baset.lib z3baset.lib
$(ZXCC) $(CPM)/ZMAC -zcpr33t.z80 -/P
$(ZXCC) ZMAC -zcpr33t.z80 -/P
rm z3baset.lib
zcpr33n.rel: ../z3basen.lib
cp ../z3basen.lib z3basen.lib
$(ZXCC) $(CPM)/ZMAC -zcpr33n.z80 -/P
$(ZXCC) ZMAC -zcpr33n.z80 -/P
rm z3basen.lib

6
Source/CBIOS/Build.cmd

@ -3,13 +3,11 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
echo.
echo Building CBIOS for RomWBW...

30
Source/CPM22/Build.cmd

@ -3,34 +3,32 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
call :asm ccpb03 || goto :eof
call :asm bdosb01 || goto :eof
zx MAC -CCP.ASM -$PO || exit /b
zx MLOAD25 -CCP.BIN=CCP.HEX || exit /b
zxcc MAC -CCP.ASM -$PO || exit /b
zxcc MLOAD25 -CCP.BIN=CCP.HEX || exit /b
zx MAC -BDOS.ASM -$PO || exit /b
zx MLOAD25 -BDOS.BIN=BDOS.HEX || exit /b
zxcc MAC -BDOS.ASM -$PO || exit /b
zxcc MLOAD25 -BDOS.BIN=BDOS.HEX || exit /b
zx MAC -CCP22.ASM -$PO || exit /b
zx MLOAD25 -CCP22.BIN=CCP22.HEX || exit /b
zxcc MAC -CCP22.ASM -$PO || exit /b
zxcc MLOAD25 -CCP22.BIN=CCP22.HEX || exit /b
zx MAC -BDOS22.ASM -$PO || exit /b
zx MLOAD25 -BDOS22.BIN=BDOS22.HEX || exit /b
zxcc MAC -BDOS22.ASM -$PO || exit /b
zxcc MLOAD25 -BDOS22.BIN=BDOS22.HEX || exit /b
zx MAC -OS2CCP.ASM -$PO || exit /b
zx MLOAD25 -OS2CCP.BIN=OS2CCP.HEX || exit /b
zxcc MAC -OS2CCP.ASM -$PO || exit /b
zxcc MLOAD25 -OS2CCP.BIN=OS2CCP.HEX || exit /b
zx MAC -OS3BDOS.ASM -$PO || exit /b
zx MLOAD25 -OS3BDOS.BIN=OS3BDOS.HEX || exit /b
zxcc MAC -OS3BDOS.ASM -$PO || exit /b
zxcc MLOAD25 -OS3BDOS.BIN=OS3BDOS.HEX || exit /b
tasm -t80 -g3 -fFF loader.asm loader.bin loader.lst || exit /b

80
Source/CPM3/Build.cmd

@ -3,32 +3,30 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%TOOLS%\cpmtools;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%TOOLS%\cpmtools;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
rem set ZXINCDIR=%TOOLS%/cpm/include/
set ZXINCDIR=../
set CPMDIR80=%TOOLS%/cpm/
set INCDIR80=../
echo.
echo.
echo *** CPM Loader ***
echo.
zx RMAC -CPMLDR || exit /b
zx Z80ASM -UTIL/MF || exit /b
zxcc RMAC -CPMLDR || exit /b
zxcc Z80ASM -UTIL/MF || exit /b
copy optdsk.lib ldropts.lib || exit /b
zx Z80ASM -BIOSLDR/MF || exit /b
zxcc Z80ASM -BIOSLDR/MF || exit /b
move /Y biosldr.rel biosldrd.rel || exit /b
move /Y biosldr.lst biosldrd.lst || exit /b
zx LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD,UTIL || exit /b
zxcc LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD,UTIL || exit /b
move /Y cpmldrd.com cpmldr.bin || exit /b
copy optcmd.lib ldropts.lib || exit /b
zx Z80ASM -BIOSLDR/MF || exit /b
zxcc Z80ASM -BIOSLDR/MF || exit /b
move /Y biosldr.rel biosldrc.rel || exit /b
move /Y biosldr.lst biosldrd.lst || exit /b
zx LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC,UTIL || exit /b
zxcc LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC,UTIL || exit /b
move /Y cpmldrc.com cpmldr.com || exit /b
rem pause
@ -38,16 +36,16 @@ echo *** Resident CPM3 BIOS ***
echo.
copy optres.lib options.lib || exit /b
copy genres.dat gencpm.dat || exit /b
zx RMAC -BIOSKRNL || exit /b
zx RMAC -SCB || exit /b
zx Z80ASM -BOOT/MF || exit /b
zx Z80ASM -CHARIO/MF || exit /b
zx Z80ASM -MOVE/MF || exit /b
zx Z80ASM -DRVTBL/MF || exit /b
zx Z80ASM -DISKIO/MF || exit /b
zx Z80ASM -UTIL/MF || exit /b
zx LINK -BIOS3[OS]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL || exit /b
zx GENCPM -AUTO -DISPLAY || exit /b
zxcc RMAC -BIOSKRNL || exit /b
zxcc RMAC -SCB || exit /b
zxcc Z80ASM -BOOT/MF || exit /b
zxcc Z80ASM -CHARIO/MF || exit /b
zxcc Z80ASM -MOVE/MF || exit /b
zxcc Z80ASM -DRVTBL/MF || exit /b
zxcc Z80ASM -DISKIO/MF || exit /b
zxcc Z80ASM -UTIL/MF || exit /b
zxcc LINK -BIOS3[OS]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL || exit /b
zxcc GENCPM -AUTO -DISPLAY || exit /b
copy cpm3.sys cpm3res.sys || exit /b
rem pause
@ -57,16 +55,16 @@ echo *** Banked CPM3 BIOS ***
echo.
copy optbnk.lib options.lib || exit /b
copy genbnk.dat gencpm.dat || exit /b
zx RMAC -BIOSKRNL || exit /b
zx RMAC -SCB || exit /b
zx Z80ASM -BOOT/MF || exit /b
zx Z80ASM -CHARIO/MF || exit /b
zx Z80ASM -MOVE/MF || exit /b
zx Z80ASM -DRVTBL/MF || exit /b
zx Z80ASM -DISKIO/MF || exit /b
zx Z80ASM -UTIL/MF || exit /b
zx LINK -BNKBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL || exit /b
zx GENCPM -AUTO -DISPLAY || exit /b
zxcc RMAC -BIOSKRNL || exit /b
zxcc RMAC -SCB || exit /b
zxcc Z80ASM -BOOT/MF || exit /b
zxcc Z80ASM -CHARIO/MF || exit /b
zxcc Z80ASM -MOVE/MF || exit /b
zxcc Z80ASM -DRVTBL/MF || exit /b
zxcc Z80ASM -DISKIO/MF || exit /b
zxcc Z80ASM -UTIL/MF || exit /b
zxcc LINK -BNKBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL || exit /b
zxcc GENCPM -AUTO -DISPLAY || exit /b
copy cpm3.sys cpm3bnk.sys || exit /b
rem pause
@ -76,16 +74,16 @@ echo *** Banked ZPM3 BIOS ***
echo.
copy optzpm.lib options.lib || exit /b
copy genbnk.dat gencpm.dat || exit /b
zx RMAC -BIOSKRNL || exit /b
zx RMAC -SCB || exit /b
zx Z80ASM -BOOT/MF || exit /b
zx Z80ASM -CHARIO/MF || exit /b
zx Z80ASM -MOVE/MF || exit /b
zx Z80ASM -DRVTBL/MF || exit /b
zx Z80ASM -DISKIO/MF || exit /b
zx Z80ASM -UTIL/MF || exit /b
zx LINK -ZPMBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL || exit /b
rem zx GENCPM -AUTO -DISPLAY || exit /b
zxcc RMAC -BIOSKRNL || exit /b
zxcc RMAC -SCB || exit /b
zxcc Z80ASM -BOOT/MF || exit /b
zxcc Z80ASM -CHARIO/MF || exit /b
zxcc Z80ASM -MOVE/MF || exit /b
zxcc Z80ASM -DRVTBL/MF || exit /b
zxcc Z80ASM -DISKIO/MF || exit /b
zxcc Z80ASM -UTIL/MF || exit /b
zxcc LINK -ZPMBIOS3[B]=BIOSKRNL,SCB,BOOT,CHARIO,MOVE,DRVTBL,DISKIO,UTIL || exit /b
rem zxcc GENCPM -AUTO -DISPLAY || exit /b
rem copy cpm3.sys zpm3.sys || exit /b
rem pause

16
Source/CPM3/Makefile

@ -19,7 +19,7 @@ TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
export ZXINCDIR = ../
export INCDIR80 = ../
BIOSOBJS = bioskrnl.rel scb.rel boot.rel chario.rel
BIOSOBJS += move.rel drvtbl.rel diskio.rel util.rel
@ -61,31 +61,31 @@ zpmbios3:
make OBJECTS=zpmbios3.spr DEST=
cpmldr.bin: biosldrd.rel cpmldr.rel util.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD,UTIL
$(ZXCC) LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD,UTIL
mv cpmldrd.com cpmldr.bin
cpmldr.com: biosldrc.rel cpmldr.rel util.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC,UTIL
$(ZXCC) LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC,UTIL
mv cpmldrc.com cpmldr.com
biosldrc.rel: biosldr.z80 optcmd.lib
cp optcmd.lib ldropts.lib
$(ZXCC) $(TOOLS)/cpm/bin/Z80ASM -BIOSLDR/MF
$(ZXCC) Z80ASM -BIOSLDR/MF
mv biosldr.rel biosldrc.rel
biosldrd.rel: biosldr.z80 optdsk.lib
cp optdsk.lib ldropts.lib
$(ZXCC) $(TOOLS)/cpm/bin/Z80ASM -BIOSLDR/MF
$(ZXCC) Z80ASM -BIOSLDR/MF
mv biosldr.rel biosldrd.rel
bios3.spr: $(BIOSOBJS)
$(ZXCC) $(CPM)/LINK -bios3[OS]=$(BIOSNAMES)
$(ZXCC) LINK -bios3[OS]=$(BIOSNAMES)
bnkbios3.spr: $(BIOSOBJS)
$(ZXCC) $(CPM)/LINK -bnkbios3[B]=$(BIOSNAMES)
$(ZXCC) LINK -bnkbios3[B]=$(BIOSNAMES)
zpmbios3.spr: $(BIOSOBJS)
$(ZXCC) $(TOOLS)/cpm/bin/LINK -zpmbios3[B]=$(BIOSNAMES)
$(ZXCC) LINK -zpmbios3[B]=$(BIOSNAMES)
cpm3.sys: cpm3$(DEFCPM3).sys
cp cpm3$(DEFCPM3).sys cpm3.sys

10
Source/Forth/Build.cmd

@ -3,15 +3,13 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
zx zsm =camel80.azm -/l || exit /b
zx link -CAMEL80.BIN[L200]=CAMEL80 || exit /b
zxcc zsm =camel80.azm -/l || exit /b
zxcc link -CAMEL80.BIN[L200]=CAMEL80 || exit /b

6
Source/HBIOS/Build.cmd

@ -9,13 +9,11 @@ if "%1" == "dist" goto :dist
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
::
:: This PowerShell script validates the build variables passed in. If

4
Source/HDIAG/Build.cmd

@ -8,10 +8,6 @@ set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
tasm -t180 -g3 -fFF -DAPPBOOT hdiag.asm hdiag.com hdiag_com.lst || exit /b
tasm -t180 -g3 -fFF -DROMBOOT hdiag.asm hdiag.rom hdiag_rom.lst || exit /b

6
Source/RomDsk/Build.cmd

@ -3,13 +3,11 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%TOOLS%\srecord;%TOOLS%\cpmtools;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%TOOLS%\srecord;%TOOLS%\cpmtools;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
set RomApps1=assign mode rtc syscopy xm
set RomApps2=fdu format survey sysgen talk timer cpuspd

10
Source/ZCPR-DJ/Build.cmd

@ -3,13 +3,11 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
zx M80 -=zcpr/l || exit /b
zx L80 -zcpr,zcpr.bin/n/e || exit /b
zxcc M80 -=zcpr/l || exit /b
zxcc L80 -zcpr,zcpr.bin/n/e || exit /b

2
Source/ZCPR-DJ/Makefile

@ -7,4 +7,4 @@ TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
zcpr.bin: zcpr.rel
$(ZXCC) $(TOOLS)/cpm/bin/L80 -zcpr,zcpr.bin/n/e
$(ZXCC) L80 -zcpr,zcpr.bin/n/e

14
Source/ZCPR/Build.cmd

@ -3,16 +3,14 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
zx MAC -ZCPR.ASM -$PO || exit /b
zx MLOAD25 -ZCPR.BIN=ZCPR.HEX || exit /b
zxcc MAC -ZCPR.ASM -$PO || exit /b
zxcc MLOAD25 -ZCPR.BIN=ZCPR.HEX || exit /b
zx MAC -BDLOC.ASM -$PO || exit /b
zx MLOAD25 -BDLOC.COM=BDLOC.HEX || exit /b
zxcc MAC -BDLOC.ASM -$PO || exit /b
zxcc MLOAD25 -BDLOC.COM=BDLOC.HEX || exit /b

4
Source/ZCPR/Makefile

@ -7,6 +7,6 @@ TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
zcpr.bin: zcpr.asm
$(ZXCC) $(CPM)/MAC -$< -$$PO
$(ZXCC) $(CPM)/MLOAD25 -$@=zcpr.hex
$(ZXCC) MAC -$< -$$PO
$(ZXCC) MLOAD25 -$@=zcpr.hex

22
Source/ZPM3/Build.cmd

@ -3,13 +3,11 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%TOOLS%\cpmtools;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%TOOLS%\cpmtools;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
copy ..\ZCCP\ccp.com zccp.com || exit /b
copy ..\ZCCP\zinstal.zpm . || exit /b
@ -28,11 +26,11 @@ echo.
echo.
echo *** ZPM Loader ***
echo.
zx LINK -ZPMLDRD[L100]=ZPM3LDR,BIOSLDRD,UTIL || exit /b
:: zx SLRNK -ZPM3LDR,BIOSLDRD,UTIL,ZPMLDRD/N/E
zxcc LINK -ZPMLDRD[L100]=ZPM3LDR,BIOSLDRD,UTIL || exit /b
:: zxcc SLRNK -ZPM3LDR,BIOSLDRD,UTIL,ZPMLDRD/N/E
move /Y zpmldrd.com zpmldr.bin || exit /b
zx LINK -ZPMLDRC[L100]=ZPM3LDR,BIOSLDRC,UTIL || exit /b
:: zx SLRNK -ZPM3LDR,BIOSLDRC,UTIL,ZPMLDRC/N/E
zxcc LINK -ZPMLDRC[L100]=ZPM3LDR,BIOSLDRC,UTIL || exit /b
:: zxcc SLRNK -ZPM3LDR,BIOSLDRC,UTIL,ZPMLDRC/N/E
move /Y zpmldrc.com zpmldr.com || exit /b
rem pause
@ -42,13 +40,13 @@ echo.
echo *** Banked ZPM3 ***
echo.
copy genbnk.dat gencpm.dat || exit /b
zx gencpm -auto -display || exit /b
zxcc gencpm -auto -display || exit /b
rem pause
rem ZPM3 Tools
zx Z80ASM -clrhist/F || exit /b
zx Z80ASM -setz3/F || exit /b
zx Z80ASM -autotog/F || exit /b
zxcc Z80ASM -clrhist/F || exit /b
zxcc Z80ASM -setz3/F || exit /b
zxcc Z80ASM -autotog/F || exit /b
rem Loader

4
Source/ZPM3/Makefile

@ -9,11 +9,11 @@ TOOLS =../../Tools
include $(TOOLS)/Makefile.inc
zpmldr.bin: zpm3ldr.rel biosldrd.rel util.rel
$(ZXCC) $(CPM)/LINK -ZPMLDRD[L100]=ZPM3LDR,BIOSLDRD,UTIL
$(ZXCC) LINK -ZPMLDRD[L100]=ZPM3LDR,BIOSLDRD,UTIL
mv zpmldrd.com zpmldr.bin
zpmldr.com: zpm3ldr.rel biosldrc.rel util.rel
$(ZXCC) $(CPM)/LINK -ZPMLDRC[L100]=ZPM3LDR,BIOSLDRC,UTIL
$(ZXCC) LINK -ZPMLDRC[L100]=ZPM3LDR,BIOSLDRC,UTIL
mv zpmldrc.com zpmldr.com
zpmldr.sys: zpmldr.bin loader.bin

10
Source/ZSDOS/Build.cmd

@ -3,16 +3,14 @@ setlocal
set TOOLS=../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
zx ZMAC -ZSDOS -/P || exit /b
zx LINK -ZSDOS.BIN=ZSDOS[LD800] || exit /b
zxcc ZMAC -ZSDOS -/P || exit /b
zxcc LINK -ZSDOS.BIN=ZSDOS[LD800] || exit /b
tasm -t80 -g3 -fFF loader.asm loader.bin loader.lst || exit /b

8
Source/ZSDOS/Clock/Build.cmd

@ -3,12 +3,10 @@ setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
set CPMDIR80=%TOOLS%/cpm/
zx ZMAC -WBWCLK -/P || exit /b
zxcc ZMAC -WBWCLK -/P || exit /b

4
Source/ZSDOS/Makefile

@ -8,10 +8,10 @@ CCP = ../ZCPR-DJ/zcpr.bin
include $(TOOLS)/Makefile.inc
zsdos.rel: zsdos.z80
$(ZXCC) $(CPM)/ZMAC -$< -/P
$(ZXCC) ZMAC -$< -/P
zsdos.bin: zsdos.rel
$(ZXCC) $(CPM)/LINK -$@=$<[LD800]
$(ZXCC) LINK -$@=$<[LD800]
%.sys: %.bin loader.bin
cat loader.bin $*.bin > $@

5
Tools/Makefile.inc

@ -37,7 +37,8 @@ CASEFN = $(TOOLS)/unix/casefn.sh
#
# compiler/assembler locations and flags
#
ZXCC=$(BINDIR)/zx
ZXCC=$(BINDIR)/zxcc
export CPMDIR80=$(TOOLS)/cpm/
TASM=$(BINDIR)/uz80as -t z80
TASMFLAGS=
OPENSPIN=$(BINDIR)/openspin
@ -48,7 +49,7 @@ CPMCHATTR=$(BINDIR)/cpmchattr
#
# directory containing cpm binaries
#
CPM=$(TOOLS)/cpm/bin
CPM=$(TOOLS)/cpm/bin80/
#
# .ONESHELL uses a single shell instance for all shell scripts.

0
Tools/cpm/bin/ARCV.COM → Tools/cpm/bin80/ARCV.COM

0
Tools/cpm/bin/AS.COM → Tools/cpm/bin80/AS.COM

0
Tools/cpm/bin/BASCOM.COM → Tools/cpm/bin80/BASCOM.COM

0
Tools/cpm/bin/CC.COM → Tools/cpm/bin80/CC.COM

0
Tools/cpm/bin/CNM.COM → Tools/cpm/bin80/CNM.COM

0
Tools/cpm/bin/CRC.COM → Tools/cpm/bin80/CRC.COM

0
Tools/cpm/bin/CREF80.COM → Tools/cpm/bin80/CREF80.COM

0
Tools/cpm/bin/CZ.COM → Tools/cpm/bin80/CZ.COM

0
Tools/cpm/bin/DIRX.COM → Tools/cpm/bin80/DIRX.COM

0
Tools/cpm/bin/DISKINFO.COM → Tools/cpm/bin80/DISKINFO.COM

0
Tools/cpm/bin/GENCPM.COM → Tools/cpm/bin80/GENCPM.COM

0
Tools/cpm/bin/HEX80.COM → Tools/cpm/bin80/HEX80.COM

0
Tools/cpm/bin/HEXCOM.COM → Tools/cpm/bin80/HEXCOM.COM

0
Tools/cpm/bin/L80.COM → Tools/cpm/bin80/L80.COM

0
Tools/cpm/bin/LBREXT.COM → Tools/cpm/bin80/LBREXT.COM

0
Tools/cpm/bin/LIB.COM → Tools/cpm/bin80/LIB.COM

0
Tools/cpm/bin/LIB80.COM → Tools/cpm/bin80/LIB80.COM

0
Tools/cpm/bin/LIBUTIL.COM → Tools/cpm/bin80/LIBUTIL.COM

0
Tools/cpm/bin/LINK.COM → Tools/cpm/bin80/LINK.COM

0
Tools/cpm/bin/LN.COM → Tools/cpm/bin80/LN.COM

0
Tools/cpm/bin/M80.COM → Tools/cpm/bin80/M80.COM

0
Tools/cpm/bin/MAC.COM → Tools/cpm/bin80/MAC.COM

0
Tools/cpm/bin/MLOAD25.COM → Tools/cpm/bin80/MLOAD25.COM

0
Tools/cpm/bin/NULU.COM → Tools/cpm/bin80/NULU.COM

0
Tools/cpm/bin/RMAC.COM → Tools/cpm/bin80/RMAC.COM

0
Tools/cpm/bin/SIDSYM.COM → Tools/cpm/bin80/SIDSYM.COM

0
Tools/cpm/bin/SLR180.COM → Tools/cpm/bin80/SLR180.COM

0
Tools/cpm/bin/SLRMAC.COM → Tools/cpm/bin80/SLRMAC.COM

0
Tools/cpm/bin/SLRNK.COM → Tools/cpm/bin80/SLRNK.COM

0
Tools/cpm/bin/SQZ.COM → Tools/cpm/bin80/SQZ.COM

0
Tools/cpm/bin/TEX21.COM → Tools/cpm/bin80/TEX21.COM

0
Tools/cpm/bin/TEX21A.COM → Tools/cpm/bin80/TEX21A.COM

0
Tools/cpm/bin/TEX21B.COM → Tools/cpm/bin80/TEX21B.COM

0
Tools/cpm/bin/UCRLZH.COM → Tools/cpm/bin80/UCRLZH.COM

0
Tools/cpm/bin/UNARC.COM → Tools/cpm/bin80/UNARC.COM

0
Tools/cpm/bin/UNCR.COM → Tools/cpm/bin80/UNCR.COM

0
Tools/cpm/bin/UNZIP.COM → Tools/cpm/bin80/UNZIP.COM

0
Tools/cpm/bin/UNZIP154.COM → Tools/cpm/bin80/UNZIP154.COM

0
Tools/cpm/bin/UNZIP186.COM → Tools/cpm/bin80/UNZIP186.COM

0
Tools/cpm/bin/USQ.COM → Tools/cpm/bin80/USQ.COM

0
Tools/cpm/bin/Z80ASM.COM → Tools/cpm/bin80/Z80ASM.COM

0
Tools/cpm/bin/ZMAC.COM → Tools/cpm/bin80/ZMAC.COM

0
Tools/cpm/bin/ZML.COM → Tools/cpm/bin80/ZML.COM

0
Tools/cpm/bin/ZMLIB.COM → Tools/cpm/bin80/ZMLIB.COM

0
Tools/cpm/bin/ZSM.COM → Tools/cpm/bin80/ZSM.COM

0
Tools/cpm/include/CTYPE.H → Tools/cpm/include80/CTYPE.H

0
Tools/cpm/include/ERRNO.H → Tools/cpm/include80/ERRNO.H

0
Tools/cpm/include/FCNTL.H → Tools/cpm/include80/FCNTL.H

0
Tools/cpm/include/IO.H → Tools/cpm/include80/IO.H

0
Tools/cpm/include/LIBC.H → Tools/cpm/include80/LIBC.H

0
Tools/cpm/include/MATH.H → Tools/cpm/include80/MATH.H

0
Tools/cpm/include/SETJMP.H → Tools/cpm/include80/SETJMP.H

0
Tools/cpm/include/SGTTY.H → Tools/cpm/include80/SGTTY.H

0
Tools/cpm/include/STDIO.H → Tools/cpm/include80/STDIO.H

0
Tools/cpm/lib/C.LIB → Tools/cpm/lib80/C.LIB

0
Tools/cpm/lib/M.LIB → Tools/cpm/lib80/M.LIB

0
Tools/cpm/lib/ROM.LIB → Tools/cpm/lib80/ROM.LIB

0
Tools/cpm/lib/T.LIB → Tools/cpm/lib80/T.LIB

2
Tools/unix/Makefile

@ -9,7 +9,7 @@ ifeq ($(UNAME), Darwin)
SUFFIX=osx
endif
SUBDIRS = bst uz80as zx cpmtools bin2asm lzsa
SUBDIRS = bst uz80as zxcc cpmtools bin2asm lzsa
all:
@chmod +x casefn.sh

37
Tools/unix/zx/Makefile

@ -1,37 +0,0 @@
#
# hacked up brute force makefile for linux and osx
#
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
SUFFIX=linux
endif
ifeq ($(UNAME), Darwin)
SUFFIX=darwin
endif
DEST = ../../$(UNAME)
CFLAGS = -g # -DDEBUG
OBJECTS = zx.o cpmdrv.o cpmglob.o cpmparse.o cpmredir.o \
drdos.o util.o xlt.o zxbdos.o zxcbdos.o zxdbdos.o z80.o
UNUSED = dirent.o
all: zx $(DEST)
cp -p bios.bin zx $(DEST)
$(DEST):
mkdir -p $(DEST)
clean:
-rm -f $(OBJECTS) config.h zx
clobber: clean
-rm -f $(DEST)/zx $(DEST)/bios.bin zx
$(OBJECTS): config.h
zx: $(OBJECTS)
$(CC) -o zx $(OBJECTS)
config.h: config.h.$(SUFFIX)
cp config.h.$(SUFFIX) config.h

16
Tools/unix/zx/config.h.darwin

@ -1,16 +0,0 @@
//#define HAVE_WINDOWS_H
#define HAVE_DIRENT_H
#define HAVE_UTIME_H
#define HAVE_FCNTL_H
#define HAVE_UNISTD_H
#define BINDIR80 getenv("ZXBINDIR")
#define LIBDIR80 getenv("ZXLIBDIR")
#define INCDIR80 getenv("ZXINCDIR")
#define DARWIN
#include <sys/param.h>
#include <sys/mount.h>
#define _S_IFDIR S_IFDIR
#define strcmpi(a,b) strcasecmp(a,b)
//#define WIN32
//#define WINVER 0x0501 // target Windows XP
//#define _WIN32_WINNNT 0x0501 // target Windows XP

17
Tools/unix/zx/config.h.linux

@ -1,17 +0,0 @@
//#define HAVE_WINDOWS_H
#define HAVE_DIRENT_H
#define HAVE_UTIME_H
#define HAVE_FCNTL_H
#define HAVE_SYS_VFS_H
#define HAVE_UNISTD_H
#define BINDIR80 getenv("ZXBINDIR")
#define LIBDIR80 getenv("ZXLIBDIR")
#define INCDIR80 getenv("ZXINCDIR")
#define LINUX
#include <sys/param.h>
#include <sys/mount.h>
#define _S_IFDIR S_IFDIR
#define strcmpi(a,b) strcasecmp(a,b)
//#define WIN32
//#define WINVER 0x0501 // target Windows XP
//#define _WIN32_WINNNT 0x0501 // target Windows XP

9
Tools/unix/zx/config.h.windows

@ -1,9 +0,0 @@
#define HAVE_WINDOWS_H
//#define HAVE_DIRENT_H
#define HAVE_FCNTL_H
#define BINDIR80 getenv("ZXBINDIR")
#define LIBDIR80 getenv("ZXLIBDIR")
#define INCDIR80 getenv("ZXINCDIR")
#define WIN32
#define WINVER 0x0501 // target Windows XP
#define _WIN32_WINNNT 0x0501 // target Windows XP

126
Tools/unix/zx/cpmparse.c

@ -1,126 +0,0 @@
/*
CPMREDIR: CP/M filesystem redirector
Copyright (C) 1998, John Elliott <jce@seasip.demon.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This file parses filenames to FCBs.
*/
#include "cpmint.h"
#define is_num(c) ((c >= '0') && (c <= '9'))
static int parse_drive_user(char *txt, cpm_byte *fcb)
{
char uid[4], drvid[4];
int up, dp;
for (up = dp = 0; *txt != ':'; ++txt)
{
if (is_num (*txt)) uid [up++] = *txt;
if (isalpha(*txt)) drvid[dp++] = *txt;
if (!is_num(*txt) && !isalpha(*txt)) return -1;
}
uid[up] = 0; drvid[dp] = 0;
if (dp > 1) return -1; /* Invalid driveletter */
if (up > 2) return -1; /* Invalid uid */
fcb[0x0d] = atoi(uid) + 1; if (fcb[0x0d] > 16) return -1;
if (islower(drvid[0])) drvid[0] = toupper(drvid[0]);
if (drvid[0] < 'A' || drvid[0] > 'P') return -1;
fcb[0] = drvid[0] - '@';
return 0;
}
cpm_word fcb_parse(char *txt, cpm_byte *fcb)
{
int nl = 0, tl = 0, pl = 0, phase = 0;
char *ntxt, ch;
memset(fcb, 0, 0x24);
if (txt[1] == ':' || txt[2] == ':' || txt[3] == ':')
{
if (parse_drive_user(txt, fcb)) return 0xFFFF;
/* Move past the colon */
ntxt = strchr(txt, ':') + 1;
}
else ntxt = txt;
while (phase < 3)
{
ch = *ntxt;
if (islower(ch)) ch = toupper(ch);
switch(ch)
{
case 0:
case '\r': /* EOL */
phase = 4;
break;
case '.': /* file.typ */
if (!phase) ++phase;
else phase = 3;
break;
case ';': /* Password */
if (phase < 2) phase = 2;
else phase = 3;
break;
case '[': case ']': case '=': case 9: case ' ':
case '>': case '<': case ':': case ',': case '/':
case '|': /* Terminator */
phase = 3;
default:
switch(phase)
{
case 0:
if (nl >= 8) return 0xFFFF;
fcb[++nl] = ch;
break;
case 1:
if (tl >= 3) return 0xFFFF;
fcb[tl + 9] = ch;
++tl;
break;
case 2:
if (pl >= 8) return 0xFFFF;
fcb[pl + 0x10] = ch;
++pl;
break;
}
break;
}
}
if (!nl) return 0xFFFF;
fcb[0x1A] = pl;
if (phase == 4) return 0;
return ntxt - txt;
}

72
Tools/unix/zx/readme.txt

@ -1,72 +0,0 @@
ZX Command
An adaptation of zxcc-0.5.6 by Wayne Warthen
This directory contains the source files used to build the "zx" tool. This tool
is essentially just John Elliott's zxcc package version zxcc-0.5.6 modified to
build for Windows and simplified down to just a single command (zx)
which is essentially just the zxcc command.
Please see http://www.seasip.info/Unix/Zxcc/ for more information on zxcc.
Note that this is a Win32 build. The code has not been updated to build as a 64-bit
binary. However, Win32 binaries run very nicely under 64 bit Windows.
To build under Open Watcom or Microsoft Visual C++, use the following command:
cl /Fe"zx.exe" zx.c cpmdrv.c cpmglob.c cpmparse.c cpmredir.c drdos.c util.c xlt.c zxbdos.c zxcbdos.c zxdbdos.c z80.c dirent.c
To build a debug version, use the following command:
cl /DDEBUG /Fe"zxdbg.exe" zx.c cpmdrv.c cpmglob.c cpmparse.c cpmredir.c drdos.c util.c xlt.c zxbdos.c zxcbdos.c zxdbdos.c z80.c dirent.c
WARNING: There seems to be a rare scenario that breaks zx under the Open Watcom build.
CP/M allows a file to be accessed under multiple FCB's without an error. Open Watcom
will see this as an error. At present, the only tool I know of that does this is M80.
December 5, 2014
After struggling to get the entire zxcc package to build nicely using autoconf,
I finally gave up and took a much more direct approach. I have extracted just
the source files needed and created a simple batch file to build the tool. I
realize this could be done much better, but I cheated in the interest of time.
The one "real" change I made in the source code was that I modified the tool
to look for bios.bin in the same directory as the executable is in. This
just makes it much easier to set up (for me, anyway).
The GPL status of everything remains in place and carries forward.
Wayne Warthen
wwarthen@gmail.com
March 15, 2017
- Updated to compile under Open Watcom.
- Implemented BDOS console status function.
- Set stdin and stdout to binary mode at startup.
August 21, 2021
- Incorporated filename case insensitivity changes from Curt Mayer
- Incorporated fixes from Tony Nicholson at https://github.com/agn453/ZXCC
- Emulation of CP/M BDOS function 60 (call resident system extension)
should be disabled and return 0xFF in both the A and L registers.
- Change cpm_bdos_10() to return an unsigned result to avoid buffer
size being interpreted as negative.
- Fix the emulation of Z80 opcodes for IN (HL),(C) and
OUT (C),(HL) - opcodes 0xED,0x70 and 0xED,0x71 respectively.
This is noted in Fred Weigel's AM9511 arithmetic processing unit
emulation from https://github.com/ratboy666/am9511 in the howto.txt
description. NB: I have not included Fred's am9511 support at this
time into ZXCC.
- Fixed parse_to_fcb function in zx.c to handle parsing second automatic
FCB from command line
- I have not been able to reproduce the multiple FCBs referring to a
single file issue with Watcom documented above. Perhaps I fixed it
and don't remember or I found a bug-fixed version of M80. Not sure.
Wayne Warthen
wwarthen@gmail.com
--WBW 4:09 PM 8/21/2021

191
Tools/unix/zx/xlt.c

@ -1,191 +0,0 @@
/*
CPMREDIR: CP/M filesystem redirector
Copyright (C) 1998, John Elliott <jce@seasip.demon.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This file holds functions dealing with name translation; also the
initialisation code.
*/
#include "cpmint.h"
/* Detect DRDOS */
#ifdef __MSDOS__
static void drdos_init(void)
{
/* The DJGPP DOS extender won't detect DRDOS using intdos(), so we have
to use __dpmi_int() instead. */
#ifdef __GO32__
__dpmi_regs ir;
ir.x.ax = 0x4452; /* "DR" */
__dpmi_int(0x21, &ir);
if (ir.x.flags & 1) return; /* Not DRDOS */
redir_Msg("DRDOS detected.\r\n");
redir_drdos = 1;
#else /* __GO32__ */
union REGS ir, or;
ir.w.ax = 0x4452; /* "DR" */
intdos(&ir, &or);
if (or.w.cflag) return; /* Not DRDOS */
redir_Msg("DRDOS detected.\r\n");
redir_drdos = 1;
#endif /* __GO32__ */
}
#endif /* __MSDOS__ */
int fcb_init(void)
{
int n;
/* A: to O: free */
for (n = 0; n < 15; n++) redir_drive_prefix[n][0] = 0;
strcpy(redir_drive_prefix[15], "./"); /* P: is current directory */
/* Log on to P:. It is the only drive at this point which we
* know works. */
redir_cpmdrive = 15;
#ifdef __MSDOS__
drdos_init();
#endif
return 1;
}
/* Deinitialise the library. */
void fcb_deinit(void)
{
/* Nothing */
}
/* Translate a name from the host FS to a CP/M name. This will (if necessary)
* create a mapping between a CP/M drive and a host directory path.
*
* CP/M drives A: to O: can be mapped in this way. P: is always the current
* drive.
*
*/
void xlt_name(char *localname, char *cpmname)
{
char ibuf[CPM_MAXPATH + 1];
char nbuf[CPM_MAXPATH + 1];
char *pname;
int n;
sprintf(ibuf, "%-.*s", CPM_MAXPATH, localname);
pname = strrchr(ibuf, '/');
#ifdef __MSDOS__
if (!pname) pname = strrchr(ibuf,'\\');
if (!pname) pname = strrchr(ibuf,':');
#endif
if (!pname) /* No path separators in the name. It is therefore a
local filename, so map it to drive P: */
{
strcpy(cpmname, "p:");
strcat(cpmname, ibuf);
return;
}
++pname;
strcpy(nbuf, pname); /* nbuf holds filename component */
*pname = 0; /* ibuf holds path component */
/* See if the path is one of those already mapped to drives */
for (n = 0; n < 15; n++)
{
if (redir_drive_prefix[n][0] && !strcmp(ibuf, redir_drive_prefix[n]))
{
sprintf(cpmname,"%c:%s", n + 'a', nbuf);
return;
}
}
/* It is not, see if another drive can be allocated */
for (n = 0; n < 15; n++) if (!redir_drive_prefix[n][0])
{
strcpy(redir_drive_prefix[n], ibuf);
sprintf(cpmname,"%c:%s", n + 'a', nbuf);
return;
}
/* No other drive can be allocated */
strcpy(cpmname,"p:");
strcat(cpmname, nbuf);
}
/* It is sometimes convenient to set some fixed mappings. This will create
* a mapping for a given directory.
* Pass drive = -1 for "first available", or 0-15 for A: to P:
*/
int xlt_map(int drive, char *localdir)
{
int n;
if (drive == -1)
{
for (n = 0; n < 15; n++) if (!redir_drive_prefix[n][0])
{
drive = n;
break;
}
if (drive == -1) return 0; /* No space for mappings */
}
if (redir_drive_prefix[drive][0]) return 0; /* Drive taken */
sprintf(redir_drive_prefix[drive], "%-.*s", CPM_MAXPATH, localdir);
return 1;
}
/* Unmap a drive
*/
int xlt_umap(int drive)
{
if (!redir_drive_prefix[drive][0]) return 0; /* Drive not taken */
redir_drive_prefix[drive][0] = 0;
return 1;
}
char *xlt_getcwd(int drive)
{
if (drive < 0 || drive > 16) return "";
return redir_drive_prefix[drive];
}

132
Tools/unix/zx/zx.html

@ -1,132 +0,0 @@
<html><head><title>zx CP/M Command Line Emulator</title></head><body>
<h1>zx CP/M Command Line Emulator</h1>
<p><em>zx</em> allows execution of CP/M 2.2 and 3.X application from a
Windows command line. It is compatible with Windows XP and greater (both
32 and 64 bit).</p>
<p><em>zx</em> is basically a port of a subset of the zxcc program by John Elliott.
The GPLv2 licensing carries forward. Please refer to the
<a href="http://http://www.seasip.info/Unix/Zxcc/">
zxcc web page</a> for more information.</p>
<p>While the original zxcc package was generally intended to allow
execution of the Hi-Tech C CP/M compiler under Unix, <em>zx</em> is slightly
more general and intended to allow running most CP/M tools. Specific
changes were incorporated to improve interactice console operation of
CP/M applications. Additionally, Curt Mayer added case insensitivity
for filenames under Unix variants.</p>
<h2>Setup</h2>
<p>The <em>zx</em> application (zx.exe) may be copied to any directory for execution.
The bios.bin file must be copied to the same directory. For ease of use,
you will probably want the directory to part of your PATH environment
variable so that you can run the tool from any location.</p>
<p>You will also need the CP/M applications that you want to run.
<em>zx</em> will load files fromthe current directory or one of the following
directories based on file type. Any of the following environment
variables may be defined to determine where <em>zx</em> searches for the
respective file types:</p>
<ul>
<li><strong>ZXBINDIR</strong> may contain a single path which will
be searched for executable files (usually *.com)</li>
<li><strong>ZXLIBDIR</strong> may contain a single path which will
be search for library files (usually *.lib)</li>
<li><strong>ZXINCDIR</strong> may contain a single path which will
be searched for include files (usually *.inc)</li>
</ul>
<h2>Usage</h2>
<p>In general CP/M applications are executed by prefixing the CP/M command
line with "zx". So for example, you could assemble a test.asm using
rmac with a command line like:</p>
<blockquote><tt>zx rmac hello</tt></blockquote>
<p>In this case, rmac.com would need to be in the directory specified by
environment variable ZXBINDIR or in the current directory. Also,
hello.asm would need to be in the current directory.</p>
<h3>Filenames</h3>
<p>Where you would normally enter a CP/M filename you instead enter
a Windows filename. Note that you will need to use a forward slash
instead of the traditional backslash as a directory separator. The
filename itself (as opposed to any directories in
its path) must obey CP/M 8.3 naming conventions.</p>
<p>Where the documentation requires a CP/M drive letter/user number
you should enter a path complete with trailing slash, for example:</p>
<blockquote><tt>-I/usr/src/linux-80/include/</tt></blockquote>
<h2>Technical</h2>
<p><em>zx</em> emulates a subset of CP/M 3; hopefully enough to run the
most CP/M tools. It can be used as a limited general-purpose CP/M 3
emulator provided the emulated program only uses a common subset of
system calls.</p>
<p>Syntax for <em>zx</em> is:</p>
<blockquote>
<tt>zx <i>comfile.com</i> arg1 arg2 ...</tt>
</blockquote>
<p>The comfile is the program to run; <em>zx</em> searches the current
directory and <strong>ZXBINDIR</strong> for it.</p>
<p>The arguments are parsed in this way:</p>
<ul>
<li>Any argument starting with a - sign is passed to the CP/M program as-is,
minus the leading - sign.
<li>Any argument starting with a + sign is parsed as a filename (see below)
and then concatenated to the previous argument.
<li>Any argument starting "+-" is concatenated without being parsed.
<li>All other arguments are parsed as filenames. The path is
converted to a CP/M driveletter.
</ul>
<p>For example:
<blockquote>
<tt>zx foo.com --Q -A /src/main --I +/src/sub +-, +/foo/bar</tt>
</blockquote>
<p>would pass these arguments to foo.com:</p>
<blockquote>
<tt>-Q A d:main -Id:sub,e:bar</tt>
</blockquote>
<p>The other programs are merely wrappers that convert their command lines
into the form required by <em>zx</em>.</p>
<h2>Errors</h2>
<p>Any errors raised by the <em>zx</em> runtime system will be prefixed
with <tt>zx:</tt>. Some errors you may encounter are:</p>
<dl>
<dt>Unsupported BDOS call</dt>
<dd>Part of CP/M 3 that the program uses has not been emulated. Add the
required functionality to zxbdos.c and recompile.</dd>
<dt>Z80 encountered invalid trap</dt>
<dd>The CP/M program being run attempted to call the <em>zx</em> runtime
system with an unknown call number.</dd>
</dl>
<h2>Acknowledgements</h2>
<ul>
<li>zxcc was written by John Elliott</li>
<li>Hi-Tech C was written by Hi-Tech Software.</li>
<li>The Z80 emulation engine was written by Ian Collier.</li>
<li>Thanks to Jacob Nevins, Andy Parkins and others for bug fix suggestions.</li>
</ul>
</body>
</html>

21
Tools/unix/zxcc/Build-OW.cmd

@ -0,0 +1,21 @@
@echo off
setlocal
::
:: Edit WATCOM variable below as needed for your environment
::
set WATCOM=..\..\Tools\WATCOM2
set PATH=%WATCOM%\BINNT;%WATCOM%\BINW;%PATH%
set EDPATH=%WATCOM%\EDDAT
set INCLUDE=%WATCOM%\H;%WATCOM%\H\NT
copy config.h.windows config.h
cl /Fe"zxcc.exe" zxcc.c cpmdrv.c cpmglob.c cpmparse.c cpmredir.c drdos.c util.c track.c xlt.c zxbdos.c zxcbdos.c zxdbdos.c z80.c
if errorlevel 1 exit /b 255
cl /Fe"zxccdbg.exe" /DDEBUG zxcc.c cpmdrv.c cpmglob.c cpmparse.c cpmredir.c drdos.c util.c track.c xlt.c zxbdos.c zxcbdos.c zxdbdos.c z80.c
if errorlevel 1 exit /b 255
copy cpm\bios.bin .

25
Tools/unix/zxcc/Build-VC.cmd

@ -0,0 +1,25 @@
@echo off
setlocal
::
:: Visual Studio x86 Native Tools Command Prompt is assumed
::
:: Below configures VS2012 to target Windows XP and beyond
:: Not sure if it will work in later versions of VS, but seems
:: to do no harm.
set INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE%
set PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%
set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%
set CL=/D_USING_V110_SDK71_;%CL%
set LINK=/SUBSYSTEM:CONSOLE,5.01 %LINK%
copy config.h.windows config.h
cl zxcc.c cpmdrv.c cpmglob.c cpmparse.c cpmredir.c drdos.c util.c xlt.c zxbdos.c zxcbdos.c zxdbdos.c z80.c dirent.c track.c
if errorlevel 1 exit /b 255
cl /DDEBUG /Fe"zxccdbg.exe" zxcc.c cpmdrv.c cpmglob.c cpmparse.c cpmredir.c drdos.c util.c xlt.c zxbdos.c zxcbdos.c zxdbdos.c z80.c dirent.c track.c
if errorlevel 1 exit /b 255
copy cpm\bios.bin .

0
Tools/unix/zx/COPYING → Tools/unix/zxcc/COPYING

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save