From 2812e206085e8de6e40d1af1fa2e41bb57a58021 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 22 Feb 2021 23:59:35 -0800 Subject: 7793 - baremetal/shell: menu --- baremetal/501draw-text.mu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'baremetal/501draw-text.mu') diff --git a/baremetal/501draw-text.mu b/baremetal/501draw-text.mu index b17b54a3..9b207361 100644 --- a/baremetal/501draw-text.mu +++ b/baremetal/501draw-text.mu @@ -130,12 +130,12 @@ fn draw-text-rightward-over-full-screen screen: (addr screen), text: (addr array return result } -fn draw-text-rightward-from-cursor screen: (addr screen), text: (addr array byte), xmax: int, color: int, background-color: int -> _/eax: int { +fn draw-text-rightward-from-cursor screen: (addr screen), text: (addr array byte), xmax: int, color: int, background-color: int { var cursor-x/eax: int <- copy 0 var cursor-y/ecx: int <- copy 0 cursor-x, cursor-y <- cursor-position screen - var result/eax: int <- draw-text-rightward screen, text, cursor-x, xmax, cursor-y, color, background-color - return result + cursor-x <- draw-text-rightward screen, text, cursor-x, xmax, cursor-y, color, background-color + set-cursor-position screen, cursor-x, cursor-y } fn render-grapheme screen: (addr screen), g: grapheme, xmin: int, ymin: int, xmax: int, ymax: int, x: int, y: int, color: int, background-color: int -> _/eax: int, _/ecx: int { -- cgit 1.4.1-2-gfad0