Maybe you all knew this already...

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Maybe you all knew this already...

Post by eslapion »

I always wanted an easy way to detect wether a VIC-20 has an original NMOS 6502 or a newer 65C02 inside.

Here's what I found in wikipedia:
The 6502's memory indirect jump instruction, JMP (<address>), is partially broken. If <address> is hex xxFF (i.e., any word ending in FF), the processor will not jump to the address stored in xxFF and xxFF+1 as expected, but rather the one defined by xxFF and xx00 (for example, JMP ($10FF) would jump to the address stored in 10FF and 1000, instead of the one stored in 10FF and 1100). This defect continued through the entire NMOS line, but was corrected in the CMOS derivatives.
Easy enough...
Be normal.
User avatar
TLovskog
Vic 20 Enthusiast
Posts: 194
Joined: Fri Mar 25, 2011 3:16 pm
Location: Kävlinge, Sweden

Post by TLovskog »

I asked a similair question here ...

http://sleepingelephant.com/ipw-web/bul ... php?t=5724

My approach was an undocumented opcode. However I got some better alternatives.

I ended up using the changes in decimal arithmetics.
BR
Thomas Lövskog
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Post by groepaz »

RJBowman
Vic 20 Enthusiast
Posts: 198
Joined: Tue Oct 25, 2011 7:50 pm

Post by RJBowman »

This JMP bug is only for indirectly addressed jumps?
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Yes only for JMP (<ind>).
Post Reply