# HG changeset patch # User robertgault # Date 1226724755 0 # Node ID a33c34f7f897cf9a89570da75338b075c9e8f01f # Parent c61efe4346155dd5a268f7862112f90367585ba8 I have removed what seemed useless Close Open routines and relocated the verification turn off routine. In the process of doing this, I have made the preservation of the destination disk ID selectable with a SAVEID variable at the beginning of the code. The default is make a full backup including the disk ID same as current. diff -r c61efe434615 -r a33c34f7f897 level1/cmds/backup.asm --- a/level1/cmds/backup.asm Thu Jun 19 15:16:09 2008 +0000 +++ b/level1/cmds/backup.asm Sat Nov 15 04:52:35 2008 +0000 @@ -14,6 +14,12 @@ * instead of dev1. Full path or local file can be used. There is * still a comparison of LSN0 to make sure that a disk actually has * been formatted for the correct number of sides and tracks. +* 10 2008/11/12 Robert Gault +* Removed what seemed unnecessary Close and reOpen lines. +* Relocated verification turn off routine. +* Preservation of new disk ID is now possible per Gene's idea. +* SAVEID is a switch to select save/no_save of ID on destination disk. +* Copy and Verification start at LSN1 since LSN0 gets checked several times anyway. nam Backup ttl Make a backup copy of a disk @@ -25,11 +31,13 @@ endc DOHELP set 1 +* Default 0 means do not save destination disk ID. 1 means save it. RG +SAVEID set 0 tylg set Prgrm+Objct atrv set ReEnt+rev rev set $00 -edition set $09 +edition set 10 mod eom,name,tylg,atrv,start,size @@ -236,16 +244,12 @@ lda #READ. os9 I$Open open source device (the one we're backing up) bcs L027C branch if error +* Relocated since Close Open is removed. RG + sta srclsn0,u ldy #256 os9 I$Read read LSN 0 of source bcs L027C - os9 I$Close - ldx dstlsn0,u @@ -296,6 +312,15 @@ lbne exit exit if not ok to scratch lda srclsn0,u get src LSN0 read earlier + ifne SAVEID +* New routine to preserved destination disk ID. Gene's idea. RG + pshs d + leay >dstlsn0,u + ldd srclsn0,u os9 I$Read lbcs L03AF - os9 I$Close close path - leax rdysrc,pcr lbsr doprompt possibly show "ready source" message lda dstlsn0,u - bsr L0403 + lbsr L0403 lda bkabort,pcr L03B6 lbsr L0456 comb -exit ldb #$00 +exit ldb #$00 os9 F$Exit L03BF ldy #256 lda HelpMsg,pcr point to help message data - bra L03B6 + lbra L03B6 ELSE bra exit ENDC