summary refs log tree commit diff stats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* fixed directory testhut2009-12-141-0/+3
|
* updated / added testshut2009-12-135-4/+213
|
* clean ups, commentshut2009-12-132-5/+8
|
* clean upshut2009-12-113-8/+5
|
* run all tests with a single executablehut2009-12-111-0/+5
|
* Reorganization of gui/widget hierarchy and directory structurehut2009-12-111-1/+1
|
* restructurationshut2009-12-111-2/+2
|
* moved/fixed testshut2009-12-117-1/+209
|
* fixed directory testhut2009-12-061-19/+0
|
* History Object + Test Casehut2009-12-051-0/+44
|
* random improvementshut2009-11-291-17/+18
|
* more VROOMhut2009-11-272-12/+22
|
* implemented more stuffhut2009-11-252-9/+10
|
* corrected test, added some stuffhut2009-11-242-5/+50
|
* stuffhut2009-11-241-1/+2
|
* better implementation of directories/fileshut2009-11-243-25/+54
|
* test cases for directory.pyhut2009-11-233-0/+68
id='n16' href='#n16'>16 17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33




                                     





                                 


                               
                                       

                             
                                           
                                 
                                  
                                 
                                  
 
                                                        



                                
                                       
                             
                             

                       
# Test some primitives for text-mode.
#
# To run:
#   $ ./translate_mu apps/tui.mu
#   $ ./a.elf

fn main -> exit-status/ebx: int {
  var nrows/eax: int <- copy 0
  var ncols/ecx: int <- copy 0
  nrows, ncols <- screen-size
  enable-screen-grid-mode
  move-cursor-on-screen 5, 35
  start-color-on-screen 1, 0x7a
  start-blinking-on-screen
  print-string-to-screen "Hello world!"
  reset-formatting-on-screen
  move-cursor-on-screen 6, 35
  print-string-to-screen "tty dimensions: "
  print-int32-hex-to-screen nrows
  print-string-to-screen " rows, "
  print-int32-hex-to-screen ncols
  print-string-to-screen " rows\n"

  print-string-to-screen "press a key to see its code: "
  enable-keyboard-immediate-mode
  var x/eax: byte <- read-key
  enable-keyboard-type-mode
  enable-screen-type-mode
  print-string-to-screen "You pressed "
  print-int32-hex-to-screen x
  print-string-to-screen "\n"
  exit-status <- copy 0
}