about summary refs log blame commit diff stats
path: root/baremetal/501draw-text.mu
blob: 61b2d9cac08ca884ee6f3b713d27262e7e7fa5d1 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                                                                   
   



                                               
                             


        
fn draw-text-rightward screen: (addr screen), text: (addr array byte), x: int, y: int, color: int {
  var stream-storage: (stream byte 0x100)
  var stream/esi: (addr stream byte) <- address stream-storage
  write stream, text
  {
    var g/eax: grapheme <- read-grapheme stream
    compare g, 0xffffffff  # end-of-file
    break-if-=
    draw-grapheme screen, g, x, y, color
    add-to x, 8  # font-width
    loop
  }
}