diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-12-24 13:12:59 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-12-24 13:12:59 -0800 |
commit | 7ab55b3494f311fb9f4264fc01f9adc9f0ce3b15 (patch) | |
tree | bac079203fa8d23a9e432f5ae8332027530c40dc | |
parent | 5bbc33d8239c53b6f930cacfc416b92a614f5611 (diff) | |
download | mu-7ab55b3494f311fb9f4264fc01f9adc9f0ce3b15.tar.gz |
fix a regression from 3 commits and 12 days ago :/
Thanks Antonio D'Souza for reporting issue #51, which this fixes.
-rw-r--r-- | 517random.mu | 7 | ||||
-rw-r--r-- | apps/tile.mu | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/517random.mu b/517random.mu index 0e907442..1f75b068 100644 --- a/517random.mu +++ b/517random.mu @@ -9,3 +9,10 @@ fn next-random prev: int -> _/edi: int { next <- remainder next, m return next } + +fn remainder a: int, b: int -> _/eax: int { + var q/eax: int <- copy 0 + var r/edx: int <- copy 0 + q, r <- integer-divide a, b + return r +} diff --git a/apps/tile.mu b/apps/tile.mu index c7067e83..6ac49d39 100644 --- a/apps/tile.mu +++ b/apps/tile.mu @@ -308,10 +308,3 @@ fn render-tile-without-margin screen: (addr screen), _tile: (addr tile), start-x loop } } - -fn remainder a: int, b: int -> _/eax: int { - var q/eax: int <- copy 0 - var r/edx: int <- copy 0 - q, r <- integer-divide a, b - return r -} |