?login_element?

Subversion Repositories NedoOS

Rev

Rev 126 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ; DISPLAY options
  2. ; /D - out only in Decimal
  3. ; /H - out only in Hexadecimal
  4. ; /A - out both in Hexadecimal and Decimal
  5.  
  6. ;; Example with DISPLAY directive description
  7.  
  8.     ORG 100h
  9. TESTLABEL:
  10.     ;...some code...
  11.     RET
  12.     DISPLAY "--the some program-- by me"
  13.     DISPLAY "TESTLABEL address is:",/A,TESTLABEL
  14. /*
  15. will output to the console strings:
  16. > --the some program-- by me
  17. > TESTLABEL address is:0x100, 256
  18. */
  19.  
  20. ;; Part of example in LUA chapter of documentation (modified to pin date to fixed one)
  21.     LUA
  22.         -- Creates define "TIME" with current time
  23.         datetime = os.date("%Y-%m-%d %H:%M:%S")
  24.         datetime = "1982-04-23 03:14:15"    -- set it to fixed string for CI tests to pass
  25.         sj.insert_define("TIME", '"' .. datetime .. '"')
  26.     ENDLUA
  27.  
  28.     DISPLAY "Build time: ", TIME
  29. /*
  30. will output to the console strings:
  31. Build time: <current date+time>  --> not current, but fixed one, for automated tests to pass
  32. */
  33.  
  34. ;; Non-documentation manual tests of DISPLAY
  35.  
  36.     DISPLAY 0x100, " | ", /D, 0x100, " | ", 0x100, " | ", /H, 0x100, " | ", 0x100, " | ", /A, 0x100, " | ", 0x100, " |s: ", "0x100"
  37.     DISPLAY -2, " | ", /D, -2, " | ", -2, " | ", /H, -2, " | ", -2, " | ", /A, -2, " | ", -2, " |s: ", "-2"
  38.     DISPLAY 0xFF0000, " | ", /D, 0xFF0000, " | ", 0xFF0000, " | ", /H, 0xFF0000, " | ", 0xFF0000, " | ", /A, 0xFF0000, " | ", 0xFF0000, " |s: ", "0xFF0000"
  39.     DISPLAY 0xFF<<24, " | ", /D, 0xFF<<24, " | ", 0xFF<<24, " | ", /H, 0xFF<<24, " | ", 0xFF<<24, " | ", /A, 0xFF<<24, " | ", 0xFF<<24, " |s: ", "0xFF<<24"
  40.     DISPLAY 0xFF<<20, " | ", /D, 0xFF<<20, " | ", 0xFF<<20, " | ", /H, 0xFF<<20, " | ", 0xFF<<20, " | ", /A, 0xFF<<20, " | ", 0xFF<<20, " |s: ", "0xFF<<20"
  41. /*
  42. will output to the console strings:
  43. > 0x0100 | 256 | 0x0100 | 0x0100 | 0x0100 | 0x0100, 256 | 0x0100 |s: 0x100
  44. > 0xFFFFFFFE | 4294967294 | 0xFFFFFFFE | 0xFFFFFFFE | 0xFFFFFFFE | 0xFFFFFFFE, 4294967294 | 0xFFFFFFFE |s: -2
  45. > 0xFF0000 | 16711680 | 0xFF0000 | 0xFF0000 | 0xFF0000 | 0xFF0000, 16711680 | 0xFF0000 |s: 0xFF0000
  46. > 0xFF000000 | 4278190080 | 0xFF000000 | 0xFF000000 | 0xFF000000 | 0xFF000000, 4278190080 | 0xFF000000 |s: 0xFF<<24
  47. > 0xFF00000 | 267386880 | 0xFF00000 | 0xFF00000 | 0xFF00000 | 0xFF00000, 267386880 | 0xFF00000 |s: 0xFF<<20
  48. */
  49.  
  50. ;; testing error reporting
  51.     DISPLAY
  52.     DISPLAY /X, 1
  53.     DISPLAY /H 1
  54.     DISPLAY ))((%*%!@)
  55.