1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/test/assembler
Sven Oliver Moll 95a2f4b9dd re-adding WORKDIR to Makefile
- added workaround to remove *.o files after assembling
- also removed now obsolete clean target
2016-09-13 11:28:11 +02:00
..
.gitignore
65c02-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
65c02-opcodes.ref
65c02-opcodes.s
65sc02-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
65sc02-opcodes.ref
65sc02-opcodes.s
4510-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
4510-opcodes.ref
4510-opcodes.s
6502-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
6502-opcodes.ref
6502-opcodes.s
6502x-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
6502x-opcodes.ref
6502x-opcodes.s
65816-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
cpudetect.s added forgotten testcase for testing cpu based conditional assembling 2016-09-07 19:49:21 +02:00
huc6280-cpudetect.ref Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
huc6280-opcodes.ref
huc6280-opcodes.s
m740-opcodes.s
Makefile re-adding WORKDIR to Makefile 2016-09-13 11:28:11 +02:00
README Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00

Assembler Testcases
===================

Opcode Tests:
-------------

These testcases are inspired by the ones now removed from test/assembler.
The main purpose is to have each possible opcode generated at least once,
either by an assembly instruction or a ".byte"-placeholder. Typically
generated by disassembling a binary dump that contains data in the form
of the pattern that each opcode is stated once in order followed by easy
to recognise:

00 00 EA 00
01 00 EA 00
02 00 EA 00
[...]
fe 00 EA 00
ff 00 EA 00

The disassembly is then put in a better readable form by replacing the
leftover dummy opcode parameters with something more recognizable.

The testcases for 6502, 6502x, 65sc02, 65c02, 4510, and huc6280 have been
put together by Sven Oliver ("SvOlli") Moll, as well as a template for the
m740 instructions set.

Still to do is to find a way to implement an opcode testcase for the 65816
processor, since it's capable of executing instructions with an 8-bit and
a 16-bit operator alike, only distinguished by one processor flag.


CPU detect Tests
----------------

These tests all assemble the same file "cpudetect.s" which contains several
conditionals for several CPUs, only using every option known to the "--cpu"
commandline switch of ca65/cl65.


Reference (".ref") Files
------------------------

A hint on creating these files: when running the test, it will fail due to
the missing ".ref" file. Review the output of the ".lst" very pedantic, then
copy the ".bin" to the ".ref" file.