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 > Kick Assembler Thread 2
2009-07-21 17:20
Slammer

Registered: Feb 2004
Posts: 416
Kick Assembler Thread 2

The previous thread took a little long to load, so this is a new fresh one..
 
... 590 posts hidden. Click here to view all posts....
 
2015-03-24 16:39
chatGPZ

Registered: Dec 2001
Posts: 11116
Quote:
Are there any better way of doing similiar conditional assembly such like this?

use an assembler that properly supports scoping.
2015-03-24 16:49
Pantaloon

Registered: Aug 2003
Posts: 124
i was waiting for that comment from Groepaz :)
2015-03-24 17:32
Slammer

Registered: Feb 2004
Posts: 416
I guess Groepaz is the kind of person who goes down to the store to buy a tool so he can cook an egg. The clerk sells him a frying pan and the next day he comes back complaining that the pan is a terrible pot and that he can't get the egg hard-boild!

Groepaz: I think you mean an assembler that does not support scoping, not an assembler that supports scoping properly.
2015-03-24 18:24
chatGPZ

Registered: Dec 2001
Posts: 11116
i mean exactly what i said. and no, "not the right tool for the job" does not apply here at all. hardly any other assembler is broken like this.
2015-03-24 18:39
soci

Registered: Sep 2003
Posts: 473
Works as designed, it seems.
2015-03-24 18:56
chatGPZ

Registered: Dec 2001
Posts: 11116
i am not doubting that at all :)
2015-03-24 18:56
Oswald

Registered: Apr 2002
Posts: 5017
"I got a plenty of SMC labels like Something=*-1 so my code looks like ANYTHING else but CLEAN because of this :)

How you would create that kind of label touching code? I spent just several hours just because of this..."

I guess its a matter of habit what's comfortable & clean to you. I usually do this:

smod lda #$00
sta $d020

inc smod+1

this keeps the label and the instruction on the same line *-x wont fuck up, since you cant insert extra instruction inbetween, furthermure its obvious where the label points no *+ fucking, and one label is enough to reach lo/hi / instruction.

if the branch is really close then just:

inc $d020
jmp *-3

lda #$03
adc $02
sta $02
bcc *+3
inc $03

but I only use it in very simple cases like this. if you insert an instruction and forget to update the * you're fucked.
2015-03-24 19:02
soci

Registered: Sep 2003
Posts: 473
Oswald, that was a good example why using *+ and *- is really error prone:
bcc *+3
inc $03
2015-03-24 19:05
chatGPZ

Registered: Dec 2001
Posts: 11116
hey, that way debugging never becomes a bore! =)
2015-03-24 19:11
Oswald

Registered: Apr 2002
Posts: 5017
Quote: Oswald, that was a good example why using *+ and *- is really error prone:
bcc *+3
inc $03


*+4, got me there. I use those without knowing what happens, now I got exposed. i never know if the * refers to the instruction or the operand... and just too lazy to think about it for a minute O:-) I only use them to avoid the 125th skip label.
Previous - 1 | ... | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ... | 61 - 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
Sentinel/Excess/TREX
megatonn/Bronx
Guests online: 131
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Original Suppliers
1 Black Beard  (9.5)
2 Derbyshire Ram  (9.5)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Irata  (8.5)

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