Comments (9)
use optimize address ram
and put your label in bank 7e, then asar will reduce it to a word access automatically. or you can juse optimize address mirrors
which will reduce all accesses to $00-3f:0000-7fff to words automatically.
yeah, asar throwing "unknown command" on invalid instruction widths is a long-known issue.
from asar.
I think you're just using INC incorrectly here. What you probably want is:
INC LairsClreared
Not sure what INC #LairsClreared
would even do. That looks like a pseudo-opcode to me. Like "increment accumulator $1E0A times".
from asar.
INC #LairsCleared means 'insert the INC A instruction [numeric value of LairsCleared] times'.
INC #2 is a normal thing to say. INC #<label> is not, unless you want to insert $1E00 instructions and waste a quarter of a bank and tens of thousands of cpu cycles.
The solution is remove the #.
from asar.
You're somewhat right. Now the error is:
hooks/lair_reveal.asm:6: error: (Eunknown_command): Unknown command.
in block: [INC LairsCleared]
from asar.
Do you have a simple test patch that reproduces the issue?
I wasn't able to reproduce it with the following test code:
base $1E00
LairsCleared: skip 2
inc LairsCleared
This assembled without issues.
EDIT:
Also, could you specify what version of Asar you're testing in?
from asar.
INC.w LairsCleared
works though. I try to come up with a simple test.
Version: both master and beta_2
from asar.
Testcase:
org $8000
base $1E00
LairsCleared: skip 2
org $A08000
inc LairsCleared
from asar.
I think that makes sense to fail. Asar considers LairsCleared to be in a different bank from where the inc is ($001E00 vs $A08000). So it tries to assemble inc.l which doesn't exist. So the explicit .w being required here makes sense (although admittedly the error message could be a lot clearer here - I think we might already have a TODO for that somewhere?).
Configuring the label optimizer might make it possible to remove necessity for the explicit .w, though.
from asar.
Configuring the label optimizer might make it possible to remove necessity for the explicit .w, though.
You mean because $1E00
is accessible in the $A0
bank it can be reduced to a word access automatically?
Closing as resolved, thanks! :)
from asar.
Related Issues (20)
- Namescaped incsrc
- Patching to multiple ROMS/files at once
- A command to push/pull/reset all global state
- How to calculate string size? HOT 4
- Bugs that only troublemakers will find HOT 3
- petition to ban if+endwhile HOT 1
- Segfault on asar_patch when using as a static library HOT 1
- relative branch out of bounds is not checked for SPC700 bbs/bbc commands HOT 1
- `optimize address mirrors` does not handle bank 7E optimization like `ram` does
- org Label in freespace yields too small rats tags HOT 1
- datasize fails when used in assert or print before label is defined HOT 6
- Finding freespace beyond on the end of the ROM only works if the value is 0 HOT 2
- Allow branches to take full addresses HOT 1
- asar_getlabelval throws C++ exception for missing label
- Please document deprecation of features HOT 4
- Segfault with invalid syntax in an assert HOT 2
- strange and hard bug about labels and loops, sample code provided
- allow math in labels HOT 15
- arch superfx is haunted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asar.