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 0000000..ff12c67 Binary files /dev/null and b/samples/hello4.obj differ 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 0000000..784ad69 Binary files /dev/null and b/samples/relative.obj differ