diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-07-16 08:09:42 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-07-16 08:28:56 -0700 |
commit | 44d26b77c45668c9b0c99894a4294cec004361fe (patch) | |
tree | 68a5dcd4971873efd4ce184e9bf9a531c2161813 /apps/ex8.mu | |
parent | ac45f097153afd3a89f43886e4124c5b2c26b98a (diff) | |
download | mu-44d26b77c45668c9b0c99894a4294cec004361fe.tar.gz |
.
Diffstat (limited to 'apps/ex8.mu')
-rw-r--r-- | apps/ex8.mu | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/ex8.mu b/apps/ex8.mu new file mode 100644 index 00000000..c5e695ed --- /dev/null +++ b/apps/ex8.mu @@ -0,0 +1,12 @@ +# Demo of floating-point support. +# +# To build a disk image: +# ./translate apps/ex8.mu # emits code.img +# To run: +# bochs -f bochsrc # bochsrc loads code.img +# Set a breakpoint at 0x7c00 and start stepping. + +fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) { + var n/eax: int <- copy 0 + var result/xmm0: float <- convert n +} |