| |
GI-Joe
Registered: Sep 2015 Posts: 21 |
exomizer: assembler fragments with loops
Howdee!
Is it possible to use
exomizer sfx 0x0a00 -s '....'
with assembler fragments that have a small loop ?
If so, what is the syntax for i.e. 'bpl *-4' here?
I always got syntax errors in all kinds of attempts :(
It would also be good to know in general with which syntax these fragments run ? Syntax from a c64(vice?)-monitor or from acme or from which assembler ?
Or would it be possible to inject these code fragments as bytecode?
That would already be a solution that could be worked with.
thanxx |
|
... 10 posts hidden. Click here to view all posts.... |
| |
GI-Joe
Registered: Sep 2015 Posts: 21 |
Quoting Gordian
You get proper code.
Because of INX your "magic" value starts at -2064 (-2063-1).
-(-2064)-64=2000
-64 is the $C0 (signed 8-bit value).
yes, or in easy:
Quoting GI-Joe
.C:080e D0 C0 BNE $07D0
$07D0 = 2000 decimal :)
however, in this simple test-example this line works fine:
exomizer sfx 0x2800 -s 'inx bne 2061' -o chrunched_file.prg main_binary_2800.prg |
| |
Gordian
Registered: May 2022 Posts: 87 |
Quoting GI-Joe
however, in this simple test-example this line works fine:
exomizer sfx 0x2800 -s 'inx bne 2061' -o chrunched_file.prg main_binary_2800.prg
Why not? You got offset -3 (2061-2064). |
| |
Zagon
Registered: Apr 2002 Posts: 16 |
You don't have to calculate the branch target address manually. You can use labels in the assembler fragment like this:
-s 'loop123: inx bne loop123' |
| |
GI-Joe
Registered: Sep 2015 Posts: 21 |
Quote: You don't have to calculate the branch target address manually. You can use labels in the assembler fragment like this:
-s 'loop123: inx bne loop123'
ahh, ok, that's what i'm searching for ..
thanxx a lot & cheers :) |
| |
Gordian
Registered: May 2022 Posts: 87 |
Quoting Zagon
-s 'loop123: inx bne loop123'
That is cool:) |
Previous - 1 | 2 - Next |