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: 5022
.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: 491
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: 1380
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: 11127
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: 1989
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: 11127
indeed indeed - jackasser wins the thread :)
2016-06-20 14:23
Dr.j

Registered: Feb 2003
Posts: 276
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: 541
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: 5022
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
CA$H/TRiAD
csabanw
Board Rider/Commodor..
Kickback
Guests online: 197
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 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Faayd  (9.7)

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