| |
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.... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
hooray for antioptimization techniques :o) |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
no sane coder would place their table at $10ff ;)
and, yes, thank fuck for edit :) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
"This immediately parses, in my head, as self modifying code. No need for assembler-masturbation"
+100000000 |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
I'm sure this can be optimized even further:
; // \1 is arg 0
.macro inc_mem {
.if (code_or_table_crosses_page(\1) {
.macro bar {
inc \1 + 1
bne +
inc \1 + 2
} else {
.macro bar {
inc \1 + 1
}
return bar;
}
All I need to do now is figure out the `code_or_table_crosses_page` function/macro. |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Quote: no sane coder would place their table at $10ff ;)
and, yes, thank fuck for edit :)
I would, unknowingly, which things like .align solve, one of the actual useful extensions to TA |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
.align? Bah, all you need is .dsb <-*,0 ;-) |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Looks like that just fills unused mem with 00. My assembler optimizes NOP's and BIT $EA away for shorter and faster code, so BRK would just confuse it. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:My assembler optimizes NOP's and BIT $EA away for shorter and faster code
sounds like a great feature to have - enabled by default! |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
Quoting ChristopherJam.dsb <-*,0 ;-)
What I like about this one is that it assembles just fine with the smiley included. Unless you're using KA of course. // Insert apropriate smiley here |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:What I like about this one is that it assembles just fine with the smiley included. Unless you're using KA of course.
//O\\ |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next |