nesdev.com
http://forums.nesdev.com/

Opcode numbers on 6502.txt
http://forums.nesdev.com/viewtopic.php?f=2&t=18174
Page 1 of 1

Author:  elsteveogrande [ Sun Dec 23, 2018 1:13 pm ]
Post subject:  Opcode numbers on 6502.txt

Just wanted to mention something -- this page has a couple of minor mistakes. (And I'm not sure who to contact about it :)

http://nesdev.com/6502.txt

The STA section has a couple of incorrect opcode numbers. (Same incorrect numbers are in the by-opcode-number listing, though they're in the right spot.)

Code:
  STA                  STA Store accumulator in memory                  STA

  Operation:  A -> M                                    N Z C I D V
                                                        _ _ _ _ _ _
                                (Ref: 2.1.2)
  +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Zero Page     |   STA Oper            |    85   |    2    |    3     |
  |  Zero Page,X   |   STA Oper,X          |    95   |    2    |    4     |
  |  Absolute      |   STA Oper            |    80   |    3    |    4     |   <-- opcode should be 8D
  |  Absolute,X    |   STA Oper,X          |    90   |    3    |    5     |   <-- opcode should be 9D
  |  Absolute,Y    |   STA Oper, Y         |    99   |    3    |    5     |
  |  (Indirect,X)  |   STA (Oper,X)        |    81   |    2    |    6     |
  |  (Indirect),Y  |   STA (Oper),Y        |    91   |    2    |    6     |
  +----------------+-----------------------+---------+---------+----------+


I noticed this after being tripped up for a while when decoding some instructions incorrectly.

(Another opcode map for reference: http://nparker.llx.com/a2/opcodes.html )

Thanks all! Cheers :beer:

Author:  NovaSquirrel [ Sun Dec 23, 2018 1:45 pm ]
Post subject:  Re: Opcode numbers on 6502.txt

That's a document that's just up for historical reasons alongside the others on the archive page and many of those are known to be wrong in some fashion. Though, this looks like a bad OCR? I could see D and 0 getting confused somehow.

Maybe it would be beneficial to have a robots.txt up to prevent people from finding those when looking for actual resources (assuming that's what happened here)? But then that would complicate things if you were specifically looking for those old documents...

Author:  dougeff [ Sun Dec 23, 2018 5:53 pm ]
Post subject:  Re: Opcode numbers on 6502.txt

Looks like Optical Character Recognition (OCR) error. (someone scanned a text page and didn't correct the errors it made.

80 -> 8D

I also commented, several years ago, that this document incorrectly lists PLA as setting no flags. It sets Z and N flags depending on the new value of A.

Author:  rainwarrior [ Sun Dec 23, 2018 5:59 pm ]
Post subject:  Re: Opcode numbers on 6502.txt

This isn't an OCR document. (None of the docs on the old main page are, AFAIK.)

That's just a plain human transcription error. Probably was typed up in EDIT.COM. They did duplicate the error when they made corresponding opcode tables further down in the document, too...

According to the description on the archive page, it was based on the C64 Programmer's Reference Guide. You can see the table they were copying on page 251 (and again on 258), though this source does not have the corresponding errors. (Also gets PLA correct.) Not sure if there were multiple revisions of this book.

Author:  nocash [ Mon Dec 24, 2018 12:20 pm ]
Post subject:  Re: Opcode numbers on 6502.txt

Quote:
BS - LDA - Zero Page,X

What kind of humans would write BS instead B5?

Author:  tepples [ Mon Dec 24, 2018 12:38 pm ]
Post subject:  Re: Opcode numbers on 6502.txt

People who aren't fans of the series Babylon 5 perhaps?

Author:  nocash [ Mon Dec 24, 2018 1:57 pm ]
Post subject:  Re: Opcode numbers on 6502.txt

Did you just say that the author of the txt file thinks that Babylon 5 is BULLSHIT?
On the other hand, Eighty and Ninety instead of Eight'dee and Nine'dee does almost certainly hint on voice recognition software with slang filter.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/