about summary refs log tree commit diff stats
path: root/translate_mu_debug
Commit message (Expand)AuthorAgeFilesLines
* 6400Kartik Agaram2020-05-241-0/+8
<vc@akkartik.com> 2021-01-12 00:20:22 -0800 committer Kartik Agaram <vc@akkartik.com> 2021-01-12 00:20:22 -0800 7501 - baremetal: draw text within a rectangle' href='/akkartik/mu/commit/baremetal/502manhattan-line.mu?h=hlt&id=bb0e67a308922fc1a1a6972b00fcc37909a028ce'>bb0e67a3 ^
6e36ce06 ^
bb0e67a3 ^



6e36ce06 ^
bb0e67a3 ^




6e36ce06 ^
bb0e67a3 ^



6e36ce06 ^
bb0e67a3 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28




                                                                           

 
                                                                             



                           
                                    




                  
                                                                           



                           
                                    



                  
fn draw-box-on-real-screen x1: int, y1: int, x2: int, y2: int, color: int {
  draw-horizontal-line-on-real-screen x1, x2, y1, color
  draw-vertical-line-on-real-screen x1, y1, y2, color
  draw-horizontal-line-on-real-screen x1, x2, y2, color
  draw-vertical-line-on-real-screen x2, y1, y2, color
}

fn draw-horizontal-line-on-real-screen x1: int, x2: int, y: int, color: int {
  var x/eax: int <- copy x1
  {
    compare x, x2
    break-if->=
    pixel-on-real-screen x, y, color
    x <- increment
    loop
  }
}

fn draw-vertical-line-on-real-screen x: int, y1: int, y2: int, color: int {
  var y/eax: int <- copy y1
  {
    compare y, y2
    break-if->=
    pixel-on-real-screen x, y, color
    y <- increment
    loop
  }
}