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 > One more KickAssembler question please
2007-09-27 14:01
cbmeeks

Registered: Oct 2005
Posts: 79
One more KickAssembler question please

How can I pass the X, Y or A into a macro?

ldx #14

:DrawTimeXY( screenbuffer, "value of X", 0, 1)

.macro DrawTileXY( buffer, x, y, tile )
{
	// save X,Y,A 
	sta	TMP_A
	stx	TMP_X
	sty	TMP_Y
	
	ldx	#tile
	lda	T1,x
	sta	[buffer + [[y * 40] + x]]
	lda	T2,x
	sta	[buffer + [[y * 40] + x + 1]]
	lda	T3,x
	sta	[buffer + [[[y + 1] * 40] + x]]
	lda	T4,x
	sta	[buffer + [[[y + 1] * 40] + x + 1]]
	
	// restore X,Y,A
	lda	TMP_A
	ldx	TMP_X
	ldy	TMP_Y
}


Thanks!

METROID
http://www.metroidclassic.com
 
... 10 posts hidden. Click here to view all posts....
 
2007-09-27 20:02
cbmeeks

Registered: Oct 2005
Posts: 79
@WVL, Oswald

Thanks! I will look into that some more. Believe it or not, this is all starting to come back to me. I guess I just needed a jolt. I can't wait to start cracking on this tonight.


METROID
http://www.metroidclassic.com
Previous - 1 | 2 - 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
DeepCore
zzarko/Avatar
Gildan Jondal/Suicyc..
algorithm
REBEL 1/HF
Guests online: 133
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Coders
1 Axis  (9.8)
2 Sailor  (9.8)
3 Lft  (9.8)
4 Graham  (9.8)
5 Crossbow  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.187 sec.