2021-03-28 04:52:16 +00:00
|
|
|
# Demo of floating-point support.
|
2021-03-16 04:59:08 +00:00
|
|
|
#
|
|
|
|
# To build a disk image:
|
2021-07-16 15:09:42 +00:00
|
|
|
# ./translate apps/ex8.mu # emits code.img
|
2021-03-16 04:59:08 +00:00
|
|
|
# To run:
|
2021-08-30 03:33:54 +00:00
|
|
|
# qemu-system-i386 code.img
|
|
|
|
# You shouldn't see any exceptions.
|
2021-02-11 08:12:08 +00:00
|
|
|
|
2021-03-28 00:47:23 +00:00
|
|
|
fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
|
2021-02-11 08:12:08 +00:00
|
|
|
var n/eax: int <- copy 0
|
|
|
|
var result/xmm0: float <- convert n
|
|
|
|
}
|