mirror of
https://github.com/AppleCommander/bastools.git
synced 2024-05-28 19:41:31 +00:00
Correcting call when moving to call the move code instead of the embedded code. Related to #24.
This commit is contained in:
parent
81e1fa0ce3
commit
d84d4ca1e8
|
@ -37,6 +37,7 @@ public class EmbeddedBinaryDirective extends Directive {
|
||||||
byte[] bin = Files.readAllBytes(file.toPath());
|
byte[] bin = Files.readAllBytes(file.toPath());
|
||||||
|
|
||||||
CodeBuilder builder = new CodeBuilder();
|
CodeBuilder builder = new CodeBuilder();
|
||||||
|
CodeMark moveStart = new CodeMark();
|
||||||
CodeMark embeddedStart = new CodeMark();
|
CodeMark embeddedStart = new CodeMark();
|
||||||
CodeMark embeddedEnd = new CodeMark();
|
CodeMark embeddedEnd = new CodeMark();
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ public class EmbeddedBinaryDirective extends Directive {
|
||||||
|
|
||||||
targetAddress.ifPresent(address -> {
|
targetAddress.ifPresent(address -> {
|
||||||
builder.basic()
|
builder.basic()
|
||||||
.CALL(embeddedStart)
|
.CALL(moveStart)
|
||||||
.endStatement();
|
.endStatement();
|
||||||
|
|
||||||
Optional<Line> nextLine = line.nextLine();
|
Optional<Line> nextLine = line.nextLine();
|
||||||
|
@ -64,8 +65,10 @@ public class EmbeddedBinaryDirective extends Directive {
|
||||||
builder.basic()
|
builder.basic()
|
||||||
.endLine();
|
.endLine();
|
||||||
|
|
||||||
|
|
||||||
targetAddress.ifPresent(address -> {
|
targetAddress.ifPresent(address -> {
|
||||||
builder.asm()
|
builder.set(moveStart)
|
||||||
|
.asm()
|
||||||
.setAddress(embeddedStart, 0x3c)
|
.setAddress(embeddedStart, 0x3c)
|
||||||
.setAddress(embeddedEnd, 0x3e)
|
.setAddress(embeddedEnd, 0x3e)
|
||||||
.setAddress(address, 0x42)
|
.setAddress(address, 0x42)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user