?login_element?

Subversion Repositories NedoOS

Rev

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

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

Value    Label
------ - -----------------------------------------------------------
0x0100   TESTLABEL