diff --git a/Source/Apps/Test/Build.cmd b/Source/Apps/Test/Build.cmd index dea44672..f757cf32 100644 --- a/Source/Apps/Test/Build.cmd +++ b/Source/Apps/Test/Build.cmd @@ -23,7 +23,7 @@ pushd ps2info && call Build || exit /b & popd pushd 2piotst && call Build || exit /b & popd pushd piomon && call Build || exit /b & popd pushd banktest && call Build || exit /b & popd -pushd portswp && call Build || exit /b & popd +pushd portscan && call Build || exit /b & popd goto :eof diff --git a/Source/Apps/Test/Clean.cmd b/Source/Apps/Test/Clean.cmd index f611848e..1e62b7d8 100644 --- a/Source/Apps/Test/Clean.cmd +++ b/Source/Apps/Test/Clean.cmd @@ -20,4 +20,4 @@ pushd ps2info && call Clean || exit /b 1 & popd pushd 2piotst && call Clean || exit /b 1 & popd pushd piomon && call Clean || exit /b 1 & popd pushd banktest && call Clean || exit /b 1 & popd -pushd portswp && call Clean || exit /b 1 & popd +pushd portscan && call Clean || exit /b 1 & popd diff --git a/Source/Apps/Test/Makefile b/Source/Apps/Test/Makefile index e1f78754..6fbce342 100644 --- a/Source/Apps/Test/Makefile +++ b/Source/Apps/Test/Makefile @@ -1,5 +1,5 @@ OBJECTS = -SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portswp +SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portscan DEST = ../../../Binary/Apps/Test TOOLS =../../../Tools diff --git a/Source/Apps/Test/portscan/Build.cmd b/Source/Apps/Test/portscan/Build.cmd new file mode 100644 index 00000000..38027da2 --- /dev/null +++ b/Source/Apps/Test/portscan/Build.cmd @@ -0,0 +1,11 @@ +@echo off +setlocal + +set TOOLS=../../../../Tools +set PATH=%TOOLS%\tasm32;%PATH% +set TASMTABS=%TOOLS%\tasm32 + +tasm -t180 -g3 -fFF portscan.asm portscan.com portscan.lst || exit /b + +copy /Y portscan.com ..\..\..\..\Binary\Apps\Test\ || exit /b + diff --git a/Source/Apps/Test/portswp/Clean.cmd b/Source/Apps/Test/portscan/Clean.cmd similarity index 100% rename from Source/Apps/Test/portswp/Clean.cmd rename to Source/Apps/Test/portscan/Clean.cmd diff --git a/Source/Apps/Test/portswp/Makefile b/Source/Apps/Test/portscan/Makefile similarity index 81% rename from Source/Apps/Test/portswp/Makefile rename to Source/Apps/Test/portscan/Makefile index 81d334fc..b1e9ee84 100644 --- a/Source/Apps/Test/portswp/Makefile +++ b/Source/Apps/Test/portscan/Makefile @@ -1,4 +1,4 @@ -OBJECTS = portswp.com +OBJECTS = portscan.com DEST = ../../../../Binary/Apps/Test TOOLS =../../../../Tools diff --git a/Source/Apps/Test/portswp/portswp.asm b/Source/Apps/Test/portscan/portscan.asm similarity index 91% rename from Source/Apps/Test/portswp/portswp.asm rename to Source/Apps/Test/portscan/portscan.asm index 5e30c4b5..47a73b5c 100644 --- a/Source/Apps/Test/portswp/portswp.asm +++ b/Source/Apps/Test/portscan/portscan.asm @@ -1,5 +1,5 @@ ;=============================================================================== -; PORTSWP - Sweep Ports +; PORTSCAN - Sweep Ports ; ;=============================================================================== ; @@ -7,7 +7,7 @@ ;_______________________________________________________________________________ ; ; Usage: -; PORTSWP +; PORTSCAN ; ; Operation: ; Reads all ports (multiple ways) and displays values read @@ -173,32 +173,25 @@ portread: portread_z80: ; use traditional "IN" ; read port using IN ld a,(curport) ; get current port - ld (port),a ; modify IN instruction + ld (pnum0),a ; modify IN instruction nop ; defeat Z280 pipeline nop in a,($FF) ; read the port -port .equ $-1 +pnum0 .equ $-1 ld (hl),a ; save it inc hl ; bump value list pointer -; - ; read port using IN (C) - ld a,(curport) ; get current port - ld b,0 ; in case 16 bits decoded - ld c,a ; move to reg C - in a,(c) ; read the port - ld (hl),a ; save it - inc hl ; bump value list pointer - ret + jr portread1 ; portread_z180: ; use "IN0" ; read port using IN ld a,(curport) ; get current port - ld (port1),a ; modify IN instruction + ld (pnum1),a ; modify IN instruction in0 a,($FF) ; read the port -port1 .equ $-1 +pnum1 .equ $-1 ld (hl),a ; save it inc hl ; bump value list pointer ; +portread1: ; read port using IN (C) ld a,(curport) ; get current port ld b,0 ; in case 16 bits decoded @@ -588,10 +581,10 @@ stack .equ $ ; stack top ; ; Messages ; -msgban .db "PORTSWP v1.0, 14-Feb-2023",13,10 +msgban .db "PORTSCAN v1.0, 16-Feb-2023",13,10 .db "Copyright (C) 2023, Wayne Warthen, GNU GPL v3",0 -msguse .db "Usage: PORTSWP",13,10 -msgprm .db "Parameter error (PORTSWP /? for usage)",0 +msguse .db "Usage: PORTSCAN",13,10 +msgprm .db "Parameter error (PORTSCAN /? for usage)",0 msgbio .db "Incompatible BIOS or version, " .db "HBIOS v", '0' + rmj, ".", '0' + rmn, " required",0 str_sep .db ": ",0 diff --git a/Source/Apps/Test/portswp/Build.cmd b/Source/Apps/Test/portswp/Build.cmd deleted file mode 100644 index 763cf712..00000000 --- a/Source/Apps/Test/portswp/Build.cmd +++ /dev/null @@ -1,11 +0,0 @@ -@echo off -setlocal - -set TOOLS=../../../../Tools -set PATH=%TOOLS%\tasm32;%PATH% -set TASMTABS=%TOOLS%\tasm32 - -tasm -t180 -g3 -fFF portswp.asm portswp.com portswp.lst || exit /b - -copy /Y portswp.com ..\..\..\..\Binary\Apps\Test\ || exit /b -