Archive for the ‘6502’ Category
Posted by jpluimers on 2018/09/11
On x86/x64/ARM/…:
It’s where the function is going to return to, not where it came from.
And:
Bonus chatter: This reminds me of a quirk of the 6502 processor: When it pushed the return address onto the stack, it actually pushed the return address minus one. This is an artifact of the way the 6502 is implemented, but it results in the nice feature that the stack trace gives you the line number of the call instruction.
Of course, this is all hypothetical, because 6502 debuggers didn’t have fancy features like stack traces or line numbers.
Source: [WayBack] Remember that in a stack trace, the addresses are return addresses, not call addresses – The Old New Thing
Which resulted in these comments at [WayBack] CC +mos6502 – Jeroen Wiert Pluimers – Google+:
- mos6502: And don’t forget the crucial difference in PC on 6502 between RTS and RTI!
- Jeroen Wiert Pluimers: +mos6502 I totally forgot about that one. Thanks for reminding me
<<Note that unlike RTS, the return address on the stack is the actual address rather than the address-1.>>
References:
[WayBack] 6502.org: Tutorials and Aids – RTI
RTI retrieves the Processor Status Word (flags) and the Program Counter from the stack in that order (interrupts push the PC first and then the PSW).
Note that unlike RTS, the return address on the stack is the actual address rather than the address-1.
[WayBack] 6502.org: Tutorials and Aids – RTS
RTS pulls the top two bytes off the stack (low byte first) and transfers program control to that address+1. It is used, as expected, to exit a subroutine invoked via JSR which pushed the address-1.
RTS is frequently used to implement a jump table where addresses-1 are pushed onto the stack and accessed via RTS eg. to access the second of four routines.
–jeroen
Posted in 6502, 6502 Assembly, Assembly Language, Development, History, Software Development, The Old New Thing, Windows Development, x64, x86 | Leave a Comment »
Posted by jpluimers on 2018/05/25
Reminder to self: see if I can order this:
Apple II Ethernet Module – This product is based on the Wiznet W5100 chip. It has an embedded hardware IP stack. Contiki, IP65, Marinetti and ADTPro have been updated to work with the new card.
We will be using Itead as our current PCB supplier.
The card will be assembled by Circuits Central
Source: [WayBack] Welcome to a2RetroSystems
Other links:
–jeroen
Read the rest of this entry »
Posted in //e, 6502, Apple, Apple ][, History, Power User | Leave a Comment »
Posted by jpluimers on 2018/05/21
From a while back: [WayBack] Open Apple #66 (December 2016) : Glenda “The Atom” Adams | Open Apple
This month on Open Apple, we sit down with Glenda Adams, better known on the Apple II as The Atom. She was a cracker of some note back in the 1980s, and she shares great stories with us…
It reminded me of the days I started to learn programming. Good memories. @glenda_atom was way ahead of me (:
–jeroen
Posted in //e, 6502, Apple, Apple ][, Classic Macintosh, History, Macintosh SE/30, Power User | Leave a Comment »
Posted by jpluimers on 2017/11/24
Cool stuff: [WayBack] MCL65
MicroCore Labs MCL65 6502 core
The MC65 is an ultra-small footprint, microsequencer-based, 100% instruction-set compatible, cycle-exact NMOS 6502 core that can be implemented in any FPGA or ASIC technology which can utilize as little as 252 LUTs (0.77%) of a Xilinx Spartan-7 FPGA. It has also been ported to a Xilinx Spartan-3 device where it uses about 10% of the part.
The MCL65 is instruction set compatible with the original NMOS version of the 6502 which was the processor used in computers and game machines such as the Commodore VIC20, Apple II, Atari-2600, and the Commodore-64 as well as many others.
It runs inside an Apple ][ fine: see the below videos by MicroCore Labs
- [WayBack] Download
- [WayBack] MCL65 Working!: The MCL65 is currently running inside of a Commodore VIC-20 computer! I have no game cartridges at the moment, so I am just running the classic a=a+1 BASIC counting program…
- [WayBack] MCL65 running on VIC-20: Here are a few pictures of the MCL65 running on a VIC20. Video is available at MicroCore Labs YouTube Channel
- [WayBack] MCL65 in a Spartan-3: Just ported the MCL65 to a Xilinx Spartan-3 board which contains an XC3S250E. 490 LUTs are used, which is 10% of the device.
- [WayBack] MCL65 running on Atari 2600: The Atari 2600 just arrived in the mail, so replaced the MOS6507 CPU with the MCL65 core which is fitted the Xilinx Spartan-7 board and then to a 28-pin header for the 6507 package…
- [WayBack] MCL65 works in Apple II+: Received the Apple II+ in the mail today but it did not come with any diskettes. I used a terrific tool, ADTPro, to transfer disk images from my PC over to the Apple using the cassette port…
- [WayBack] MCL65 running Apple II+ Programs:I uploaded some videos of the system running a few applications and games. My hope was to test the MCL65 on a variety of programs that could demonstrate the instruction as well as cycle accuracy…
Via:
–jeroen
Read the rest of this entry »
Posted in 6502, History | Leave a Comment »
Posted by jpluimers on 2017/11/13
For everyone who still loves and uses old computers.
Quite a few nice products for your vintage Apple II, //e and //c machines.

Posted in //e, 6502, Apple, Apple I, Apple ][, History, Power User | Leave a Comment »