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 /517random.mu | |
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.
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 +} |