Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #5538

Re: Phantom reads on 6502, 65C02 and 65816

Newsgroups comp.sys.apple2.programmer
Date 2020-05-06 21:15 -0700
References <r8uqn5$vt5$1@news.albasani.net> <a6fd6ea1-4120-496a-adf6-45592188c719@googlegroups.com>
Message-ID <09ea019e-7406-458e-ae9b-bebe9386e596@googlegroups.com> (permalink)
Subject Re: Phantom reads on 6502, 65C02 and 65816
From Nick Westgate <nick.westgate@gmail.com>

Show all headers | View raw


On Thursday, 7 May 2020 10:20:21 UTC+10, Andy McFadden  wrote:
> STA doesn't touch memory twice.  POKE does, which is probably why people who started in Applesoft prefer to read I/O locations.

Actually, POKE used STA (zp),Y which did do multiple accesses on the NMOS 6502. The 65C02 fixed up most of this stuff, though both the 65C02 and 65C816 leave just enough in for the Disk ][ controller to still work.
More in this thread:
https://groups.google.com/d/msg/comp.sys.apple2/RuTGaRxu5Iw/z_1zklRuDAwJ

> > Where I'm rather unsure is the 65816. Does it really behave exactly
> > like the 6502 with regards to operations mentioned so far?
> 
> Those instructions take the same number of cycles if you're in emulation mode on the 65816.

This summary notes "In general, in emulation mode (and for 8-bit results in native mode), the 65C816 has the same behavior as 65C02 but the same cycle counts as the NMOS 6502."
http://www.6502.org/tutorials/65c816opcodes.html

Check out the datasheet, if you trust it. ; - )
http://archive.6502.org/datasheets/wdc_w65c816s_oct_11_2018.pdf

6a Absolute, X a, x
ADC, AND, BIT, CMP, EOR, LDA, LDY, ORA, SBC, STA, STZ
12 OpCodes, 3 bytes, 4,5 and 6 cycles

Address Bus:
PBR,PC
PBR,PC+1
PBR,PC+2
DBR,AAH,AAL+XL
DBR,AA+X
(And if 16 bit then DBR,AA+X+1)

It refers to note 4:
4. Add 1 cycle for indexing across page boundaries, or write, or X=0. When X=1 or in the emulation mode, this cycle contains invalid addresses.

Cheers,
Nick.

Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Phantom reads on 6502, 65C02 and 65816 ol.sc@web.de (Oliver Schmidt) - 2020-05-06 17:04 +0000
  Re: Phantom reads on 6502, 65C02 and 65816 Andy McFadden <thefadden@gmail.com> - 2020-05-06 17:20 -0700
    Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-06 21:15 -0700
      Re: Phantom reads on 6502, 65C02 and 65816 Antoine Vignau <ntn.vignau@gmail.com> - 2020-05-06 23:29 -0700
        Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-07 01:20 -0700
      Re: Phantom reads on 6502, 65C02 and 65816 ol.sc@web.de (Oliver Schmidt) - 2020-05-07 09:33 +0000
        Re: Phantom reads on 6502, 65C02 and 65816 TomCh <tomcharlesworth26@gmail.com> - 2020-05-07 04:48 -0700
          Re: Phantom reads on 6502, 65C02 and 65816 ol.sc@web.de (Oliver Schmidt) - 2020-05-07 12:33 +0000
            Re: Phantom reads on 6502, 65C02 and 65816 kegs@provalid.com (Kent Dickey) - 2020-05-07 09:23 -0500
              Re: Phantom reads on 6502, 65C02 and 65816 Andy McFadden <thefadden@gmail.com> - 2020-05-07 10:02 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Andy McFadden <thefadden@gmail.com> - 2020-05-07 11:27 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Antoine Vignau <ntn.vignau@gmail.com> - 2020-05-07 12:25 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Andy McFadden <thefadden@gmail.com> - 2020-05-16 19:05 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-18 06:09 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Andy McFadden <thefadden@gmail.com> - 2020-05-26 07:42 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-27 00:04 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 Anthony Lawther <alawther@spammenot.mac.com> - 2020-05-09 07:54 +0900
              Re: Phantom reads on 6502, 65C02 and 65816 ol.sc@web.de (Oliver Schmidt) - 2020-05-07 19:28 +0000
              Re: Phantom reads on 6502, 65C02 and 65816 kegs@provalid.com (Kent Dickey) - 2020-05-07 15:16 -0500
                Re: Phantom reads on 6502, 65C02 and 65816 Antoine Vignau <ntn.vignau@gmail.com> - 2020-05-07 15:07 -0700
                Re: Phantom reads on 6502, 65C02 and 65816 kegs@provalid.com (Kent Dickey) - 2020-05-07 19:48 -0500
                Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-07 18:46 -0700
        Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-07 08:32 -0700
          Re: Phantom reads on 6502, 65C02 and 65816 ol.sc@web.de (Oliver Schmidt) - 2020-05-07 19:36 +0000
          Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-07 23:39 -0700
            Re: Phantom reads on 6502, 65C02 and 65816 Antoine Vignau <ntn.vignau@gmail.com> - 2020-05-08 01:20 -0700
              Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-08 01:41 -0700
            Re: Phantom reads on 6502, 65C02 and 65816 Nick Westgate <nick.westgate@gmail.com> - 2020-05-08 05:46 -0700

csiph-web