| |
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 |
for the most part "big boys" know when a certain optimization is useful and when its not (and most of the times THIS optimization isnt useful nor required at all) :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: for the most part "big boys" know when a certain optimization is useful and when its not (and most of the times THIS optimization isnt useful nor required at all) :)
Indeed. The selfmod bites me everytime we link and HCL slaps my fingers for not saving $1-state when loading under io, or when I all of a sudden want to to some heavylifting in the IRQ and add a cli to make sure the music don't stop. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Interruptible interrupts - the High Art of C-64 coding. :D |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: for the most part "big boys" know when a certain optimization is useful and when its not (and most of the times THIS optimization isnt useful nor required at all) :)
except when horizontal timing asks for faster irq entry. or you have a lot of irq. fex a 4x4 timing with lot of pha and $01 saving would suck big time. |
| |
Slammer
Registered: Feb 2004 Posts: 416 |
Whether you like to make selfmodifying code on irq changes or not, this is still an interesting topic if you see it as a general discussion of how you can make selfmodifying code.
The posts from Skate and ChristopherJam makes a lot of sence, doing onelines with the format:[label] mnemonic argument [argumentLabel] Having another way of writing labels pointing to arguments can make the code more readable, but still it's alot to write for doing it. So I made an implementation that suports labelling the start of the argument instead of the instruction. The syntax looks like this on the irq-example:
sta areg
stx xreg
sty yreg
...
lda areg:#$00
ldx xreg:#$00
ldy yreg:#$00
I will give it a couple of days before releasing to see if its really sound and make some tests, but so far it looks good to me, so thanks to Skate and Christopher for the inspiration. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Whether you like to make selfmodifying code on irq changes or not, this is still an interesting topic if you see it as a general discussion of how you can make selfmodifying code.
The posts from Skate and ChristopherJam makes a lot of sence, doing onelines with the format:[label] mnemonic argument [argumentLabel] Having another way of writing labels pointing to arguments can make the code more readable, but still it's alot to write for doing it. So I made an implementation that suports labelling the start of the argument instead of the instruction. The syntax looks like this on the irq-example:
sta areg
stx xreg
sty yreg
...
lda areg:#$00
ldx xreg:#$00
ldy yreg:#$00
I will give it a couple of days before releasing to see if its really sound and make some tests, but so far it looks good to me, so thanks to Skate and Christopher for the inspiration.
That is a quite awesome syntax in my opinion. Good work! |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
how to point the label to the second byte of the argument? ie the highbyte of an absolute address? |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: how to point the label to the second byte of the argument? ie the highbyte of an absolute address?
label+1 :D :D :D |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
hehe, that kinda defeats the whole new syntax thing though =) |
| |
Count Zero
Registered: Jan 2003 Posts: 1932 |
xreg-1 == areg+2 I'd say! |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next |