-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't load
install-to
by default (moved to block 5f)
- Loading branch information
1 parent
5ff0aa8
commit 5016138
Showing
3 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
( install to other disk ) | ||
value target | ||
$2000 constant buffer $4000 #512 u/ constant bufsize | ||
: read-orig target 0. 1 buffer dread ; | ||
: read-ours disk# 0. 1 buffer $200 + dread ; | ||
: copy-code buffer $200 + buffer #446 cmove ; | ||
: write-back target 0. 1 buffer dwrite ; | ||
: copy-mbr read-orig read-ours copy-code write-back ; | ||
: copy-small ( lo count -- ) 2dup 2>r 2>r | ||
disk# 2r> 0 swap buffer dread | ||
target 2r> 0 swap buffer dwrite ; | ||
: copy-rest ( lo count -- ) begin dup while | ||
2dup bufsize min copy-small dup bufsize min tuck - >r + r> | ||
repeat ; | ||
: install-to ( sectors disk -- ) to target copy-mbr | ||
1- 1 swap copy-rest ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters