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 > ACME fetch immediate values from array/table?
2012-04-25 09:04
Bitbreaker

Registered: Oct 2002
Posts: 510
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: 11523
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
Sokratekk
Rhythm/G★P
Knight Rider/TREX 🦖
Didi/Laxity
MWR/Visdom
katon/Lepsi De
Guests online: 128
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Black Beard  (9.2)
3 Baracuda  (9.2)
4 hedning  (9.1)
5 Irata  (8.8)

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