You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
kick assembler namespaces and enums
2019-04-19
21:19
WdW
Registered: Jun 2013
Posts: 13
kick assembler namespaces and enums
Hi coders,
I would like to use enums in namespaces but so far, no luck. This is what I have right now:
.namespace game {
.enum {PLAY,GAMEOVER,ENTERNAME,ATTRACT}
}
I would like to be able to do something like:
LDA #game.ATTRACT
which would result in .A being 3. But I get this error:
Error: Variable 'PLAY' not present on value of type 'Namespace'
I also tried to add .constants to the namespace, but this also does not work... Any ideas?
2019-04-21
15:22
Dr.j
Registered: Feb 2003
Posts: 279
i am not sure if Enum structure work on namespace , but it work from the root level.
.enum {singleColor, multiColor} // Defines singleColor=0, multiColor=1
lda #multiColor
sta $0400. set #1 on $0400
2019-04-22
11:01
WdW
Registered: Jun 2013
Posts: 13
Yes, I know it works in the root namespace. I thought it would be nice to reference it from a namespace, but that apparently just doesn't work.
Thanks!
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
iAN CooG/HVSC
MWR/Visdom
VanessaE/Digital Aud..
Alakran_64
MCM/ONSLAUGHT
Acidchild/Padua
X-Raffi/X-Rated
Guests online: 374
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
Performers
(9.3)
4
Oxyron
(9.3)
5
Censor Design
(9.3)
Top Musicians
1
Rob Hubbard
(9.7)
2
Jeroen Tel
(9.7)
3
Stinsen
(9.7)
4
LMan
(9.7)
5
Linus
(9.6)
Home
-
Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.08 sec.