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-20 16:58
chatGPZ

Registered: Dec 2001
Posts: 11127
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) :)
2016-06-20 18:31
JackAsser

Registered: Jun 2002
Posts: 1989
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.
2016-06-20 18:54
Krill

Registered: Apr 2002
Posts: 2850
Interruptible interrupts - the High Art of C-64 coding. :D
2016-06-20 19:54
Oswald

Registered: Apr 2002
Posts: 5022
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.
2016-06-20 19:56
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.
2016-06-20 20:08
JackAsser

Registered: Jun 2002
Posts: 1989
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!
2016-06-20 20:27
chatGPZ

Registered: Dec 2001
Posts: 11127
how to point the label to the second byte of the argument? ie the highbyte of an absolute address?
2016-06-20 20:43
JackAsser

Registered: Jun 2002
Posts: 1989
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
2016-06-20 20:49
chatGPZ

Registered: Dec 2001
Posts: 11127
hehe, that kinda defeats the whole new syntax thing though =)
2016-06-20 20:53
Count Zero

Registered: Jan 2003
Posts: 1825
xreg-1 == areg+2 I'd say!
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
zscs
digix
CA$H/TRiAD
Sentinel/Excess/TREX
iceout/Avatar/HF
macx
bugjam
Fred/Channel 4
Steffan/BOOM!
Knight Rider/TREX
tlr
Black/Angels
Paul Bearer
Guests online: 116
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 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (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.057 sec.