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


                                                        
                                                   
         
                             


                                                                         
                                                                                  
                                                                                  

                                                                                       
 
# Draw a character using the built-in font (GNU unifont)
#
# To build a disk image:
#   ./translate apps/ex4.mu        # emits code.img
# To run:
#   qemu-system-i386 code.img
#
# Expected output: letter 'A' in green near the top-left corner of screen

fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
  var dummy/eax: int <- draw-code-point screen, 0x41/A, 2/row, 1/col, 0xa/fg, 0/bg
  # wide glyph
#?   var dummy/eax: int <- draw-code-point screen, 0x1b/esc, 2/row, 1/col, 0xa/fg, 0/bg
}