about summary refs log blame commit diff stats
path: root/apps/ex8.mu
blob: 91d2eabc4a1439cf484c83b7388129c8800a3829 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                 

                        
                                                   
         

                                   
 
                                                                                  


                                     
# Demo of floating-point support.
#
# To build a disk image:
#   ./translate apps/ex8.mu        # emits code.img
# To run:
#   qemu-system-i386 code.img
# You shouldn't see any exceptions.

fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
  var n/eax: int <- copy 0
  var result/xmm0: float <- convert n
}