This commit is contained in:
Kartik Agaram 2021-01-09 08:11:52 -08:00
parent efa6c5f44e
commit 5efca3695a
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 407print-int32-decimal-right-justified.mu</title>
<title>Mu - 407right-justify.mu</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="syntax" content="none">
@ -54,10 +54,10 @@ if ('onhashchange' in window) {
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/main/407print-int32-decimal-right-justified.mu'>https://github.com/akkartik/mu/blob/main/407print-int32-decimal-right-justified.mu</a>
<a href='https://github.com/akkartik/mu/blob/main/407right-justify.mu'>https://github.com/akkartik/mu/blob/main/407right-justify.mu</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># print 'n' with enough leading spaces to be right-justified in 'width'</span>
<span id="L2" class="LineNr"> 2 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='407print-int32-decimal-right-justified.mu.html#L2'>print-int32-decimal-right-justified</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), n: int, _width: int <span class="Delimiter">{</span>
<span id="L2" class="LineNr"> 2 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='407right-justify.mu.html#L2'>right-justify</a></span> <a href='405screen.mu.html#L9'>screen</a>: (addr <a href='405screen.mu.html#L9'>screen</a>), n: int, _width: int <span class="Delimiter">{</span>
<span id="L3" class="LineNr"> 3 </span> <span class="muComment"># tweak things for negative numbers</span>
<span id="L4" class="LineNr"> 4 </span> <span class="PreProc">var</span> n-width/<span class="Constant">eax</span>: int <span class="SpecialChar">&lt;-</span> <a href='311decimal-int.subx.html#L312'>decimal-size</a> n
<span id="L5" class="LineNr"> 5 </span> <span class="PreProc">var</span> width/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy _width