From 55383ce52819e714e735988dea8395e6e4fca7d6 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 27 Oct 2019 14:24:10 +0100 Subject: [PATCH] Attempt to describe purpose of source code in dsksav.s --- src/cmd/dsksav.s | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/cmd/dsksav.s b/src/cmd/dsksav.s index 2e79929..1392be4 100644 --- a/src/cmd/dsksav.s +++ b/src/cmd/dsksav.s @@ -1,26 +1,32 @@ " dsksav - iof - hlt - dzm track - -640 + " Copies the entire file system (except system image and + " swap area) from side 1 of the disk onto same location + " on side 0. + " + " I.e. copies the first 6400 blocks from side 1 to side 0. + + iof " disable interrupts + hlt " halt the computer! + dzm track " start copying from block address 0 + -640 " transfer 640 chunks of 10 blocks each dac c1 1: - lac track + lac track " read chunk of blocks starting at block "track" on side 1 jms dskrd1 - lac track + lac track " write chunk of blocks starting at block "track" on side 0 jms dskwr0 - lac track + lac track " proceed to next chunk (of 10 blocks) tad d10 dac track - isz c1 - jmp 1b + isz c1 " increment chunks transferred, if there chunks remaining + jmp 1b " ...loop and transfer the next chunk - hlt - sys exit + hlt " ...otherwise halt the computer! + sys exit " call exit system call -track: 0 -c1: 0 +track: 0 " block address of chunk to transfer +c1: 0 " number of chunks remaining d10: 10