From dd60caa3f51c5117c0193f8f3272e1c7f5230eb7 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 15 Jun 2021 21:50:13 -0700 Subject: . --- html/ex9.mu.html | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'html/ex9.mu.html') diff --git a/html/ex9.mu.html b/html/ex9.mu.html index f64c025c..59a91c10 100644 --- a/html/ex9.mu.html +++ b/html/ex9.mu.html @@ -15,9 +15,12 @@ body { font-size:12pt; font-family: monospace; color: #000000; background-color: a { color:inherit; } * { font-size:12pt; font-size: 1em; } .PreProc { color: #c000c0; } +.muRegEdi { color: #87ffd7; } .Special { color: #ff6060; } .LineNr { } .Constant { color: #008787; } +.muRegEsi { color: #87d787; } +.muRegEax { color: #875f00; } .Delimiter { color: #c000c0; } .muFunction { color: #af5f00; text-decoration: underline; } .muComment { color: #005faf; } @@ -75,24 +78,24 @@ if ('onhashchange' in window) { 17 18 fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) { 19 var text-storage: (stream byte 0x200) -20 var text/esi: (addr stream byte) <- address text-storage -21 load-sectors data-disk, 0/lba, 1/num-sectors, text +20 var text/esi: (addr stream byte) <- address text-storage +21 load-sectors data-disk, 0/lba, 1/num-sectors, text 22 -23 var word-count/eax: int <- word-count text +23 var word-count/eax: int <- word-count text 24 25 var result-storage: (stream byte 0x10) -26 var result/edi: (addr stream byte) <- address result-storage +26 var result/edi: (addr stream byte) <- address result-storage 27 write-int32-decimal result, word-count -28 store-sectors data-disk, 0/lba, 1/num-sectors, result +28 store-sectors data-disk, 0/lba, 1/num-sectors, result 29 } 30 -31 fn word-count in: (addr stream byte) -> _/eax: int { -32 var result/edi: int <- copy 0 +31 fn word-count in: (addr stream byte) -> _/eax: int { +32 var result/edi: int <- copy 0 33 { -34 var done?/eax: boolean <- stream-empty? in +34 var done?/eax: boolean <- stream-empty? in 35 compare done?, 0/false 36 break-if-!= -37 var g/eax: grapheme <- read-grapheme in +37 var g/eax: grapheme <- read-grapheme in 38 { 39 compare g, 0x20/space 40 break-if-!= -- cgit 1.4.1-2-gfad0