Subject: Re[2]: [stella] I'm looking through 6 digit code From: zu03776 <zu03776@xxxxxxxxxxxxxxxxxx> Date: Mon, 19 May 2003 00:48:58 -0500 |
AB> Alright, obviously I should have read a bit further... "zero" refers to AB> a memory location, but I still don't know what the #> thing does. The <zero and >zero indicate to take the lower- and upper- half of the address. The # in front indicates to use the immediate addressing mode. As an example, say that the label zero points to address $1234. The '>zero' operation would return the value $12, and '<zero' would return >$34. The operators return the high byte and low byte of a memory address. The reason for the # sign is so that the value is loaded into the accumulator, as opposed to the contents of the memory location indicated. That is, we want (from previous example) the value $12 in the accumulator, and not the contents of memory location $12. There is an easier-to-read mnemonic for this operation which escapes me completely. It is part of the new DASM compiler or the new vcs.h header file. I'm just used to using the > and < symbols. I've probably made this more confusing than necessary; if you're still confused someone may do a better job of explanation. >> I'm looking through Robin Harbron's 6-digit routine and I've come >> across some code I don't understand. >> >> asl >> >> adc #<zero >> sta ptr0,y >> lda #0 >> adc #>zero >> sta ptr0+1,y >> >> What do the arguments "#<zero" and "#>zero" actually mean? The two >> books, I have don't say anything about it, and the dig's search engine >> won't let me do a search on the greater than symbol. I guess it seems >> to assemble... does this just tell the assembler to use any number >> greater or less than zero? ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] I'm looking through 6 , Aaron Bergstrom | Thread | Re: [stella] I'm looking through 6 , Andrew Davie |
Re: [stella] I'm looking through 6 , Manuel Polik | Date | Re: [stella] I'm looking through 6 , Andrew Davie |
Month |