Code generated by one of the C compilers sets up the stack frame and
then maps the direct page on top of it. If the value at the top of
the stack is 16 bits, it will be referenced via address $ff. The
local variable editor was regarding this as illegal, because lvars are
currently only defined for direct page data, and the value doesn't
entirely fit there (unless you're doing an indirect JMP on an NMOS
6502, in which case it wraps around to $00... but let's ignore that).
The actual max width of a local variable is 257 because of the
possibility of a 16-bit access at $ff.
Older versions of SourceGen don't seem to have an issue when they
encounter this situation, as worrying about (start+width) is really
just an editor affectation. The access itself is still a direct-page
operation. You won't be able to edit the entry without reducing the
length, but otherwise everything works. I don't think there's a need
to bump the file version.
Added a compiled C implementation of strlen(). The most interesting
part about this is that it references a 16-bit value via direct-page
address $ff, which means you'd want a local variable with
address=$ff and width=2. The current UI prevents this.
Renamed from "*-incl.html" to "incl-*.html" so they sort together.
Moved <div> for all but incl-head inside include file.
Overall this shouldn't do anything but move the magic comments around
inside the HTML files.
We were using a very simple regex pattern for the label part, and
not performing additional validation checks later. This allowed
a symbol that started with a number (e.g. "4ALL") to get much farther
than it should have.
This change modifies the regex pattern to match only valid label
syntax.
Doesn't really affect the pages on the web, but it's easier to
preview them in the filesystem when linked to "../main.css" rather
than "/main.css".
The common portion of the <head> section is now in a separate
"include" file.
Added some indentation to masthead/topnav/sidenav so it looks nicer
in the merged source listing.
The idea is to remove everything but the "HOME" link from the topnav
bar on very narrow devices, so that it doesn't look cramped. Right
now we don't have a ton of stuff in topnav, and losing the tutorial
link is annoying.
If we want to restore this feature, we should also add a link to the
tutorial in the body of the page.
A bit of Javascript was used to remove the hamburger icon when a
page doesn't have a #sidenav. This worked when sidenav-incl was
being loaded with jQuery load(), because that mechanism works
asynchronously, and #sidenav was part of the DOM before it ran.
Once we started merging HTML fragments directly into the pages, the
script got called before #sidenav was defined, so the icon was
always being removed.
One solution would be to move the script to footer-incl.html, to
follow the preferred practice of placing scripts at the bottom of
the <body>. The better solution was to move the "no-sidenav" class
from #main to <body>, so that all components can see it. This lets
us use CSS rules to hide the icon.
Replaced the link at the top of the manual. Remove reference to
old tutorial doc. Added an obsolescence notice to the top of the
old tutorial. Updated tutorial message and link in README.
Also, fixed sidenav style.
This change applies the substitution scripts on the HTML files,
replacing away the jQuery load() calls with the actual file contents,
and setting the correct URLs to the prev/next buttons.
This isn't currently needed anywhere else, so the list of filenames
is just hard-coded into the script. Instead of making substitutions
in the source data, this just generates the full data.
Fairly straightfoward in Python.
Also, fixed the sidenav references, which should be using the file
in the sgtutorial subdirectory.
Also, tweaked index.html a bit.
Added a SourceGen tutorial with lots of screen shots. Uses
"responsive web design" so it works well on mobile devices.
This version is using jQuery load() calls to pull in pieces, but
that causes a lot of blink when loading because the loads are
asynchronous and may not complete until after the initial page
render has finished.
Tutorial prev/next links not yet working.
If you changed the width of a column, and then clicked the "toggle
display of cycle counts" button in the toolbar, the column width
would revert. The problem appears unique to that toolbar button,
so for now the fix is localized there. The more general fix is to
ensure that column width changes don't get stomped, but that's a
larger change.
There's no need to use XHTML Transitional. The only change outside
the template was to use "id" for anchors instead of "name", as the
latter is deprecated.
The calculations were wrong for certain situations, generating
answers that were useless or that caused a false-positive overflow
error.
This adds a couple of simple regression tests, modeled after layout
of the Lode Runner sprite sheet (which worked fine before) and the
Empire II EWS3 font (which failed).
This also bumps up some of the arbitrary limits in the visualizer.
(issue #94)
The $Cxxx I/O locations are mapped into banks $E0/E1, and are usually
configured to appear in banks $00/01 as well. Direct access to
locations in banks $E0/E1 is common in 16-bit code, but we only had
definitions for $E0.
This adds a clone of definitions for $E1, and renames the symbols
to be _E0/_E1 instead of _GS.
This can also be solved with MULTI_MASK, but that will always use
$E0 as the base address, so references to $E1/Cxxx will have a large
adjustment added ("+$10000"), which is kind of ugly.
Note we still don't have definitions for $01/Cxxx. I'll add those
if I run into them in 16-bit code. (That might be a reasonable use
of MULTI_MASK; feels less ugly somehow.)
The test for max allowed value was assuming 16-bit addresses.
We had no tests for 24-bit values, so this adds a 65816-specific
version of 20170-external-symbols.
Generate a 6502 test from the 65816 version by substituting the
16-bit instructions with 8-bit no-ops. There's a lot of project
edits and weird stuff in the test, so this was much easier than
starting over.
The 65816 variant is largely unchanged, though it could now be
stripped down to the stack-offset instructions.