This commit is contained in:
parent
d91595e31c
commit
96b6d623a6
|
@ -140,9 +140,9 @@ if ('onhashchange' in window) {
|
|||
<span id="L81" class="LineNr"> 81 </span>
|
||||
<span id="L82" class="LineNr"> 82 </span><span class="muComment"># special routines for multiplying and dividing fixed-point numbers</span>
|
||||
<span id="L83" class="LineNr"> 83 </span>
|
||||
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot-fixed.mu.html#L84'>multiply-fixed</a></span> a: int, b: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
|
||||
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy a
|
||||
<span id="L86" class="LineNr"> 86 </span> result <span class="Special"><-</span> multiply b
|
||||
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot-fixed.mu.html#L84'>multiply-fixed</a></span> a-f: int, b-f: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
|
||||
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy a-f
|
||||
<span id="L86" class="LineNr"> 86 </span> result <span class="Special"><-</span> multiply b-f
|
||||
<span id="L87" class="LineNr"> 87 </span> <span class="Delimiter">{</span>
|
||||
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">break-if-not-overflow</span>
|
||||
<span id="L89" class="LineNr"> 89 </span> <a href='501draw-text.mu.html#L481'>abort</a> <span class="Constant">"multiply-fixed: overflow"</span>
|
||||
|
|
|
@ -81,9 +81,9 @@ fn test-fixed-conversion {
|
|||
|
||||
# special routines for multiplying and dividing fixed-point numbers
|
||||
|
||||
fn multiply-fixed a: int, b: int -> _/eax: int {
|
||||
var result/eax: int <- copy a
|
||||
result <- multiply b
|
||||
fn multiply-fixed a-f: int, b-f: int -> _/eax: int {
|
||||
var result/eax: int <- copy a-f
|
||||
result <- multiply b-f
|
||||
{
|
||||
break-if-not-overflow
|
||||
abort "multiply-fixed: overflow"
|
||||
|
|
Loading…
Reference in New Issue