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

                        
                                                   
         
                                                           
                                                
 
                                                                                  


                                     
# Demo of floating-point support.
#
# To build a disk image:
#   ./translate 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
}