From 7363c6dfd3cf2104d7e3a0e814cde2d8b4f4e6ce Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 19 Jan 2021 22:17:05 -0800 Subject: 7537 - baremetal: start of cursor support --- baremetal/103grapheme.subx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'baremetal/103grapheme.subx') diff --git a/baremetal/103grapheme.subx b/baremetal/103grapheme.subx index b17f60a1..f854e03d 100644 --- a/baremetal/103grapheme.subx +++ b/baremetal/103grapheme.subx @@ -5,7 +5,7 @@ == code -draw-grapheme-on-real-screen: # g: grapheme, x: int, y: int, color: int +draw-grapheme-on-real-screen: # g: grapheme, x: int, y: int, color: int, background-color: int # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -45,14 +45,14 @@ draw-grapheme-on-real-screen: # g: grapheme, x: int, y: int, color: int 7c/jump-if-< break/disp8 # shift LSB from row-bitmap into carry flag (CF) c1 5/subop/shift-right-logical %ebx 1/imm8 - # if LSB, draw a pixel + # if LSB, draw a pixel in the given color { 73/jump-if-not-CF break/disp8 (pixel-on-real-screen %eax %edx *(ebp+0x14)) eb/jump $draw-grapheme-on-real-screen:continue/disp8 } - # otherwise draw a black pixel - (pixel-on-real-screen %eax %edx 0) + # otherwise use the background color + (pixel-on-real-screen %eax %edx *(ebp+0x18)) $draw-grapheme-on-real-screen:continue: # --x 48/decrement-eax -- cgit 1.4.1-2-gfad0