about summary refs log tree commit diff stats
path: root/vocabulary.md
Commit message (Expand)AuthorAgeFilesLines
* .Kartik Agaram2021-03-121-0/+4
* update vocabulary documentationKartik K. Agaram2021-03-081-162/+173
* 6658Kartik Agaram2020-07-181-6/+6
* 6618 - new docsKartik Agaram2020-07-061-0/+208
'/akkartik/mu/commit/baremetal/ex5.mu?h=hlt&id=0518944e379f343542c872a20d3d5a2aee744297'>0518944e ^
2998866b ^
0518944e ^



74f1512f ^

0518944e ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

                                                                        

                        
                                                   


                             
                                                           



                                                                   

                                                                                                                             
 
# Draw a single line of ASCII text using the built-in font (GNU unifont)
# Also demonstrates bounds-checking _before_ drawing.
#
# To build a disk image:
#   ./translate ex5.mu             # emits disk.img
# To run:
#   qemu-system-i386 disk.img
# Or:
#   bochs -f bochsrc               # bochsrc loads disk.img
#
# Expected output: text in green near the top-left corner of screen

fn main {
  var dummy/eax: int <- draw-text-rightward 0/screen, "hello from baremetal Mu!", 0x10/x, 0x400/xmax, 0x10/y, 0xa/color
  dummy <- draw-text-rightward 0/screen, "you shouldn't see this", 0x10/x, 0xa0/xmax, 0x30/y, 0x3/color  # xmax is too narrow
}