From 11bce44253532e4de0f6972a78e1f14e11a8e5a4 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Thu, 12 Jan 2017 12:27:32 -0500 Subject: [PATCH] more samples --- samples/hello4.asm | 29 +++++++++++++++++++++++++ samples/hello4.lst | 50 +++++++++++++++++++++++++++++++++++++++++++ samples/hello4.obj | Bin 0 -> 155 bytes samples/relative.asm | 37 ++++++++++++++++++++++++++++++++ samples/relative.lst | 50 +++++++++++++++++++++++++++++++++++++++++++ samples/relative.obj | Bin 0 -> 249 bytes 6 files changed, 166 insertions(+) create mode 100644 samples/hello4.asm create mode 100644 samples/hello4.lst create mode 100644 samples/hello4.obj create mode 100644 samples/relative.asm create mode 100644 samples/relative.lst create mode 100644 samples/relative.obj diff --git a/samples/hello4.asm b/samples/hello4.asm new file mode 100644 index 0000000..76abd60 --- /dev/null +++ b/samples/hello4.asm @@ -0,0 +1,29 @@ + + ; + ; 2-segment, 2 module code. + ; with intersegment linkage. + + include 'hello.macros' + + macdelim { + + module code + CODE + extern text + pea #^text + pea #text + _WriteLine + + rtl + ends + endmod + + module data +XDATA SECTION + public text +text + pstr {'hello, world'} + ends + endmod + + diff --git a/samples/hello4.lst b/samples/hello4.lst new file mode 100644 index 0000000..3b2a1a0 --- /dev/null +++ b/samples/hello4.lst @@ -0,0 +1,50 @@ + Thu Jan 12 2017 12:17 Page 1 + + + *************************************** + ** WDC 65C816 Macro Assembler ** + ** ** + ** Version 3.49.1- Feb 6 2006 ** + *************************************** + + 1 + 2 ; + 3 ; 2-segment, 2 module code. + 4 ; with intersegment linkage. + 5 + 6 include 'hello.macros' + 7 + 8 macdelim { + 9 + 10 module code + 11 CODE + 12 extern text + 13 00:0000: F4 xx xx pea #^text + 14 00:0003: F4 xx xx pea #text + 15 _WriteLine ++ 15 00:0006: A2 0C 1A ldx #$1a0c ++ 15 00:0009: 22 00 00 E1 jsl $e10000 + 16 + 17 00:000D: 6B rtl + 18 ends + 19 endmod + 20 + 21 module data + 22 XDATA SECTION + 23 public text + 24 text + 25 pstr {'hello, world'} ++ 25 00:0000: 0C db end0001-start0001 ++ 25 start0001 ++ 25 00:0001: 68 65 6C 6C db 'hello, world' + 00:0005: 6F 2C 20 77 + 00:0009: 6F 72 6C 64 ++ 25 end0001 + 26 00:000D: ends + 27 endmod + 28 + 29 + + + Lines assembled: 59 + Errors: 0 diff --git a/samples/hello4.obj b/samples/hello4.obj new file mode 100644 index 0000000000000000000000000000000000000000..ff12c67ac326e10ecbc03f98499409857360d7e5 GIT binary patch literal 155 zcmazFa*1MOU}RNbU|`^4-~f^g46KZd49WQ^sSJ!?J~A;fFfa)K1tnlS298BMQc4UA z53?B<9r(Z+fCS_JlGKV4hA60U!ayMb1|G018_>9v#F9jY53IaA8L2rr`8o>a`9(P? W9~c=}8F-;4RDhK*F|&gBV6y;9sTvRf literal 0 HcmV?d00001 diff --git a/samples/relative.asm b/samples/relative.asm new file mode 100644 index 0000000..6a43d8a --- /dev/null +++ b/samples/relative.asm @@ -0,0 +1,37 @@ + ; test relative expressions. + + module code1 + globals on + externs on +branchb + nop + nop + endmod + + module code2 + globals on + externs on + jmp branchb + bra branchb + brl branchb + per branchb + ; + nop + nop + ; + jmp branchf + bra branchf + brl branchf + per branchf + + endmod + + module code3 + globals on + externs on +branchf + nop + nop + nop + rtl + endmod diff --git a/samples/relative.lst b/samples/relative.lst new file mode 100644 index 0000000..fc6d1cb --- /dev/null +++ b/samples/relative.lst @@ -0,0 +1,50 @@ + Thu Jan 12 2017 12:24 Page 1 + + + *************************************** + ** WDC 65C816 Macro Assembler ** + ** ** + ** Version 3.49.1- Feb 6 2006 ** + *************************************** + + 1 ; test relative expressions. + 2 + 3 module code1 + 4 globals on + 5 externs on + 6 branchb + 7 00:0000: EA nop + 8 00:0001: EA nop + 9 endmod + 10 + 11 module code2 + 12 globals on + 13 externs on + 14 00:0000: 4C xx xx jmp branchb + 15 00:0003: 80 xx bra branchb + 16 00:0005: 82 xx xx brl branchb + 17 00:0008: 62 xx xx per branchb + 18 ; + 19 00:000B: EA nop + 20 00:000C: EA nop + 21 ; + 22 00:000D: 4C xx xx jmp branchf + 23 00:0010: 80 xx bra branchf + 24 00:0012: 82 xx xx brl branchf + 25 00:0015: 62 xx xx per branchf + 26 + 27 endmod + 28 + 29 module code3 + 30 globals on + 31 externs on + 32 branchf + 33 00:0000: EA nop + 34 00:0001: EA nop + 35 00:0002: EA nop + 36 00:0003: 6B rtl + 37 endmod + + + Lines assembled: 37 + Errors: 0 diff --git a/samples/relative.obj b/samples/relative.obj new file mode 100644 index 0000000000000000000000000000000000000000..784ad693c3004440d7747727fc7b2e70a59cc627 GIT binary patch literal 249 zcmZ9Hy$-@K41~|=&(NhC;x&L5s01SuW45MHAt8ap6I48|H>B?1bD7(r9ZxF+RY()O3xrHqrF(nr&I$2j-CD20!l6QfTi1~NGZ2?yv~i}7 vaXP0-GgT6H4)a#g)pdj5>-Cw-4MD0wP9 literal 0 HcmV?d00001