The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘6502 Assembly’ Category

BBC trip down memory lane – 8bitkick/BBCMicroBot: Runs your tweet on an 8-bit computer emulator

Posted by jpluimers on 2024/03/13

I am publishing this in order of the Twitter bot Social bots appearing, though I found this one later than the Apple ][ equivalent:

[Wayback/Archive] 8bitkick/BBCMicroBot: Runs your tweet on an 8-bit computer emulator which is a GitHub repository with full source code.

The odd thing is that I bumped into it while performing a [Wayback/Archive] bot that reads unicode – Twitter Search / Twitter (I was looking for a bot responding to fancy Unicode in account names and messages that makes using Twitter for visually impaired a pain to use wich I covered in To make Twitter a better place for visually impaired: please do without those fancy Unicode letters in your account and messages – Global Accessibility Awareness Day 2022 – #a11y).

It made me find this thread stat started in spring 2022:

Read the rest of this entry »

Posted in 6502, 6502 Assembly, Assembly Language, BASIC, BBC Micro B, Development, History, SocialMedia, Software Development, Twitter, TwitterBot | Leave a Comment »

The fundamentals of programming, a thread by @isotopp on Twitter

Posted by jpluimers on 2023/03/22

Kristian Kohntöpp publishes great DevOps related threads on Twitter. [Wayback/Archive] Thread by @isotopp “I am Kris, and I am 53 now. I learned programming on a Commodore 64 in 1983. My first real programming language (because C64 isn’t one) was 6502 assembler, forwards and backwards. “ is his response, about a year and a half ago, to a request by Julia Evans (@b0rk) that I also saved: [Wayback/Archive] Thread by @b0rk on Thread Reader App – Thread Reader App.

Her request: [Archive] 🔎Julia Evans🔍 on Twitter: “if you’ve been working in computing for > 15 years — are there fundamentals that you learned “on the job” 15 years ago that you think most people aren’t learning on the job today? (I’m thinking about how for example nobody has ever paid me to write C code)” / Twitter followed by [Archive] 🔎Julia Evans🔍 on Twitter: “I’m especially interested in topics that are still relevant today (like C programming) but are just harder to pick up at work now than they used to be” / Twitter.

The start of his thread is [Archive] Kris on Twitter: “@b0rk I am Kris, and I am 53 now. I learned programming on a Commodore 64 in 1983. My first real programming language (because C64 isn’t one) was 6502 assembler, forwards and backwards.” / Twitter.

Kristian’s story is very similar to mine, though I sooner stepped up the structured programming language ladder as at high school, I had access to an Apple //e with a Z80 card (yes, the SoftCard), so could run CP/M with Turbo Pascal 1.0 (later 2.0 and 3.0) which I partly described in The calculators that got me into programming (via: calculators : Algorithms for the masses – julian m bucknall), followed by early access at the close by university to PC’s running on 8086 and up. The computer science lab, now called Snellius, but back then known as CRI for Centraal RekenInstituut – is now had an educational deal with IBM, which means they switched from the PC/XT to the PC/AT with a 80286 processor as soon as the latter came out).

Read the rest of this entry »

Posted in 6502 Assembly, Assembly Language, Development, ESP32, ESP8266, Software Development, x86 | Leave a Comment »

A refefernce to 6502 by “Remember that in a stack trace, the addresses are return addresses, not call addresses – The Old New Thing”

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: [WayBackRemember 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:

[WayBack6502.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.

[WayBack6502.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 »

The Codeless Code: Ancient code

Posted by jpluimers on 2016/08/10

something like: 100 PRINT “&F2&B&H3&W2Hello, world!”would select font , bold, with triple height and double width, and render “Hello!” on the high-res screen

Source: The Codeless Code: Ancient code – hand coded (on paper) 6502 assembly!

via: 6502 assemblerbeen there, done that – Thomas Mueller (dummzeuch) – Google+

–jeroen

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

MOnSter 6502

Posted by jpluimers on 2016/05/16

This is so impressive: MOnSter 6502 basically a 6502 on a PC board running at 100s of kHz.

via:

–jeroen

Posted in 6502, 6502 Assembly, Assembly Language, Development, History | Leave a Comment »

Easy 6502 by skilldrick: an ebook tutorial to learn 6502 assembly with embedded simulator

Posted by jpluimers on 2015/08/04

A while ago, Alan Cox write a G+ post pointing me to Easy 6502 by skilldrick. The last couple of weeks I finally found time to play with it:

It is a tutorial ebook by Nick Morgan with examples and a play ground based on the adapted JavaScript 6502 assembler and simulator right integrated into a github.io site.

From the perspective of learning assembly language to get a grasp of thinking at the lowest computer abstraction, it is an ideal tutorial: the 6502 is a very simple 8-bit processor with only 3 registers. These restrictions make programming fun.

These are the topics covered:

This is what Alan thinks about it:

… some of the other 6502 tutorials

This one is really really neat – bit more basic than the bits I need to brush up on but really nicely done.

skilldrick.github.io/easy6502/Easy 6502.

via:

Posted in 6502, 6502 Assembly, Assembly Language, Development, History, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »

2 More Old Micro Cornucopia issues on BitSavers from 1986 « The Wiert Corner – irregular stream of stuff

Posted by jpluimers on 2015/06/18

Almost two years ago, I wrote “the only issues missing are #28, #30 and #31.”. As of mid May any more:

All of them are from the 5th anniversary year.

–jeroen

via 2 More Old Micro Cornucopia issues on BitSavers from 1986 « The Wiert Corner – irregular stream of stuff.

Posted in 6502 Assembly, Assembly Language, BitSavers.org, C, C++, Development, History, Pascal, Software Development, Turbo Pascal | Leave a Comment »

Visualisation of the 6502; awesome pictures – via: mos6502 – Google+

Posted by jpluimers on 2015/02/21

visual6502 pictures via: mos6502 – Google+.

I’ve edited their post below to embed all the links.

–jeroen

Original post with embedded links and edited for readablity:

This week, a new visualisation of the 6502, upcycled from an old favourite. Xray6502 uses the data from the visual6502 project to animate the flow of data values around the chip in rainbow colours. Wladimir has put the code up on github[1], and shared some animations on the 6502 forums too – see our featured link.

You may know that visual6502 is a transistor-level simulation of the NMOS 6502 for your browser.  We still see it referenced from time to time[2][3], to explore the circuit and to illustrate exact cycle by cycle behaviour of the chip, and also used to teach the workings of microprocessors in universities[4…7].  It first saw daylight when Greg James presented his findings at SIGGRAPH back in 2010[8], but Greg had been tracing the circuit for much of the previous year. Barry and Brian Silverman had been constructing the circuit simulator and the presentation as a web site. Later that year visual6502.org went live, and went through a series of performance improvements, enhancements and a few bug fixes. It now hosts several simulations, a wiki of notes about the 6502, and several other die photos.

Because visual6502 is open source, it’s been used before for related projects: Michael Steil has published perfect6502[9] which is a C port of the simulation.  Elsewhere we find visual2A03[10] which expands the simulation to the CPU chip in the NES. (But note, to save on duplicated effort, this is a real 6502 simulated, not the one with decimal mode ripped out[11] which is actually in the chip.)

Now Wladimir joins in, with this data-tracing visualisation – what can we expect next?  Have you played with your visual6502 today?

via mos6502 – Google+.

Posted in 6502 Assembly, Assembly Language, Development, Power User | Leave a Comment »

For the 6502, 65c02 and 65816 freaks out there: WDC have made their Programming the 65816 Including the 6502, 65C02 and 65802 available for free again

Posted by jpluimers on 2014/12/24

Cool:

Shared publicly

For the 6502, 65c02 and 65816 freaks out there: WDC, who still produce the chips, have made their Programming the 65816 Including the 6502, 65C02 and 65802 available for free again (see link below). It’s the standard reference for the new version of these CPUs. Yes, this will be on the test. Ping +Alan Cox HT to BDD on 6502.org

–jeroen

For the 6502, 65c02 and 65816 freaks out there: WDC, who still produce the….

Posted in 6502, 6502 Assembly, Assembly Language, Development, History | Leave a Comment »