instruction logic reference?

Programming the 6502 microprocessor and its relatives in assembly and other languages.
JimDrew
Posts: 107
Joined: 14 Oct 2012

Re: instruction logic reference?

Post by JimDrew »

There is an error in the information on this website concerning interrupts. Please see: http://homepage.ntlworld.com/cyborgsyst ... 02.htm#INT

Look at the last line under the "How can I DISable Interrupts?" section:

# This is done with the STI instruction.

Looks like someone was thinking 80x86 when they wrote that. :)
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: instruction logic reference?

Post by BigDumbDinosaur »

JimDrew wrote:
There is an error in the information on this website concerning interrupts. Please see: http://homepage.ntlworld.com/cyborgsyst ... 02.htm#INT

Look at the last line under the "How can I DISable Interrupts?" section:

# This is done with the STI instruction.

Looks like someone was thinking 80x86 when they wrote that. :)
That page has a number of errors that have persisted for a number of years. Better to read Garth's interrupt primer, which is accurate.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Hobbit1972
Posts: 80
Joined: 10 Feb 2015
Location: Germany

Re:

Post by Hobbit1972 »

The SO pin:
Thowllly wrote:
Input, the pin effect the register. I think it's edge sensitive, but don't remember which edge.
The falling edge of SO pin will set the oVerflow bit.
giszo
Posts: 1
Joined: 28 Sep 2015

Re: instruction logic reference?

Post by giszo »

I was reading the instruction reference of ASL while I noticed that the example is incorrect.

The pseudocode of the logic is saying that the highest bit is shifted into the Carry flag (P.C = B.7), but the below example is setting Carry to zero, while the highest bit before the shift operation was one.

Code: Select all

 Before: 	
 P.C = ?   B = 1 1 1 0  1 1 1 0 

 After: 
 P.C = 0   B = 1 1 0 1  1 1 0 0 
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: instruction logic reference?

Post by BigEd »

Quite right. I wonder if they were experimenting using a buggy emulator.
Here's the proof:
http://visual6502.org/JSSim/expert.html ... a9ee0aeaea
Post Reply