about summary refs log tree commit diff stats
path: root/ex9.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-03-27 17:47:23 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-03-27 17:50:44 -0700
commit7bf8adb893dcc524c7f1bc5e8f984385c9138d7d (patch)
tree7ae60840d8cb0356cee7a76cfd3c15bb5de4e58c /ex9.mu
parent9818f1de981fe9206940cf89e9422388f8853cc2 (diff)
downloadmu-7bf8adb893dcc524c7f1bc5e8f984385c9138d7d.tar.gz
explicitly pass data disk to main
Diffstat (limited to 'ex9.mu')
-rw-r--r--ex9.mu6
1 files changed, 3 insertions, 3 deletions
diff --git a/ex9.mu b/ex9.mu
index 003eeb4c..dc5dffd0 100644
--- a/ex9.mu
+++ b/ex9.mu
@@ -15,17 +15,17 @@
 #   6. Notice that the data disk now contains the word count of the original text.
 #       xxd data.img |head
 
-fn main screen: (addr screen), keyboard: (addr keyboard) {
+fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
   var text-storage: (stream byte 0x200)
   var text/esi: (addr stream byte) <- address text-storage
-  load-first-sector-from-primary-bus-secondary-drive text
+  load-sector data-disk, 0/lba, text
 
   var word-count/eax: int <- word-count text
 
   var result-storage: (stream byte 0x10)
   var result/edi: (addr stream byte) <- address result-storage
   write-int32-decimal result, word-count
-  store-first-sector-to-primary-bus-secondary-drive result
+  store-sector data-disk, 0/lba, result
 }
 
 fn word-count in: (addr stream byte) -> _/eax: int {