Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > exomizer: assembler fragments with loops
2024-12-28 02:44
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....
 
2024-12-28 23:54
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
2024-12-29 11:03
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).
2024-12-29 22:35
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'
2024-12-30 03:01
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 :)
2024-12-30 08:01
Gordian

Registered: May 2022
Posts: 87
Quoting Zagon

-s 'loop123: inx bne loop123'

That is cool:)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
iceout/Avatar/HF
t0m3000/hf^boom!^ibx
Walt/Bonzai
MWR/Visdom
Flex/Artline Designs
BlackJack/Civitas
Airwolf/F4CG
Visage/Lethargy
REBEL 1/HF
Guests online: 134
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 The Demo Coder  (9.6)
8 Comaland 100%  (9.6)
9 What Is The Matrix 2  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 Morph  (9.5)
7 Dawnfall V1.1  (9.5)
8 Libertongo  (9.5)
9 Katzen-Video.mp4  (9.5)
10 Onscreen 5k  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Shine  (9.4)
5 Pal  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.036 sec.