diff options
Diffstat (limited to '517random.mu')
-rw-r--r-- | 517random.mu | 7 |
1 files changed, 7 insertions, 0 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 +} |