[atari7800] Re: Why is ZP not clear in this test?
- From: "Ken Siders" <atari8bit@xxxxxxxxxxxxxxx>
- To: <atari7800@xxxxxxxxxxxxx>
- Date: Mon, 6 Aug 2007 15:52:40 -0400
ldx #255
.clearZP
sta $2000,x
dex
bpl .clearZP
txs
when x=255 is decremented to 254, the result will still be "negative" so the
loop will exit only clearing the last byte.
--Ken
----- Original Message -----
From: "Dennis Debro" <dennis@xxxxxxxxxxxxxxx>
To: <atari7800@xxxxxxxxxxxxx>
Sent: Monday, August 06, 2007 3:19 PM
Subject: [atari7800] Why is ZP not clear in this test?
Hi there,
Sorry to keep coming up with questions. I must be overlooking something
with my test file. This file does character mode for 2 sets of 4 digits.
What I don't understand is when I run this via my CC2 the numbers don't
start at 0. The documentation states that ZP is shadowed at $2040 - $20FF
so to clear ZP I cleared $2000 - $20FF. Why is this area not clear?
BTW, this is my first 7800 program. As bloated as it is I actually think
I'm understanding now. Thanks for all your help.
Take care,
Dennis
- Follow-Ups:
- [atari7800] Re: Why is ZP not clear in this test?
- From: Dennis Debro
- References:
- [atari7800] Why is ZP not clear in this test?
- From: Dennis Debro
Other related posts:
- » [atari7800] Why is ZP not clear in this test?
- » [atari7800] Re: Why is ZP not clear in this test?
- » [atari7800] Re: Why is ZP not clear in this test?
Hi there, Sorry to keep coming up with questions. I must be overlooking something with my test file. This file does character mode for 2 sets of 4 digits. What I don't understand is when I run this via my CC2 the numbers don't start at 0. The documentation states that ZP is shadowed at $2040 - $20FF so to clear ZP I cleared $2000 - $20FF. Why is this area not clear? BTW, this is my first 7800 program. As bloated as it is I actually think I'm understanding now. Thanks for all your help. Take care,Dennis
- [atari7800] Re: Why is ZP not clear in this test?
- From: Dennis Debro
- [atari7800] Why is ZP not clear in this test?
- From: Dennis Debro