about summary refs log tree commit diff stats
path: root/cheatsheet.pdf
Commit message (Collapse)AuthorAgeFilesLines
* 5485 - promote SubX to top-levelKartik Agaram2019-07-271-0/+0
ik K. Agaram <vc@akkartik.com> 2015-05-11 12:00:50 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2015-05-11 12:09:50 -0700 1345' href='/akkartik/mu/commit/screen.mu?h=hlt&id=d2244a2f117618df541c52a1f7ec5d0fed8bcb7a'>d2244a2f ^
1ead3562 ^
290fe117 ^
01ce563d ^
08f4628e ^
01ce563d ^




08f4628e ^
01ce563d ^












290fe117 ^
a63ebc92 ^
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
                                                              
 

                                                                            
          
              
                                               
                      




                                                     
                      












                                          
               
 
# example program: managing the display using 'screen' objects

# The zero screen below means 'use the real screen'. Tests can also use fake
# screens.
def main [
  open-console
  clear-screen null/screen  # non-scrolling app
  10:char <- copy 97/a
  print null/screen, 10:char/a, 1/red, 2/green
  1:num/raw, 2:num/raw <- cursor-position null/screen
  wait-for-event null/console
  clear-screen null/screen
  move-cursor null/screen, 0/row, 4/column
  10:char <- copy 98/b
  print null/screen, 10:char
  wait-for-event null/console
  move-cursor null/screen, 0/row, 0/column
  clear-line null/screen
  wait-for-event null/console
  cursor-down null/screen
  wait-for-event null/console
  cursor-right null/screen
  wait-for-event null/console
  cursor-left null/screen
  wait-for-event null/console
  cursor-up null/screen
  wait-for-event null/console
  close-console
]