1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-04 16:30:01 +00:00
Commit Graph

111 Commits

Author SHA1 Message Date
Andy McFadden
f5b36afd2e Add a bit to the tutorial
In the data operand edit section, walk through selecting a single
byte vs. multiple bytes when you want to set a multi-byte format.

(inspired by issue #41)
2018-11-08 11:54:33 -08:00
Andy McFadden
2f74fce80b Expand set of things that work with double-click on opcode
If you double-click on the opcode of "JSR label", the code view
selection jumps to the label.  This now works for partial operands,
e.g. "LDA #<label".

Some changes to the find-label-offset code affected the cc65 "is it
a forward reference to a direct-page label" logic.  The regression
test now correctly identifies an instruction that refers to itself
as not being a forward reference.
2018-11-03 15:03:25 -07:00
Andy McFadden
a7e6b101c4 Upgrade "discard changes" dialog
Was a yes/no MessageBox, now it's a three-way with the option to
save your changes before continuing.
2018-11-03 14:36:01 -07:00
Andy McFadden
5b1dde290a Show assembler options in header comment 2018-11-03 14:02:52 -07:00
Andy McFadden
09d6512dd2 Note a cross-asm bug 2018-11-02 17:09:02 -07:00
Andy McFadden
a88c746419 Work around cc65 single-pass behavior
The cc65 assembler runs in a single pass, which means forward
address references default to 16 bits.  For zero-page references
we have to add an explicit width disambiguator.  (This is an
unusual situation that only occurs if you have a zero-page .ORG
in the file after code that references it.)

With this change, 2014-label-dp passes, and no other regression
tests were affected.

(issue #40)
2018-11-02 15:32:54 -07:00
Andy McFadden
c80be07f73 Work around Merlin 32 instruction parsing bug
The 2014-label-dp test now passes.  Prior regression tests are
unaffected.

Also, renamed an IGenerator interface to more accurately reflect
its role.

(issue #37)
2018-11-02 13:49:27 -07:00
Andy McFadden
2096bd2c66 Document another assembler quirk
(see issue #39)
2018-10-31 15:28:01 -07:00
Andy McFadden
7aa3e4dbcd Show "assembling" when assembling
Merlin 32 is slow enough with a 64K data file that you have
enough time to read the text.
2018-10-30 16:41:56 -07:00
Andy McFadden
50e8be186a Add 2014-label-dp
This is primarily to exercise a Merlin 32 failure (issue #37).
However, it also exercises a problem with cc65 (issue #40).
Currently, only 64tass can assemble this project.
2018-10-30 16:07:35 -07:00
Andy McFadden
3cb1596d90 Add more bugs & quirks 2018-10-30 15:42:13 -07:00
Andy McFadden
e995747cb0 Code cleanup
Should be no change in behavior.

(issue #32) (issue #35) (issue #36)
2018-10-29 15:48:19 -07:00
Andy McFadden
f307ffe8c0 Replace another instance of double-arrow glyph
Change 80da6c replaced \u23e9 (black right-pointing double triangle)
with a downward-pointing triangle, because it didn't render under
Win7 or Linux.  It was also being used in the "info" window.  This
change replaces that occurrence with a right-pointing triangle.
2018-10-29 12:59:58 -07:00
Andy McFadden
18994ef772 Update comments 2018-10-27 12:46:10 -07:00
Andy McFadden
c46afe377e Document the "spaces in bytes column" feature 2018-10-27 12:34:59 -07:00
Andy McFadden
372eea385d Clarify 2018-10-26 15:59:00 -07:00
Andy McFadden
a8af7e8794 Improve the "common" expression formatter
To avoid confusing the assembler, expressions with a leading
parenthesis like "(foo & $ffff) + 1" are prefixed with a "0+".  This
is not necessary if the operand begins with a '#'.

(issue #16)
2018-10-26 15:45:39 -07:00
Andy McFadden
975ae1eb28 Speculative fix for reported FormatDataOp crash
This adds a null check on the dfd argument in FormatDataOp() to see
if we can prevent a crash.  The opcode/operand are presented as
"!FAILED!" to make it obvious to the user that something has gone
wrong.  Hopefully this will allow capture of a project that exhibits
the problem.
2018-10-26 15:19:27 -07:00
Andy McFadden
2cb6b55802 Generalize expression style setting
Before you could choose between Merlin-style and generic.  Now
there's a combo box that lets you choose Merlin, cc65, or
"common", the latter being used for 64tass.
2018-10-24 17:23:30 -07:00
Andy McFadden
da91f86043 Get 64tass expressions working
We now insert parenthesis as needed.  This can cause problems in
some situations, so we always prefix parenthetical expressions with
"0+", which looks goofy and is unnecessary for immediate operands.
But it does generate working source code.

Renamed the "simple" expression mode to "common", as it's not
particularly simple but is what you'd expect most assemblers to do.
(OTOH, life has been full of surprises.)

(issue #16)
2018-10-24 14:57:09 -07:00
Andy McFadden
61914c8f79 Progress toward 64tass expression support
Gave cc65 its own expression generator, as the precedence table seems
atypical if not unique.  Configured 64tass to use the "simple"
expression mode.

Added some operations on a 32-bit constant to 2007-labels-and-symbols
to exercise the current worst-case expression (shift + AND + add).
Tweaked the Merlin expression generator to handle it.

(issue #16)
2018-10-24 13:17:03 -07:00
Andy McFadden
f26a03869a Finish the underscore handling in the label localizer
Correctly handle pre-existing underscores and avoidance of
"reserved" labels.

Also, add more underscores to 2012-label-localizer to exercise
the code.

(issue #16)
2018-10-23 20:40:09 -07:00
Andy McFadden
f7e5cf2f45 Progress toward 64tass support
Most tests pass, but 2007-labels-and-symbols fails because the
expressions recognized by 64tass don't match up with either of the
other assemblers.

This is currently using a workaround for the local label syntax.
64tass uses '_' as the prefix, which is unfortunate since SourceGen
explicitly allowed underscores in labels.  (So does 64tass for that
matter, but it treats labels specially when the '_' comes first.)
We will need to rename any non-local user labels that start with '_'.

(issue #16)
2018-10-23 20:08:01 -07:00
Andy McFadden
eec37b684e Split C64 system def into .PRG/.BIN
One starts with a 16-bit load address, one does not.  Not sure
this is the right way to go, but it's worth a try.

(issue #33)
2018-10-23 12:30:19 -07:00
Andy McFadden
96ee33ae8c Optionally add spaces in the "bytes" column
Affects the display list and copy/paste text.  Makes the column
three spaces wider, but makes it easier to read.
2018-10-21 21:08:48 -07:00
Andy McFadden
80da6cc1df Replace symbol used to indicate embedded instructions
We were using \u23e9, BLACK RIGHT-POINTING DOUBLE TRIANGLE, but
neither Win7 SP1 nor Linux was able to display the glyph.  It also
gets all puffy in web browsers.  We now use \u25bc, BLACK
DOWN-POINTING TRIANGLE, which seems to work everywhere.  It also
feels more appropriate, because it appears next to the "containing"
opcode, with the embedded instruction appearing on the following
line.
2018-10-21 18:46:03 -07:00
Andy McFadden
7f06fdc079 Define a max asm column width 2018-10-21 17:51:07 -07:00
Andy McFadden
69681f8e8d
test edit 2018-10-21 17:02:34 -07:00
Andy McFadden
59f79645d2 Update docs for new assembler configuration scheme 2018-10-21 16:54:44 -07:00
Andy McFadden
ab9287fef8 Progress toward new assembler configuration
Changed the "quick config" buttons for the asm config and pseudo-op
tabs into a drop-list and "set" button.  The default values for
each assembler are now defined in the Asm*.cs file, rather than in
the settings code.
2018-10-21 16:36:48 -07:00
Andy McFadden
9aabd988a8 Progress toward new assembler configuration
Use configured column widths when generating output.

The regression test always uses the assembler-preferred default
widths.
2018-10-20 21:24:28 -07:00
Andy McFadden
4f9af30455 Progress toward new assembler configuration
Rather than have each assembler get its own app config string for
the cross-assembler executable, we now have a collection of per-
assembler config items, of which the executable path name is one
member.  The Asm Config tab has an auto-generated pop-up to select
the assembler.

The per-assembler settings block is serialized with the rather
unpleasant JSON-in-JSON approach, but nobody should have to look
at it.

This also adds assembler-specific column widths to the settings
dialog, though they aren't actually used yet.
2018-10-20 20:35:32 -07:00
Andy McFadden
f81c534d25 Merge Gen* and Asm* source files
Each supported assembler has an IGenerator interface and an
IAssembler interface.  They're still two separate classes, but now
both are implemented in the same source file.  (They'll probably
stay separate classes, since the two have little interaction.)

I'm keeping the "Asm*" filename.  Seems the more natural fit.

Also, changed AssemblerInfo to try to get all assembler-specific
stuff into a single table.
2018-10-17 13:50:28 -07:00
Andy McFadden
42e5223efb Version 1.1.0-dev1 2018-10-17 13:11:12 -07:00
Andy McFadden
1756fa081b Version 1.0.0 2018-10-16 10:32:48 -07:00
Andy McFadden
25b7faf43b Hex dump shows file offset, not address 2018-10-15 17:24:32 -07:00
Andy McFadden
23a4852838 Fix goto-by-offset
Most of the decorative items associated with a file offset are
placed before the item in the display list, and given a span of
zero.  This yields the correct behavior in a binary search: an
exact match finds the decorative item (e.g. a blank line), while a
match partway into the instruction or multi-byte data item causes
the binary search to move on to the next line, where it's resolved.

The problem is that we were adding a blank line *after* instructions
in the no-continue case.  If the binary search found the blank line
before it found the instruction, it would guess "too high" rather
than "too low", and miss the actual instruction line.

We now set a flag and add the blank line as part of the following
item.  We do a little dance at the start to ensure that the blank
line doesn't disappear during a partial update.
2018-10-15 14:13:59 -07:00
Andy McFadden
17cccae131 Update Mono compatibility info 2018-10-12 10:43:28 -07:00
Andy McFadden
46cb5ac6ce Version 1.0.0-beta2 2018-10-12 10:04:16 -07:00
Andy McFadden
a47e5bb895 Minor tweak to note formatting 2018-10-11 17:51:32 -07:00
Andy McFadden
e8d7057c2f Make the codeListView column-width setting work like the others
Don't serialize on every column change, just mark app settings as
"dirty" and box it up before writing the settings file.
2018-10-11 17:19:09 -07:00
Andy McFadden
2b6a76fad0 Recognize mouse thumb-button for navigate-back
There's a common convention for using one of the thumb buttons on
the side of the mouse to mean "back", notably in web browsers.  I
keep hitting it without thinking about it, so let's just make it
official.
2018-10-11 17:03:08 -07:00
Andy McFadden
b97f7ca3d8 Fix add-label shortcut for adjusted operands
When you edit the operand of an instruction that targets an in-file
address, you're given the opportunity to specify a shortcut that
applies the symbol to the instruction's target address in addition
to or instead of defining a weak symbol reference on the instruction
being edited.

This didn't work right for operands with adjustments, e.g. the store
instructions in self-modifying code.  It put the label at the
unadjusted offset, which does nothing useful.

We now correctly back up to the start of the instruction or multi-
byte data area.
2018-10-11 16:48:55 -07:00
Andy McFadden
b97a25797a Add some more Applesoft zero-page locations 2018-10-11 16:48:30 -07:00
Andy McFadden
ec33c74cd5 Add symbols for Atari Lynx
Another system I know nothing about.
2018-10-11 14:51:54 -07:00
Andy McFadden
26f8a01b5d Add a C128 Kernal entry point list
Looks like the C64 stuff is also available to the C128, so include
this and the C64 defs in the C128 system definition.
2018-10-11 10:46:47 -07:00
Andy McFadden
1ad4bcb150 Add a C64 Kernal entry point list
I know nothing about the C64, but there's a lot of info on the web.
This stuff looked important.

(issue #19)
2018-10-11 10:01:04 -07:00
Andy McFadden
457c981a2e Fix selection highlight update call
Change acf19870 fixed one bug but introduced another: the call to
update the highlight happened before the selection was restored, so
it could potentially refer to a line that no longer existed.
2018-10-10 17:37:24 -07:00
Andy McFadden
a4e3680655 Remove some test symbols from Cxxx-IO 2018-10-10 16:41:33 -07:00
Andy McFadden
52388b4065 Update some comments 2018-10-10 16:41:03 -07:00