From 1b09418c60cd48d021f95a8c3f248a33421d776f Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 22 Jan 2021 20:57:29 -0800 Subject: 7542 - baremetal: support cursor on a grapheme So far we've drawn a space implicitly at the cursor. Now I allow drawing an arbitrary grapheme when drawing the cursor. But the caller has to specify what to draw. (The alternative would be for layer 103 to track every single grapheme on screen along with its color and any other future attributes, just to be able to paint and unpaint the background for a single character.) I've modified existing helpers for drawing multiple graphemes to always clear the final cursor position after they finish drawing. That seems reasonable for terminal-like applications. Applications that need to control the screen in a more random-access manner will need to track the grapheme at the cursor for themselves. --- baremetal/400.mu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'baremetal/400.mu') diff --git a/baremetal/400.mu b/baremetal/400.mu index 8db62837..7ebd90ae 100644 --- a/baremetal/400.mu +++ b/baremetal/400.mu @@ -2,7 +2,7 @@ sig pixel-on-real-screen x: int, y: int, color: int sig draw-grapheme-on-real-screen g: grapheme, x: int, y: int, color: int, background-color: int sig cursor-position-on-real-screen -> _/eax: int, _/ecx: int -sig set-cursor-position-on-real-screen x: int, y: int +sig set-cursor-position-on-real-screen x: int, y: int, g: grapheme # keyboard sig read-key kbd: (addr keyboard) -> _/eax: byte -- cgit 1.4.1-2-gfad0