Rev 126 | Blame | Compare with Previous | Last modification | View Log | Download
# file opened: po_display.asm1 0000 ; DISPLAY options2 0000 ; /D - out only in Decimal3 0000 ; /H - out only in Hexadecimal4 0000 ; /A - out both in Hexadecimal and Decimal5 00006 0000 ;; Example with DISPLAY directive description7 00008 0000 ORG 100h9 0100 TESTLABEL:10 0100 ;...some code...11 0100 C9 RET> --the some program-- by me12 0101 DISPLAY "--the some program-- by me"> TESTLABEL address is:0x0100, 25613 0101 DISPLAY "TESTLABEL address is:",/A,TESTLABEL14 0101 ~ /*15 0101 ~ will output to the console strings:16 0101 ~ > --the some program-- by me17 0101 ~ > TESTLABEL address is:0x100, 25618 0101 ~ */19 010120 0101 ;; Part of example in LUA chapter of documentation (modified to pin date to fixed one)21 0101 LUA22 0101 ~ -- Creates define "TIME" with current time23 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 pass25 0101 ~ sj.insert_define("TIME", '"' .. datetime .. '"')26 0101 ENDLUA27 0101> Build time: 1982-04-23 03:14:1528 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 pass32 0101 ~ */33 010134 0101 ;; Non-documentation manual tests of DISPLAY35 0101> 0x0100 | 256 | 0x0100 | 0x0100 | 0x0100 | 0x0100, 256 | 0x0100 |s: 0x10036 0101 DISPLAY 0x100, " | ", /D, 0x100, " | ", 0x100, " | ", /H, 0x100, " | ", 0x100, " | ", /A, 0x100, " | ", 0x100, " |s: ", "0x100"> 0xFFFFFFFE | 4294967294 | 0xFFFFFFFE | 0xFFFFFFFE | 0xFFFFFFFE | 0xFFFFFFFE, 4294967294 | 0xFFFFFFFE |s: -237 0101 DISPLAY -2, " | ", /D, -2, " | ", -2, " | ", /H, -2, " | ", -2, " | ", /A, -2, " | ", -2, " |s: ", "-2"> 0xFF0000 | 16711680 | 0xFF0000 | 0xFF0000 | 0xFF0000 | 0xFF0000, 16711680 | 0xFF0000 |s: 0xFF000038 0101 DISPLAY 0xFF0000, " | ", /D, 0xFF0000, " | ", 0xFF0000, " | ", /H, 0xFF0000, " | ", 0xFF0000, " | ", /A, 0xFF0000, " | ", 0xFF0000, " |s: ", "0xFF0000"> 0xFF000000 | 4278190080 | 0xFF000000 | 0xFF000000 | 0xFF000000 | 0xFF000000, 4278190080 | 0xFF000000 |s: 0xFF<<2439 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<<2040 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: 0x10044 0101 ~ > 0xFFFFFFFE | 4294967294 | 0xFFFFFFFE | 0xFFFFFFFE | 0xFFFFFFFE | 0xFFFFFFFE, 4294967294 | 0xFFFFFFFE |s: -245 0101 ~ > 0xFF0000 | 16711680 | 0xFF0000 | 0xFF0000 | 0xFF0000 | 0xFF0000, 16711680 | 0xFF0000 |s: 0xFF000046 0101 ~ > 0xFF000000 | 4278190080 | 0xFF000000 | 0xFF000000 | 0xFF000000 | 0xFF000000, 4278190080 | 0xFF000000 |s: 0xFF<<2447 0101 ~ > 0xFF00000 | 267386880 | 0xFF00000 | 0xFF00000 | 0xFF00000 | 0xFF00000, 267386880 | 0xFF00000 |s: 0xFF<<2048 0101 ~ */49 010150 0101 ;; testing error reportingpo_display.asm(51): error: [DISPLAY] Expression expected51 0101 DISPLAYpo_display.asm(52): error: [DISPLAY] Syntax error, unknown option: /X, 152 0101 DISPLAY /X, 1po_display.asm(53): error: Unexpected: 153 0101 DISPLAY /H 1po_display.asm(54): error: [DISPLAY] Syntax error: DISPLAY ))((%*%!@)54 0101 DISPLAY ))((%*%!@)55 0101# file closed: po_display.asmValue Label------ - -----------------------------------------------------------0x0100 TESTLABEL