summary refs log tree commit diff stats
path: root/doc/colorschemes.txt
Commit message (Expand)AuthorAgeFilesLines
* updated doc/colorschemes.txthut2010-12-221-15/+6
* Changed default config dir to $XDG_CONFIG_HOME/rangerhut2010-08-281-2/+2
* doc/colorschemes: ugh, its no logical but bitwise OR!hut2010-03-171-1/+1
* standardized formatting of headings in doc/hut2010-03-121-6/+16
* added documentation on how colorschemes workhut2010-03-121-0/+91
tik/mu/commit/ex10.mu?h=hlt&id=49a99383330f1d0d5dfb2887ad7e9fd782680c3d'>49a99383 ^
f7746778 ^
49a99383 ^
f7746778 ^
49a99383 ^




7bf8adb8 ^
49a99383 ^














1a43d12b ^
49a99383 ^


1a43d12b ^
49a99383 ^


1a43d12b ^
49a99383 ^



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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
                        

                        
                                                   
         
                             
     
                                                           




                                                                       
                                                                                  














                                                         
                                                                                                                           


                                  
                                                                                                                      


                                  
                                                                                                                      



        
# Demo of mouse support.
#
# To build a disk image:
#   ./translate ex10.mu            # emits code.img
# To run:
#   qemu-system-i386 code.img
# Or:
#   bochs -f bochsrc               # bochsrc loads code.img
#
# Expected output:
#   Values between -256 and +255 as you move the mouse over the window.
#   You might need to click on the window once.

fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
  # repeatedly print out mouse driver results if non-zero
  $main:event-loop: {
    var dx/eax: int <- copy 0
    var dy/ecx: int <- copy 0
    dx, dy <- read-mouse-event
    {
      compare dx, 0
      break-if-!=
      compare dy, 0
      break-if-!=
      loop $main:event-loop
    }
    {
      var dummy1/eax: int <- copy 0
      var dummy2/ecx: int <- copy 0
      dummy1, dummy2 <- draw-text-wrapping-right-then-down-over-full-screen screen, "         ", 0/x, 0x10/y, 0x31/fg, 0/bg
    }
    {
      var dummy/ecx: int <- copy 0
      dx, dummy <- draw-int32-decimal-wrapping-right-then-down-over-full-screen screen, dx, 0/x, 0x10/y, 0x31/fg, 0/bg
    }
    {
      var dummy/eax: int <- copy 0
      dummy, dy <- draw-int32-decimal-wrapping-right-then-down-over-full-screen screen, dy, 5/x, 0x10/y, 0x31/fg, 0/bg
    }
    loop
  }
}