1 # Demo of floating-point support. 2 # 3 # To build a disk image: 4 # ./translate ex8.mu # emits disk.img 5 # To run: 6 # bochs -f bochsrc # bochsrc loads disk.img 7 # Set a breakpoint at 0x7c00 and start stepping. 8 9 fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) { 10 var n/eax: int <- copy 0 11 var result/xmm0: float <- convert n 12 }