Grevle Posted November 24, 2020 Share Posted November 24, 2020 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 ? Quote Link to comment Share on other sites More sharing options...
Alfred Posted November 24, 2020 Share Posted November 24, 2020 Zero page only. Quote Link to comment Share on other sites More sharing options...
Grevle Posted November 24, 2020 Author Share Posted November 24, 2020 (edited) 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 November 24, 2020 by Grevle Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 24, 2020 Share Posted November 24, 2020 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. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted November 24, 2020 Share Posted November 24, 2020 2 hours ago, Grevle said: Is the Zero Page type of indexed indirect adressing uniqe to the Zero page ? Not entirely, the JMP instruction can take an indirect address from anywhere in memory, e.g. $C01D: 6C 00 02 JMP (VDSLST) 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted November 24, 2020 Share Posted November 24, 2020 If your using BASIC then really $CB to $CF are the only ones safe to use and as @Rybags said there are many others you can use if you know what functions your not using (Mapping the Atari) is a good source of these. Quote Link to comment Share on other sites More sharing options...
drac030 Posted November 24, 2020 Share Posted November 24, 2020 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. 3 Quote Link to comment Share on other sites More sharing options...
Grevle Posted November 27, 2020 Author Share Posted November 27, 2020 (edited) 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 November 27, 2020 by Grevle Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted November 27, 2020 Share Posted November 27, 2020 (edited) No, just JMP. So setup would be: vec35000 = $42 LDA #$4C LDY #<35000 LDX #>35000 STA vec35000 STY vec35000+1 STX vec35000+2 and calling would be: JSR vec35000 Edited November 27, 2020 by Wrathchild $4C for direct JMP, not $6C for indirect Quote Link to comment Share on other sites More sharing options...
fenrock Posted November 27, 2020 Share Posted November 27, 2020 A useful resource to see what modes are available is http://www.6502.org/tutorials/6502opcodes.html#JSR From the link above, you can see JSR only has Absolute addressing, but JMP has Indirect too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.