| |
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.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
.pc = *-1 ? that doesnt sounds good. rather try label = .pc-1 |
| |
Pixman Account closed
Registered: Dec 2001 Posts: 42 |
It's invalid. Sorry :P |
| |
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. |
| |
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. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
not sure if someone who finds the original post confusing shouldnt stay with non selfmodding code =P |
| |
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
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
indeed indeed - jackasser wins the thread :) |
| |
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 :) |
| |
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 |
| |
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 |