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 > Including selected bytes from binary files using ACME
2015-01-22 10:04
Mantiz
Account closed

Registered: Apr 2006
Posts: 36
Including selected bytes from binary files using ACME

Looking for the proper way to include every 4th byte from a binary and put all the included bytes next to each other in the memory (Using ACME).

If the binary contains the text "commodore 64 computer", I would like to have this to appear in memory "coe pr".
I am currently doing it with a for-loop using !bin and counters, but the compiler report generates a very long list drowning the important messages in it.

I know I can save the memory range with a monitor to another binary, which then can be included in another assembly run to get rid of the long list, but this must be possible to achieve with a clever macro to just include the file once and then take the desired bytes from it.

Please point me in the right direction and if possible include a bit of code. Thanks!
 
... 10 posts hidden. Click here to view all posts....
 
2015-01-25 03:44
Krill

Registered: Apr 2002
Posts: 2980
Acme has a built-in Turing-complete programming language like KickAss? That's news to me.

But if you meant the solution for this specific problem, then it sucks. Opening a file, seeking to some position, extracting one single byte, closing the file again and then repeating this for a thousand times doesn't sound very efficient, to put it mildly.
2015-01-25 07:52
chatGPZ

Registered: Dec 2001
Posts: 11386
obviously i was referring to the specific problem (what else really?)

and who cares if its efficient if it completes within practically zero time. seriously. (likely it will still be faster than a script in kickass =P)

if you look at the initial post (and the posted screenshots) then its pretty obvious that its all about removing the useless -v3 option. no more no less.
2015-01-25 18:46
Krill

Registered: Apr 2002
Posts: 2980
Until a more complex problem pops up which cannot be handled with acme alone. And of course i've seen that the specific problem can be solved with that -v3 option.
2015-01-25 19:29
chatGPZ

Registered: Dec 2001
Posts: 11386
obviously more complex stuff needs a different solution.... but including some bytes? come on :)
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
Scrap/Genesis Project
Acidchild/Padua
Majikeyric
Guests online: 98
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.066 sec.