Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Gabezcommodore ! (Registered 2025-07-24) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > ACME fetch immediate values from array/table?
2012-04-25 09:04
Bitbreaker

Registered: Oct 2002
Posts: 511
ACME fetch immediate values from array/table?

Hi Folx,

anyone an idea how to do the following within acme:

for (a = 0; a < x; a++) {
pos += offsets[a];
}

that would then be:

!for .a, .x {
!set .pos = .pos + ???
}

At the moment i solve the problem like this, but looks rather bloated:

!for .s, .size {
!if .s = 1 { !set .offset = 4 }
!if .s = 2 { !set .offset = 8 }
!if .s = 3 { !set .offset = 12 }
!if .s = 4 { !set .offset = 14 }
!if .s = 5 { !set .offset = 14 }
!if .s = 6 { !set .offset = 16 }
!if .s = 7 { !set .offset = 16 }
!if .s = 8 { !set .offset = 18 }
!if .s = 9 { !set .offset = 18 }
!if .s = 10 { !set .offset = 18 }
!if .s = 11 { !set .offset = 18 }
!if .s = 12 { !set .offset = 16 }
!if .s = 13 { !set .offset = 16 }
!if .s = 14 { !set .offset = 14 }
!if .s = 15 { !set .offset = 14 }
...
sta .bank,y
!set .bank = .bank + .offset
}
 
... 10 posts hidden. Click here to view all posts....
 
2012-04-27 15:19
chatGPZ

Registered: Dec 2001
Posts: 11540
i find it rather cumbersome to be honest ... to me it looks like the result of what happens when someone who hates makefiles and external tools starts writing an assembler =P
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
Beast/Crescent
NecroPolo/Lethargy/H..
grennouille
iAN CooG/HVSC
ned128
Andy/AEG
Guests online: 80
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.7)
5 Coma Light 13  (9.6)
6 Harminc  (9.6)
7 Edge of Disgrace  (9.6)
8 Comaland 100%  (9.6)
9 Wonderland XIV  (9.6)
10 Signal Carnival  (9.6)
Top onefile Demos
1 Morphing Starball  (9.9)
2 Nine  (9.8)
3 Layers  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.5)
7 Scan and Spin  (9.5)
8 Onscreen 5k  (9.5)
9 Grey  (9.5)
10 Dawnfall V1.1  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Oxyron  (9.3)
5 Artline Designs  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 OTD  (9.8)
3 Antitrack  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

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