diff options
author | Kartik Agaram <vc@akkartik.com> | 2021-01-09 19:01:13 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2021-01-09 19:01:13 -0800 |
commit | 3de4d557d5e4686e5be589a8c61b4246f6bab549 (patch) | |
tree | dcf5f8549cfcded24da34bbb29819821187362be /baremetal/501draw-text-rightward.mu | |
parent | 57e4978eac1e5deb544b07db77ac382433d35d03 (diff) | |
download | mu-3de4d557d5e4686e5be589a8c61b4246f6bab549.tar.gz |
7493
Diffstat (limited to 'baremetal/501draw-text-rightward.mu')
-rw-r--r-- | baremetal/501draw-text-rightward.mu | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/baremetal/501draw-text-rightward.mu b/baremetal/501draw-text-rightward.mu new file mode 100644 index 00000000..61b2d9ca --- /dev/null +++ b/baremetal/501draw-text-rightward.mu @@ -0,0 +1,13 @@ +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 + } +} |