diff options
-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 -} |