6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 5:50 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jun 06, 2006 9:56 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
It seems to hate using opcodes as variable names. I am assigning variable names directly fromt he 65C134 code, and using SEC for seconds makes it hate life.

does anyone have a workaround to let me use the SEC assignment as a variable?

Thankee kindly.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jun 08, 2006 3:33 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Generally speaking, good programming practice from a variety of disciplines indicates that one should try to avoid convenient shorthand like using 'sec' for 'seconds'. Seconds of what? Meals? Elapsed since the big bang?

Generally, more descriptive variable names are preferred, such as, SecondsFromSpriteCollision, etc. However, this can be too wordy for many, which is unfortunate, since it REALLY makes source code vastly more readable.

Therefore, perhaps you can adopt a convention whereby you combine shorthand with semantic clarity. SecSprColl, for example.

Alternatively, you could perhaps prefix all variables with an underscore, the way old-fashioned C compilers used to. This way, _sec is distinguished from sec.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jun 08, 2006 3:41 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
It is a difference of assembler dialets. I was patching round code from th WDC system and SEC was used for seconds in the time of day clock for the routines.

I just got a bit of help from WDC last night, I had one fundamental mistake all this time which will save 99% of the posted I had been posting. Looks like I can dispense with teh SEC variable as welll or use it in my own was as Seconds.

got one other epiphany to test out today. will post out details as it goes.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron