You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a data operand allow addition or subtraction.
I have this block of code:
MOVE1 .dd2 BLOCK1 ;source address
.dd2 $6800 ;destination address
.dd2 $051c ;number of bytes to copy
MOVE2 .dd2 BLOCK3 ;source address
.dd2 $1000 ;destination address
.dd2 $016b ;number of bytes to copy
MOVE3 .dd2 BLOCK2 ;source address
.dd2 $1800 ;destination address
.dd2 $03ae ;number of bytes to copy
The size of each block is referenced by number of bytes to copy comment. The block size can also be computed by the following:
MOVE1 bytes to be copied: block2 - block1 - 1
MOVE2 bytes to be copied: block4 - block3 (block4 is a label after block3 region ending)
MOVE3 bytes to be copied: block3 - block2
If I adjust MOVE3 bytes to be copy value to BLOCK3, 6502bench computes the offset.
MOVE3 .dd2 BLOCK2 ;source address
.dd2 $1800 ;destination address
.dd2 BLOCK3-$26ff ;number of bytes to copy
To this, maybe
MOVE3 .dd2 BLOCK2 ;source address
.dd2 $1800 ;destination address
.dd2 BLOCK3-BLOCK2 ;number of bytes to copy
or
MOVE3 .dd2 BLOCK2 ;source address
.dd2 $1800 ;destination address
.dd2 BLOCK3_SIZE ;number of bytes to copy
The text was updated successfully, but these errors were encountered:
Start with simple expressions, such as ORing of multiple constants or defining an offset as the difference between two symbols.
Add "define offset table" that takes a base address and creates 8-bit or 16-bit offsets to symbols.
Allow arbitrary expressions in places that currently accept symbols (instruction and data operands). This is straightforward to manage within SourceGen, but can be difficult to generate for all cross-assemblers if the complexity gets too high.
The situation comes up fairly often, e.g. the byte count in the first tutorial would be best expressed as the difference between two labels. I think of it has a step in the direction of general expression handling... it's much simpler than support for arbitrary expressions, but it handles what is probably the most common use case.
One quirk of address region sizes is that, thinking in terms of how the source code would be written, you'd want to subtract the value of a label that is placed after the region from the label at the start of a region. So we might need to define post-labels to go with the pre-labels.
A possible feature request.
Assign an address region size to a label
or
When editing a data operand allow addition or subtraction.
I have this block of code:
The size of each block is referenced by number of bytes to copy comment. The block size can also be computed by the following:
MOVE1 bytes to be copied: block2 - block1 - 1
MOVE2 bytes to be copied: block4 - block3 (block4 is a label after block3 region ending)
MOVE3 bytes to be copied: block3 - block2
If I adjust MOVE3 bytes to be copy value to BLOCK3, 6502bench computes the offset.
To this, maybe
or
The text was updated successfully, but these errors were encountered: