Skip to content

Instantly share code, notes, and snippets.

@kuninet
Last active December 2, 2018 09:36
Show Gist options
  • Save kuninet/fe7c366f37440fa322b6a45363f79ab3 to your computer and use it in GitHub Desktop.
Save kuninet/fe7c366f37440fa322b6a45363f79ab3 to your computer and use it in GitHub Desktop.
GWMON-80 Build Batch Script
echo off
echo -- source fetch from github
if exist "glitchworks_monitor\" (
cd glitchworks_monitor
git pull
cd ..
) ELSE (
git clone git@github.com:kuninet/glitchworks_monitor.git
)
echo -- work source/build dir clear
del /Q src\*.*
del /Q build\*.*
echo -- source conv start
echo ---- Set Start ADDR tomonitor.asm
wsl sed 's/XXXXH/0000H/' glitchworks_monitor/monitor.asm > src/monitor-rom.asm
echo ---- copy and Set SP ADDR to i8251.asm
copy glitchworks_monitor\io_modules\i8251.asm src\i8251.asm
wsl sed 's/SETUP: LXI SP, 0FFFFH/SETUP: LXI SP, 07FFFH/' glitchworks_monitor/io_modules/i8251.asm > src/i8251_1M.asm
echo ---- asm source make
type src\monitor-rom.asm src\i8251.asm > build\M8251.asm
type src\monitor-rom.asm src\i8251_1M.asm > build\M8251-1M.asm
echo -- source conv end
cd build
echo -- monitor source assemble start
..\cpm32_04\cpm.exe ..\mac-b\MAC.COM M8251.asm
..\cpm32_04\cpm.exe ..\mac-b\MAC.COM M8251-1M.asm
echo -- monitor source assemble end
cd ..\
@kuninet
Copy link
Author

kuninet commented Dec 2, 2018

About the build directory structure

.
├─build\ ... build terget Dir
├─cpm32_04\ ... CP/M Executer Dir
│ ├─src
│ └─utl
├─glitchworks_monitor\ ... GWMON-80 git checkout Dir
│ └─io_modules
├─mac-b\ ... CP/M MacroAssembla MAC.COM
└─src\ ... source tmp Dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment