From 34cc40f459b784a00528b21209e42565e0476cfc Mon Sep 17 00:00:00 2001 From: Mark Pruden Date: Sat, 22 Mar 2025 22:10:32 +1100 Subject: [PATCH] Added Code to Reset All Drives after successful completion. --- Source/Apps/copysl/bdos.asm | 16 ++++++++++++++++ Source/Apps/copysl/copysl.asm | 11 ++++++++--- Source/Apps/copysl/copysl.doc | 5 +++-- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 Source/Apps/copysl/bdos.asm diff --git a/Source/Apps/copysl/bdos.asm b/Source/Apps/copysl/bdos.asm new file mode 100644 index 00000000..1b4d995d --- /dev/null +++ b/Source/Apps/copysl/bdos.asm @@ -0,0 +1,16 @@ +; +bdos .EQU 5 +; +; Force BDOS to reset (logout) all drives +; +drvrst: + ld c,$0D ; BDOS Reset Disk function + call bdos ; do it + ; + ld c,$25 ; BDOS Reset Multiple Drives + ld de,$FFFF ; all drives + call bdos ; do it + ; + xor a ; signal success + ret +; diff --git a/Source/Apps/copysl/copysl.asm b/Source/Apps/copysl/copysl.asm index cfd20c9f..6d7d5d02 100644 --- a/Source/Apps/copysl/copysl.asm +++ b/Source/Apps/copysl/copysl.asm @@ -11,13 +11,15 @@ ; ---------------- ; 0.1 - Initial Version written by Mark Pruden ; 0.2 - Added support for /v (verify) option. +; 0.3 - refresh CP/M disk buffers after completion ; ---------------- ; .ORG 100H jp start ; - .INCLUDE "crc.asm" ; comparison of data blocks, used for verify - .include "cio.asm" ; bdos IO routines + .include "crc.asm" ; comparison of data blocks, used for verify + .include "cio.asm" ; bdos IO routines + .include "bdos.asm" ; bdos general routines .include "hbios.asm" ; hbios routines ; ; ------------------------- @@ -250,6 +252,9 @@ finishcopy1: CALL iprtstr .DB " seconds.", 13, 10, 0 + ; Force BDOS to reset (logout) all drives + CALL drvrst + end: ld hl,msg_complete CALL prtstr @@ -268,7 +273,7 @@ exit: ; ========================================= ; msg_welcome: - .DB "CopySlice v0.2 (RomWBW) Sept 2024 - M.Pruden", 13, 10, 0 + .DB "CopySlice v0.3 (RomWBW) March 2025 - M.Pruden", 13, 10, 0 msg_overite_partition: .DB 13,10 .DB "Warning: Copying to Slice 0 of hd512 media, " diff --git a/Source/Apps/copysl/copysl.doc b/Source/Apps/copysl/copysl.doc index f5e704be..f252dab8 100644 --- a/Source/Apps/copysl/copysl.doc +++ b/Source/Apps/copysl/copysl.doc @@ -1,6 +1,6 @@ ========================================================================== - CopySlice Utility v0.2 for RomWbW computers - written by Mark Pruden (Sept 2024) + CopySlice Utility v0.3 for RomWbW computers + written by Mark Pruden (March 2025) ========================================================================== Purpose: @@ -87,6 +87,7 @@ History ------- * v 0.1 Initial Release * v 0.2 Added the /v command option to read and verify after write +* v 0.3 Refresh CP/M disk buffers after completion Future ------