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 > Converting ACME code to Kick Assembler
2016-06-19 03:24
Pixman
Account closed

Registered: Dec 2001
Posts: 42
Converting ACME code to Kick Assembler

In this code there are some confusing lines (since there are no proper ACME manuals):
http://codebase64.org/doku.php?id=base:double_irq
lda #$00 ;Reload A,X,and Y
reseta1 = *-1 ;registers
ldx #$00
resetx1 = *-1
ldy #$00
resety1 = *-1



Someone on #c-64 told me = is for the current Program Counter.

But there is no equivalent to this in Kick Assembler.

Solve it with branches?

I seriously have no idea how to fix this problem.

Any suggestions?
Tnx,
Pix
 
... 80 posts hidden. Click here to view all posts....
 
2016-06-19 21:09
Oswald

Registered: Apr 2002
Posts: 5094
.pc = *-1 ? that doesnt sounds good. rather try label = .pc-1
2016-06-19 21:32
Pixman
Account closed

Registered: Dec 2001
Posts: 42
It's invalid. Sorry :P
2016-06-19 22:26
Skate

Registered: Jul 2003
Posts: 494
I often use;

lda #$00 : reseta1 = *-1
ldx #$00 : resetx1 = *-1
ldy #$00 : resety1 = *-1

instead of using a new line. That's the only case i find ":" useful. No additional lines wasted.
2016-06-20 05:13
ChristopherJam

Registered: Aug 2004
Posts: 1409
Yeah, label on the same line's a good way to avoid accidentally separating the target instruction from the label later on; I learned that one the hard way. Never use the same label for both self-modifying target and for loop start LOL

I used to put "RNA" in the name as well as an additional reminder, but grepping my sources it looks like I've gotten out of that particular habit.
2016-06-20 11:52
chatGPZ

Registered: Dec 2001
Posts: 11386
not sure if someone who finds the original post confusing shouldnt stay with non selfmodding code =P
2016-06-20 11:58
JackAsser

Registered: Jun 2002
Posts: 2014
Quote: not sure if someone who finds the original post confusing shouldnt stay with non selfmodding code =P

And then you start allowing irqs in irqs and this selfmodding stuff will bite you anyway. :) Always if you're not cycle critical please do:
pha
txa
pha
tya
pha
lda $1
pha

...

pla
sta $1
pla
tay
pla
tax
pla
rti
2016-06-20 12:17
chatGPZ

Registered: Dec 2001
Posts: 11386
indeed indeed - jackasser wins the thread :)
2016-06-20 14:23
Dr.j

Registered: Feb 2003
Posts: 277
sorry for the lame comment but i find the
"reseta1 = *-1" is much less "sexier" than *+1
for me the first is still confusing , and the latter is better and much stright forward and replace the other. when i am lazy and don't have time for labeling stuff i just use the direct approach:
a0: lda $0400,x

lda #$00
sta a0+1
lda #$04
sta a0+2 or what-so-ever , the old classic way always wins :)
2016-06-20 14:29
TWW

Registered: Jul 2009
Posts: 545
Quote: And then you start allowing irqs in irqs and this selfmodding stuff will bite you anyway. :) Always if you're not cycle critical please do:
pha
txa
pha
tya
pha
lda $1
pha

...

pla
sta $1
pla
tay
pla
tax
pla
rti


+1
2016-06-20 16:30
Oswald

Registered: Apr 2002
Posts: 5094
jacky's note is for beginners. big boys always use the type thats best suitd.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - 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
csabanw
Jammer
Flex/Artline Designs
Chrx/Design/Chaos
Guests online: 100
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

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