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: 78
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: 78
@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
t0m3000/hf^boom!^ibx
Scrap/Genesis Project
kbs/Pht/Lxt
Conjuror
Dr.Science/Atlantis
leonofsgr/Singular C..
WVL/Xenon
bexxx
New Design/Excess
Guests online: 117
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.037 sec.