I’m feeling kind of nostalgic today so I thought I’d write Hello, world! in Z80 assembly for the ZX Spectrum! The last time I wrote any Z80 assembly was when I was 14 so around 36 years ago! I may be a little rusty!
↫ Old Man By the Sea
It’s easy to tell the world hello in BASIC, but a bit more involved in Z80 assembly.

Ha ha…
BC (and DE). The 8 bit microprocessor did not have native 16-bit registers. However it was able to group two of them to get the same effect (BC = B+C).
This is not too uncommon, though. x86 used register pairs (DX:AX) for division and multiplication for a similar effect. But Z80 had to use this for basic indices. So essentially B and C were almost never separate (You can map them to BH:BL = BX, and others similarly. Though the workhorse is HL = AX essentailly)
I might have done some z80 assembly on TI calculators back in the day, but I was just following along other people’s work.
x86 was really where I learned how to write assembly code proficiently.
All software builds up from relatively simple building blocks. Although x86 protected mode and descriptor tables aren’t very accessible to a newbie, but real mode programming was simple enough. DOS was almost the ideal platform for assembly tinkering! It’s rare that I do any of that anymore, it’s all abstracted away by operating systems and compilers.
Alfman,
DOS was awesome, since it came with a very accessible assembler, debug.com
It was the best thing for a hobbyist like me. No need to buy expensive compiler suits, it just came with the operating system, and arguably “one step better” than GW-BASIC
For nostalgia sake, I found a nice article:
https://susam.net/programming-with-dos-debugger.html
sukru,
I did not find debug to be that useful. Crude and missing instructions…I guess if you had absolutely nothing else. It’s the “edlin” of debuggers 🙂
https://en.wikipedia.org/wiki/Edlin
Turbo debug was a treat though. Borland had the best DOS tools. Even the microsoft shops I was familiar with owned copies and used them over microsoft’s. Borland didn’t last in a windows world though.
A lot of windows shops used Visual Basic for windows stuff: VB4/5/6. You’d think that Visual C would be equally useful, but it was quite bad by comparison. I suppose it was a completely separate team that designed it. I still have the misfortune of supporting old visual C software. DotNET programming is the spiritual successor to VB and a far better choice if one actually has a choice.
Alfman,
We’ll have to agree to disagree on debug.com, … but otherwise
Yes, Visual Basic was awesome. I loved it in VB 5, but VB 6… did not land for me. Don’t get me wrong, I earned some money migrating projects between them, since the automated tools were… crap. But VB 6 was the end of the road.
Ironically, it almost was replaced by Java
Anders Hejlsberg (always misspell his name), after being done with Turbo C++ and Turbo Pascal, moved to Microsoft. Saw the potential of Java being a VB replacement and designed Visual J++
Sun was not happy, they sued, and the rest is history.
Still it could have been a very different world, if Java was first class native language of COM/OLE (VB is just a script on top of COM/OLE + ActiveX for visual controls. Java was a perfect fit for this)
sukru,
Yes, although that’s got a lot to do with vb.net replacing it.
Don’t know anything about that person, he may have genuinely wanted to turn Visual J into the next big thing, however it does seem his work was being used by microsoft to strategically harm Sun: Embrace, extend, extinguish, as we say.
https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish
Microsoft’s plan was always to deprecate java with their own platform. Clearly .net copied a lot from java with a 1:1 relationship between many classes. I actually like .net as a developer, but what microsoft did to sun was scummy.
I think it could have had a huge impact not just on languages, but CPU architectures as well. If the world had gone with java, then commercial software wouldn’t have become eternally dependent on windows & x86. It’s why microsoft had to kill it while pretending to support it.
I was still in the microsoft camp at the time and the performance of java applets was horrendous if you used the java stack that came bundled with windows. Another awesome Java technology was webstart.
Sun demonstrated that portable and decentralized software distribution can be done in a way that works well and is easy for users.. To this day I still wish we had something like this rather than centralized app stores, but for better or worse the leading tech companies were neither fans of portability nor decentralization. They went in the other direction and IMHO we are worse off for it.
Alfman,
i have to stop you right there.
Anders is my childhood hero. He did, among other things:
Turbo Pascal
Borland Pascal
Delphi
and later
Visual J++
C#
adopted TypeScript
Probably one of the most influential figures in software programming. And I would also recommend looking up his peer Don Syme (F#)
(Obligatory wiki: https://en.wikipedia.org/wiki/Anders_Hejlsberg)
Around five years ago I did Assembly language programming for the Game Boy and had so much fun! There’s something special about programming for hardware that is so simple that I can get a complete grasp of the entire device.
Here’s a link to my “Hello, World” code.
https://github.com/drcouzelis/gbgo
drcouzelis,
Pretty neat. What encouraged you to try this?
When I was young, as a kid I took on projects based on how fun I thought they would be. Now that I’m grown up, more experienced and skilled, my work is much less fun than the things I wanted to do and I’m often too tired and busy to use my skills for fun. I’ve talked to a lot of people I know personally and their experience is similar to mine. Too often we become proficient at things that aren’t fun and I know very few people who enjoy going to work.
Of course work is work and you do it to be paid, but given that it takes up most of our lives it seems like humans should be able to find a better way to live life. Uninteresting work should not be taking up most of our lives. Of course I’m getting off topic…