Jump to content
IGNORED

Zero Page indexed indirect adressing


Grevle

Recommended Posts

Is the Zero Page type of indexed indirect adressing uniqe to the Zero page ?

 

Put a value into adress $43 for the low byte and then a value into adress $44 for the high byte then use with a LDA ($43),Y or STA ($43),Y  to acces the resulting adress from locations $43 and $44.

 

Is this uniqe for the zero page or is it possible to use similar adressing mode in the other memory pages ? 

 

 

 

Link to comment
Share on other sites

15 minutes ago, Alfred said:

Zero page only

OK. Im looking in the book "Mapping the Atari" and the free user ram in the Zero page seems to be small, Only a few bytes avaible there ? Whats the most common user adresses to use in the Zero Page ?

Edited by Grevle
Link to comment
Share on other sites

Depends on usage case - at first it looks like not many locations are available but Basic uses a lot, so they're free if Basic not in use.  But other language processors will generally use much of the top half of z-page.

 

The floating point area is good for temporary use.  If you know what you're doing the lower half (OS) has numerous locations you can temporarily use.

Link to comment
Share on other sites

6 hours ago, Grevle said:

Whats the most common user adresses to use in the Zero Page ?

"User addresses" on the ZP are $80-$FF.

 

If your program uses the Floating Point package, addresses $D4-$FF are in use.

 

If your program has to coexist with BASIC, addresses $80-$D3 are used by the BASIC interpreter.

 

  • Like 3
Link to comment
Share on other sites

On 11/24/2020 at 9:40 AM, Wrathchild said:

Not entirely, the JMP instruction can take an indirect address from anywhere in memory, e.g.

The same for JSR ?.. I believe so.

 

I was trying something like this. 

 

1600 = VAR ; EQUATE for changeable varible

LDX 35000

STX VAR

; later in the program

JMP VAR ; So this is a try to reach the adress stored in VAR but my guess is it doesnt work this vay

 

Gonna have to do something like this I think.

 

LDX #184 ; low byte

STX $43

LDX #136 ; high byte

STX $44

 

So then, Possible to JMP or JSR $43 to reach adress 35000 in this way ? Point for this is having a changeable variable to control program flow , when its needed in certain routines etc....

 

 

 

 

Edited by Grevle
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...