1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-10-17 18:23:50 +00:00
6502bench/SourceGen/SGTestData/Source
Andy McFadden 99cd0d3ac1 Improve handling of C64 PRG header
C64 PRG files are pretty common.  Their salient feature is that they
start with a 16-bit value that is used as the load address.  The
value is commonly generated by the assembler itself, rather than
explicitly added to the source file.

Not all assemblers know what a PRG file is, and some of them handle
it in ways that are difficult to guarantee in SourceGen.  ACME adds
the 16-bit header when the output file name ends in ".prg", cc65
uses a modified config file, 64tass uses a different command-line
option, and Merlin 32 has no idea what they are.

This change adds PRG file detection and handling to the 64tass code
generator.  Doing so required making a few changes to the gen/asm
interfaces, because we now need to have the generator pass additional
flags to the assembler, and sometimes we need code generation to
start somewhere other than offset zero.  Overall the changes were
pretty minor.

The 20042-address-changes test needed a 6502-only variant.  A new test
(20040-address-changes) has been added and given a PRG header.  As
part of this change the 65816 variant was changed to use addresses
in bank 2, which uncovered a code generation bug that this change
also fixes.

The 64tass --long-address flag doesn't appear to be necessary for
files <= 65536 bytes long, so we no longer emit it for those.

(issue #90)
2020-10-17 16:45:13 -07:00
..
10000-allops-value-6502.S Add W65C02S support, part 2 2020-10-10 18:34:19 -07:00
10001-allops-value-65C02.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10002-allops-value-65816.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10003-allops-value-W65C02.S Add W65C02S support, part 2 2020-10-10 18:34:19 -07:00
10010-allops-zero-6502.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10011-allops-zero-65C02.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10012-allops-zero-65816.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10013-allops-zero-W65C02.S Add W65C02S support, part 2 2020-10-10 18:34:19 -07:00
10022-embedded-instructions.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10032-flags-and-branches.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
10042-data-recognition.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
20000-numeric-types.S Regression test rework, part 1 2020-06-06 14:47:19 -07:00
20010-string-types.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20020-operand-formats.S Split 2002x-operand-formats test 2020-06-08 17:47:26 -07:00
20022-operand-formats.S Split 2002x-operand-formats test 2020-06-08 17:47:26 -07:00
20030-labels-and-symbols.S Regression test rework, part 3 2020-06-06 17:06:31 -07:00
20032-labels-and-symbols.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20040-address-changes.S Improve handling of C64 PRG header 2020-10-17 16:45:13 -07:00
20042-address-changes.S Improve handling of C64 PRG header 2020-10-17 16:45:13 -07:00
20050-branches-and-banks.cfg Regression test rework, part 4 2020-06-06 17:30:50 -07:00
20050-branches-and-banks.S Regression test rework, part 4 2020-06-06 17:30:50 -07:00
20052-branches-and-banks.cfg Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20052-branches-and-banks.S Change PLP handling 2020-07-20 11:54:00 -07:00
20062-target-adjustment.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20070-hinting.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20081-label-localizer.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20090-notes-and-comments.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20102-label-dp.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20122-char-encoding.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20152-local-variables.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20162-cycle-counts-65816.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20170-external-symbols.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20182-extension-scripts.S Mark flags as indeterminate for inline BRK 2020-08-22 08:56:38 -07:00
20190-non-unique-labels.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20200-ui-edge-cases.S Regression test rework, part 2 2020-06-06 15:36:08 -07:00
20212-reloc-data-bank2.S Update relocation data handling 2020-07-10 17:41:38 -07:00
20212-reloc-data-bank8.S Add 20212-reloc-data test 2020-07-05 17:17:44 -07:00
20212-reloc-data-filler.S Add 20212-reloc-data test 2020-07-05 17:17:44 -07:00
20212-reloc-data-lnk.S Add two options to OMF converter 2020-07-20 13:50:49 -07:00
20212-reloc-data-main.S Update relocation data handling 2020-07-10 17:41:38 -07:00
20212-reloc-data-relover.S Add 20212-reloc-data test 2020-07-05 17:17:44 -07:00
20222-data-bank.S Data Bank Register management, part 6 (of 6) 2020-07-10 15:53:43 -07:00
20233-rockwell.S Add W65C02S support, part 4 (of 4) 2020-10-11 18:43:00 -07:00
allops-common-65C02.S Initial file commit 2018-09-28 10:05:11 -07:00
allops-common-6502.S Initial file commit 2018-09-28 10:05:11 -07:00
allops-common-65816.S Initial file commit 2018-09-28 10:05:11 -07:00
allops-common-W65C02.S Add W65C02S support, part 2 2020-10-10 18:34:19 -07:00