diff options
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/browse/10.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/11.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/12.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/13.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/14.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/15-headers-broken.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/16-screen-state-broken.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/17-file-state-broken/screen-position-state.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/19/screen-position-state.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/20/screen-position-state.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/21/screen-position-state.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/6.mu | 2 | ||||
-rw-r--r-- | prototypes/browse/7.mu | 2 | ||||
-rw-r--r-- | prototypes/browse/8-multiple-pages.mu | 6 | ||||
-rw-r--r-- | prototypes/browse/9-bold.mu | 6 |
15 files changed, 41 insertions, 41 deletions
diff --git a/prototypes/browse/10.mu b/prototypes/browse/10.mu index 4e79aa65..e22f689f 100644 --- a/prototypes/browse/10.mu +++ b/prototypes/browse/10.mu @@ -36,14 +36,14 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -52,7 +52,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/11.mu b/prototypes/browse/11.mu index 19a65353..1fa9e980 100644 --- a/prototypes/browse/11.mu +++ b/prototypes/browse/11.mu @@ -34,14 +34,14 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -50,7 +50,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/12.mu b/prototypes/browse/12.mu index e2f0a9c8..49be7ae8 100644 --- a/prototypes/browse/12.mu +++ b/prototypes/browse/12.mu @@ -33,14 +33,14 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -49,7 +49,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/13.mu b/prototypes/browse/13.mu index 22a5c0d7..895f959b 100644 --- a/prototypes/browse/13.mu +++ b/prototypes/browse/13.mu @@ -33,14 +33,14 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -49,7 +49,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/14.mu b/prototypes/browse/14.mu index 29a92489..6168b69c 100644 --- a/prototypes/browse/14.mu +++ b/prototypes/browse/14.mu @@ -31,14 +31,14 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -47,7 +47,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/15-headers-broken.mu b/prototypes/browse/15-headers-broken.mu index 7b152bbc..5644f52d 100644 --- a/prototypes/browse/15-headers-broken.mu +++ b/prototypes/browse/15-headers-broken.mu @@ -38,7 +38,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r # r->start-of-line? = true @@ -48,7 +48,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -57,7 +57,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/16-screen-state-broken.mu b/prototypes/browse/16-screen-state-broken.mu index d80d8375..7ab40060 100644 --- a/prototypes/browse/16-screen-state-broken.mu +++ b/prototypes/browse/16-screen-state-broken.mu @@ -127,14 +127,14 @@ fn init-screen-position-state self: (addr screen-position-state), nrows: int, nc # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var dest/eax: (addr int) <- copy 0 # self->nrows = nrows # self->ncols = ncols # self->toprow = top-margin # self->botrow = nrows # self->leftcol = page-margin - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width # start-drawing(self) } @@ -156,7 +156,7 @@ fn next-line self: (addr screen-position-state) { fn next-page self: (addr screen-position-state) { # self->leftcol = self->rightcol + 5 - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width } fn done-drawing? self: (addr screen-position-state) -> result/eax: boolean { diff --git a/prototypes/browse/17-file-state-broken/screen-position-state.mu b/prototypes/browse/17-file-state-broken/screen-position-state.mu index af623d16..e5767de8 100644 --- a/prototypes/browse/17-file-state-broken/screen-position-state.mu +++ b/prototypes/browse/17-file-state-broken/screen-position-state.mu @@ -13,14 +13,14 @@ fn init-screen-position-state self: (addr screen-position-state), nrows: int, nc # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var dest/eax: (addr int) <- copy 0 # self->nrows = nrows # self->ncols = ncols # self->toprow = top-margin # self->botrow = nrows # self->leftcol = page-margin - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width # start-drawing(self) } @@ -42,7 +42,7 @@ fn next-line self: (addr screen-position-state) { fn next-page self: (addr screen-position-state) { # self->leftcol = self->rightcol + 5 - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width } fn done-drawing? self: (addr screen-position-state) -> result/eax: boolean { diff --git a/prototypes/browse/19/screen-position-state.mu b/prototypes/browse/19/screen-position-state.mu index 2d2a675f..690cb60d 100644 --- a/prototypes/browse/19/screen-position-state.mu +++ b/prototypes/browse/19/screen-position-state.mu @@ -13,7 +13,7 @@ fn init-screen-position-state _self: (addr screen-position-state) { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width # page-height (temporary) var self/esi: (addr screen-position-state) <- copy _self var nrows/eax: int <- copy 0 @@ -35,9 +35,9 @@ fn init-screen-position-state _self: (addr screen-position-state) { # self->leftcol = page-margin dest <- get self, leftcol copy-to *dest, 5 # left-margin - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width dest <- get self, rightcol - copy-to *dest, 0xa # left-margin + text-width + copy-to *dest, 0xa # left-margin + page-width # start-drawing self } diff --git a/prototypes/browse/20/screen-position-state.mu b/prototypes/browse/20/screen-position-state.mu index d1a7bdff..124505cb 100644 --- a/prototypes/browse/20/screen-position-state.mu +++ b/prototypes/browse/20/screen-position-state.mu @@ -13,7 +13,7 @@ fn init-screen-position-state _self: (addr screen-position-state) { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width # page-height (temporary) var self/esi: (addr screen-position-state) <- copy _self var nrows/eax: int <- copy 0 @@ -35,9 +35,9 @@ fn init-screen-position-state _self: (addr screen-position-state) { # self->leftcol = page-margin dest <- get self, leftcol copy-to *dest, 5 # left-margin - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width dest <- get self, rightcol - copy-to *dest, 0x45 # left-margin + text-width + copy-to *dest, 0x45 # left-margin + page-width # start-drawing self } diff --git a/prototypes/browse/21/screen-position-state.mu b/prototypes/browse/21/screen-position-state.mu index 8864cbe8..bb0adc97 100644 --- a/prototypes/browse/21/screen-position-state.mu +++ b/prototypes/browse/21/screen-position-state.mu @@ -13,7 +13,7 @@ fn init-screen-position-state _self: (addr screen-position-state) { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var self/esi: (addr screen-position-state) <- copy _self var nrows/eax: int <- copy 0 var ncols/ecx: int <- copy 0 @@ -34,9 +34,9 @@ fn init-screen-position-state _self: (addr screen-position-state) { # self->leftcol = page-margin dest <- get self, leftcol copy-to *dest, 5 # left-margin - # self->rightcol = self->leftcol + text-width + # self->rightcol = self->leftcol + page-width dest <- get self, rightcol - copy-to *dest, 0x45 # left-margin + text-width + copy-to *dest, 0x45 # left-margin + page-width # start-drawing self } diff --git a/prototypes/browse/6.mu b/prototypes/browse/6.mu index 520a13fd..9685ab43 100644 --- a/prototypes/browse/6.mu +++ b/prototypes/browse/6.mu @@ -15,7 +15,7 @@ fn main args: (addr array (addr array byte)) -> exit-status/ebx: int { } fn render in: (addr buffered-file), nrows: int, ncols: int { - # hardcoded parameter: text-width + # hardcoded parameter: page-width var toprow/eax: int <- copy 2 var botrow/ecx: int <- copy toprow botrow <- add nrows diff --git a/prototypes/browse/7.mu b/prototypes/browse/7.mu index b319d4a2..7611ae25 100644 --- a/prototypes/browse/7.mu +++ b/prototypes/browse/7.mu @@ -19,7 +19,7 @@ fn main args: (addr array (addr array byte)) -> exit-status/ebx: int { # decide how to lay out pages on screen fn render in: (addr buffered-file), nrows: int, ncols: int { - # hardcoded parameter: text-width + # hardcoded parameter: page-width var toprow/eax: int <- copy 2 var botrow/ecx: int <- copy toprow botrow <- add 0x20 diff --git a/prototypes/browse/8-multiple-pages.mu b/prototypes/browse/8-multiple-pages.mu index 009a9aeb..120ef872 100644 --- a/prototypes/browse/8-multiple-pages.mu +++ b/prototypes/browse/8-multiple-pages.mu @@ -27,12 +27,12 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters { compare rightcol, ncols break-if->= @@ -40,7 +40,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } diff --git a/prototypes/browse/9-bold.mu b/prototypes/browse/9-bold.mu index 5236365f..a0dd6676 100644 --- a/prototypes/browse/9-bold.mu +++ b/prototypes/browse/9-bold.mu @@ -31,14 +31,14 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { # hardcoded parameters: # top-margin # page-margin - # text-width + # page-width var _r: render-state var r/edi: (addr render-state) <- address _r var toprow/eax: int <- copy 2 # top-margin var botrow/ecx: int <- copy nrows var leftcol/edx: int <- copy 5 # page-margin var rightcol/ebx: int <- copy leftcol - rightcol <- add 0x40 # text-width = 64 characters + rightcol <- add 0x40 # page-width = 64 characters start-color 0xec, 7 # 236 = darkish gray { compare rightcol, ncols @@ -47,7 +47,7 @@ fn render in: (addr buffered-file), nrows: int, ncols: int { leftcol <- copy rightcol leftcol <- add 5 # page-margin rightcol <- copy leftcol - rightcol <- add 0x40 # text-width + rightcol <- add 0x40 # page-width loop } } |