News for hackers. Stuff that matters.
Re:The Z80's feature discovered after 40 years [video] by japanuspus on Monday October 17, 2022 @03:32AM (#33230716)
Have to upvote - just because Z80: I spend my youth programming this thing literally in hex: To program my Amstrad CPC646, I wrote down opcodes on a piece of paper and then manually translated to hex according to a copy of the Z80 spec sheet I found in the back of some book. Relative jumps were especially fun...

If only I had had the internet, maybe I would have stumbled on the concept of an "assembler". Not sure if it had been more fun? In any case, I did not find the protected mode.

Re:The Z80's feature discovered after 40 years [video] by KingOfCoders on Monday October 17, 2022 @03:57AM (#33230855)
Me too, my first real assembler program was a hex editor with RSX |hex on a CPC464.
Re:The Z80's feature discovered after 40 years [video] by zimpenfish on Monday October 17, 2022 @04:03AM (#33230894)
> In any case, I did not find the protected mode.

Because, unless I'm misunderstanding the video, it doesn't exist until you add a whole bunch of external hardware (which is why the video is clickbait - a fact he acknowledges later.)

Re:The Z80's feature discovered after 40 years [video] by visarga on Monday October 17, 2022 @04:52AM (#33231178)
Just a flip flop and an OR gate.
Re:The Z80's feature discovered after 40 years [video] by qwerty456127 on Monday October 17, 2022 @05:25AM (#33231375)
> until you add a whole bunch of external hardware

Why mind this if the hardware to add is the same level of technology like Z80 itself? I would be glad to build a computer as advanced as possible combining some Z80s and additional HW.

Re:The Z80's feature discovered after 40 years [video] by zimpenfish on Monday October 17, 2022 @06:31AM (#33231711)
> Why mind this if the hardware to add is the same level of technology like Z80 itself?

But it's not "the Z80's protected mode" - it's "the Z80 + an extra circuit to emulate protected mode". It's a super clever hack, yes! But filthy clickbait also.

Re:The Z80's feature discovered after 40 years [video] by mannykannot on Monday October 17, 2022 @09:00AM (#33232847)
There’s a small irony in your clickbait complaint containing a misrepresentation of the content.
Re:The Z80's feature discovered after 40 years [video] by moron4hire on Monday October 17, 2022 @07:10AM (#33231978)
It's not uncommon for chips to support configuring different features by wiring in external components. Though usually they are passive components, this isn't completely absurd.
Re:The Z80's feature discovered after 40 years [video] by korfuri on Monday October 17, 2022 @07:20AM (#33232061)
I mean, true, but "a whole bunch" is kind of misleading. It's a really clever hack using really a tiny amount of extra gates. It's still a very cool and innovative hack that nobody really had thought about before.
Re:The Z80's feature discovered after 40 years [video] by vintermann on Monday October 17, 2022 @08:45AM (#33232723)
Reminds me of the printer interrupt hack Darklite/Offence used for their Tiki-100 demos.

The Tiki-100 is an obscure Norwegian 8-bit computer from 1984, also Z80-based. It had nice graphics for its time, with 16 colours from a 256-colour palette. However, it was very hard to use productively, since the machine had no video sync interrupts.

What the guys in the demogroups figured out, was that it did have parallel port interrupts, and with a tiny hardware mod (just a wire from the expansion port to the parallel port), they could "steal" those for Commodore 64-style raster interrupts.

Re:The Z80's feature discovered after 40 years [video] by actionfromafar on Monday October 17, 2022 @09:16AM (#33233025)
Heck, one could connect a Commodore 64 to the Tiki and get synced frames.
Re:The Z80's feature discovered after 40 years [video] by rep_lodsb on Monday October 17, 2022 @09:34AM (#33233227)
It certainly has been thought of before. Using external circuitry to remap the address space was common with lots of different processors, and once you have that (and a way to jump to a controlled address from hardware) it's a logical next step.

That it wasn't something usual with microcomputers of the time wasn't because it would have required some uniquely clever design. Rather it had to do with them being single-user/single-task, with simple operating systems where programs were expected to have full access to the machine.

Re:The Z80's feature discovered after 40 years [video] by kragen on Monday October 17, 2022 @04:06PM (#33238867)
Yes, there were lots of 8-bitters that used bank switching. But I think you have the causality somewhat backwards. 8-bitters didn't lack memory protection because they didn't have operating systems that could use it; rather, their operating systems couldn't use it because it wasn't there. Multitasking was of course useful, then as now, and sometimes people did do multitasking on them despite the generally limited memory; it was just less reliable because programs could crash each other. Multitasking was common in real-time control, which is how THERAC-25 happened (on a non-8-bit machine, but due to a race condition between threads).

A common use for multitasking in the 8-bitter era was print spooling; it was very inconvenient to have to wait for your document to finish printing before you could continue editing! People frequently bought external hardware printer spooler boxes to connect between their computer and printer because of this. Similarly, duplicating floppies was pretty inconvenient because you couldn't do anything else while it was happening, even if you had four floppy drives like I did, with literal megabytes of storage space available to read porn or play video games while the floppies were copying.

Re:The Z80's feature discovered after 40 years [video] by waynecochran on Monday October 17, 2022 @11:10AM (#33234561)
Yeah, but as the author says, it renders the whole maskable interrupt system useless… so it is not something you would do since it would undermine too many useful parts of the chip.
Re:The Z80's feature discovered after 40 years [video] by kazinator on Monday October 17, 2022 @05:19PM (#33239646)
Using external signals for some sort of protection isn't innovative. This is a documented feature of the Intel 8086: the S3 and S4 pins expose which memory segment is being accessed: code, data, stack or extra segment.
Re:The Z80's feature discovered after 40 years [video] by II2II on Monday October 17, 2022 @08:27AM (#33232590)
Sure, but if memory serves me correctly, many early workstations used a microprocessor with an external MMU. It is misleading in the sense that it is not part of the Z80, but it is in the character of the times. (And MMUs are not the only CPU feature that was originally external. The FPU is an example that more people will be familiar with since it was an upgrade path available on many personal computers.)
Re:The Z80's feature discovered after 40 years [video] by jandrese on Monday October 17, 2022 @11:19AM (#33234735)
I don't think MMUs were common on machines that ran on a Z80 however.
Re:The Z80's feature discovered after 40 years [video] by DonHopkins on Monday October 17, 2022 @12:24PM (#33235827)
The home-brew pager (MMU) of the MIT-MC PDP-10 KL10 was appropriately called "KL-UDGE". (KL was the prefix of the PDP-10 model).

https://en.wikipedia.org/wiki/Kludge

It's on display at the Paul G. Allen Living Computer Museum.

https://sites.google.com/site/mthompsonorg/Home/pdp-10/pdp-1...

https://donhopkins.com/home/catalog/images/mc-console.jpg

Lars Brinkhoff has taken photos of KL-UDGE blinken lights panel and naked wire wrap boards:

https://twitter.com/larsbrinkhoff/status/1128601896619524097

>Photo 6/7: KL-UDGE lights panel

>Photo 7/7: KL-UDGE boards. Real-time time of day clock?

Re:The Z80's feature discovered after 40 years [video] by wk_end on Monday October 17, 2022 @02:57PM (#33238030)
Was on display. The LCM closed due to COVID and there's no indication that it's coming back, sadly.
Re:The Z80's feature discovered after 40 years [video] by 300bps on Monday October 17, 2022 @02:42PM (#33237866)
The Commodore 128 had an 8502 CPU, a Z-80 CPU and an 8722 MMU.

Was a pretty popular machine - sold 5.7 units worldwide. But probably only a tiny fraction actually used the CP/M mode that used the Z80.

Re:The Z80's feature discovered after 40 years [video] by philistine on Monday October 17, 2022 @03:50PM (#33238662)
I don't know what's more concerning. The fact they only sold 5.7 units, or the fact someone managed to only buy .7 of a Commodore 128.
Re:The Z80's feature discovered after 40 years [video] by otto2 on Monday October 17, 2022 @09:00PM (#33241720)
The sixth unit had CP/M disabled, so accountants wrote it down as 0.7 units.
Re:The Z80's feature discovered after 40 years [video] by jandrese on Monday October 17, 2022 @07:17PM (#33240808)
Wow, I had no idea there was basically a second computer hiding inside of the C128. No wonder it cost so much.
Re:The Z80's feature discovered after 40 years [video] by anticensor on Tuesday October 18, 2022 @10:38AM (#33247893)
Did you mean 5.7M?
Re:The Z80's feature discovered after 40 years [video] by NegativeLatency on Monday October 17, 2022 @04:44PM (#33239290)
For example a Programmable MMU was an optional add on for the Macintosh II (which wasn’t a z80 but serves to illustrate the time when they began to become available to home computers)
Re:The Z80's feature discovered after 40 years [video] by mdp2021 on Monday October 17, 2022 @04:11AM (#33230930)
> If only I had had

I never understood how the English, and sometimes the Dutch, seemed in general to be able to learn many times faster than amateurs in other territories. Sometimes with borrowed machines! "They gave me this, and after some weeks I had my first videogame working". I guess/ed it may have been a matter of human network - of being able to find knowledgeable people in the neighborhood to learn and exchange -, but it seems to have been often a solitary effort. It seems in a way like a talent, like that of the Scots for inventions, but there have to be keys that made kids talented coders through their own natural grit.

Others have had difficulties in finding documentation alone, not to mention competent peers.

Re:The Z80's feature discovered after 40 years [video] by josh2600 on Monday October 17, 2022 @04:13AM (#33230940)
I’ve found that there are oddballs in just about every culture who make new things. Some cultures celebrate them, others don’t. The most tolerant cultures tend to get the most interesting new art.

Edit: corollary, some of the best new art happens in the most restrictive environments. Maybe it’s a case of living at the extremes?

Re:The Z80's feature discovered after 40 years [video] by mdp2021 on Monday October 17, 2022 @04:32AM (#33231055)
I think that some environments raised kids to be grittier, more focused on getting results (and less e.g. prone to consume time in entertainment).

> some of the best new art happens in the most restrictive environments

You reminded me of Paul Buchanan, frontman of The Blue Nile, revealing that they would compose and rehearse standing shoulders to a wall in a narrow corridor in a house in Glasgow - that was the room they had.

Re:The Z80's feature discovered after 40 years [video] by josh2600 on Monday October 17, 2022 @06:24AM (#33231671)
So real.

I grew up real poor and it made me hungry. I think that's where a lot of the hacker mentality comes from, one form of poverty or another.

I am hoping to raise children soon and I am wondering how to help them to feel a hunger for the world without suffering in the same way I was raised. It's hard for me to imagine how they'll learn to thirst for the experience of the world if they don't have the same socioeconomic pressures, but I think that will be one of my most profound growing experiences in this life. I intend to accept them for who they are and to try to give them as much opportunity as they can stomach.

Re:The Z80's feature discovered after 40 years [video] by Someone on Monday October 17, 2022 @06:08AM (#33231574)
I guess it may help achieving Goethes “In der Beschränkung zeigt such erst der Meister” (“the master shows himself through restriction” / Antoine de Saint Exupery’s “la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher” (“perfection is not achieved when there is nothing left to add, but when there is nothing left to take away”)

If you have little to work with, adding stuff often forces you to remove or shrink something else.

Re:The Z80's feature discovered after 40 years [video] by benj111 on Monday October 17, 2022 @04:38AM (#33231101)
Speaking as a Brit. I don't think we have the capacity to learn many times faster.

I suppose there is something in our culture. A lot of inventions and science has come out of the UK.

There's also an (I assume) cultural phenomenon of tinkering in the garden shed.

I suppose there's the Protestant work ethic, the ethic of self improvement, a general acceptance and perhaps celebration of odd balls and tinkerers.

It the field of computing, it probably helps that we speak the same language (ISH) as the us, where a lot of this tech came from, but didn't have the money to just buy solutions.

But I don't really have any experience of other cultures in this context to say whether these things are unique.

Re:The Z80's feature discovered after 40 years [video] by _0ffh on Monday October 17, 2022 @04:51AM (#33231175)
>It the field of computing, it probably helps that we speak the same language

Then again, I think working through untranslated English material for my computer hobby helped me gain language proficiency more quickly than many peers.

Re:The Z80's feature discovered after 40 years [video] by mdp2021 on Monday October 17, 2022 @05:02AM (#33231236)
My first word in English had most probably been 'ready' ;)
Re:The Z80's feature discovered after 40 years [video] by benj111 on Monday October 17, 2022 @10:52AM (#33234311)
True. But if I'm reading z80 documentation, I'm going to be able to read it more easily. Plus I don't have to be also willing to learn a second language.

Of course in the end you have computing skills and a second language.

Slightly off topic question though. Are programming constructs based around or influenced English making it easier to learn as an anglophone?

Would (true)if be more common, or do{}while(true) be more common if English weren't the Lingua Franca?

I know you could find examples of these in many languages, but they aren't 'standard'

Re:The Z80's feature discovered after 40 years [video] by Brian_K_White on Monday October 17, 2022 @01:04PM (#33236507)
I have wondered about that. Every time a new language or framework attempts or claims to be more natural, I think "for who?"
Re:The Z80's feature discovered after 40 years [video] by mdp2021 on Monday October 17, 2022 @05:00AM (#33231215)
> a general acceptance and perhaps celebration of odd balls and tinkerers

Paradise! (No, really, that is respectful and intelligent - if in general people can perceive that the guy has something, that is already a big social asset.)

> other cultures

Other cultures may be quite diffident and promoting different "values" - in the streets you will more often find "socialites". At the extreme, a Siberian once told me: "They would go and beat up the different. «You are different», they would say, and beat you up".

Re:The Z80's feature discovered after 40 years [video] by benj111 on Monday October 17, 2022 @10:43AM (#33234161)
Well I don't want to over egg our acceptance of 'different', there are certainly differences that aren't accepted, and certainly weren't in the past.
Re:The Z80's feature discovered after 40 years [video] by kolleykibber on Monday October 17, 2022 @06:40AM (#33231770)
For me, as a kid back then it was the magazines. I would wait all month and then devour the latest Felix Denis publication end to end. The editors of these magazines could be considered the orchestrators of the UK 8 bit scene. Manuals were out of my financial reach.
Re:The Z80's feature discovered after 40 years [video] by ChuckNorris89 on Monday October 17, 2022 @04:51AM (#33231173)
>I never understood how the English, and sometimes the Dutch, seemed in general to be able to learn many times faster than amateurs in other territories.

I don't think that's the case, I think it's that the achievements form the English and the Dutch are shared on the English speaking internet so it's more easily to run into them VS for example, the German speaking hackers who, at least in the past, only shared their work on the German speaking internet instead, so their achievements are less likely to get international visibility.

It's the same with other cultures that have a huge population/market share. If you'd venture on the Russian speaking part of the internet, you'll find a gold mine of hacks, cracks, reverse engineering, and crazy software that flies under the radar.

Re:The Z80's feature discovered after 40 years [video] by mdp2021 on Monday October 17, 2022 @05:05AM (#33231252)
> internet

We are talking about the scene in the early '80s.

Products were sold in shops and via mail and were advertised on magazines. Remote networking was on Bulletin Board Systems - and with limited diffusion. The hacker coding his¹ product probably did not easily have those things around.

¹(A 'his' that calls for a pluralized 'her', out of respect to a group that created a closed-doors women-only community in Ireland and produced "women-only" themed adventure games: they were in a way similar to a sect but sold their own software as part of the funding - I cannot remember names right now. I believe there exists a photo of a group of coders with two ladies dressed in Victorian costumes (which apparently were the uniform in said community), after a social gathering. This gives an idea of what could contribute to the scene.)

Re:The Z80's feature discovered after 40 years [video] by ChuckNorris89 on Monday October 17, 2022 @05:22AM (#33231358)
Replace the word internet with various paper based publications and my argument still stands.
Re:The Z80's feature discovered after 40 years [video] by mdp2021 on Monday October 17, 2022 @05:27AM (#33231388)
Sure, but check the distribution of actual products and you go back to the image I drew.
Re:The Z80's feature discovered after 40 years [video] by Lio on Monday October 17, 2022 @05:04AM (#33231251)
I wonder if the presence of other machines in the market made things like assemblers more well known in the UK.

i.e. BBC Micros came with an assembler so it's the kind of thing BBC users would tell CPC464 users about and they would then buy third party.

Why did the BBC Micro have an assembler? Well the people made it started out in a university setting with access to all sorts of things that they wanted on their small computers. So the BBC Micros had networking before most other 8-bit machines simply because the original developers had used it in a research lab.

In other markets you might just be working on your own and so wouldn't know about things like networking because you wouldn't have an immediate need for it.

To quote William Gibson, the future is here already it's just poorly diffused.

Re:The Z80's feature discovered after 40 years [video] by mkr-hn on Monday October 17, 2022 @07:20AM (#33232055)
It was a short hop from picking up Castle of the Winds II at a dollar store to finding out about resource editors and win32 when I wanted to edit the images. The game itself was from 1993, but this was in the late 90s/early 2000s when you could Google stuff like this and land on programming forums. And likely a post from someone else who wanted to do the same thing.

I still had to know about it. If I'd never found Rick Saada's experiment in win32 packaged as a game for a dollar, would I know about any of this? I wonder if the growing availability of the internet has closed the gap any.

Re:The Z80's feature discovered after 40 years [video] by rep_lodsb on Monday October 17, 2022 @09:12AM (#33232990)
Not technically "win32", Saada wrote it to experiment with the new-at-the-time Windows 3.0 API (still 16 bit) while at Microsoft.

It's now in the public domain and should run under Wine on Linux, as well as 32 bit versions of Windows:

http://lkbm.ecritters.biz/cotw/download.html

Re:The Z80's feature discovered after 40 years [video] by mkr-hn on Monday October 17, 2022 @12:15PM (#33235681)
I don't know why I remembered it as win32 from when he wrote about it. Anyway. I remember downloading a save editor from AOL's software center, so the stuff on that page brings back memories. I had a broken 10+ MB save from trying to get every item and explore every block in every dungeon. I'd pile stuff up by category in the middle of town.
Re:The Z80's feature discovered after 40 years [video] by mjw1007 on Monday October 17, 2022 @05:27AM (#33231390)
Here's one example of a network effect that happened without actually meeting other people: I certainly wouldn't have considered spending my pocket money as a thirteen year old on a new copy of the Zaks Z80 book, but I stumbled on a second-hand copy in a charity shop for a few pence.
Re:The Z80's feature discovered after 40 years [video] by Shorel on Monday October 17, 2022 @06:24AM (#33231666)
I think it is also because of the game publishing industry.

I made a Tetris clone in Pascal, running in a 286 machine with 1 MB of RAM. It took me about a week of coding, and it ran as a single segment program, so it was limited to 64Kb of memory.

For me, this was the moment I learn about for loops. The program was a big collection of for loops.

I could have made some original game, but being Colombian, living in Bogotá, no one would have bought it. Everything we had was pirated, so there was no incentive to actually publish anything.

Re:The Z80's feature discovered after 40 years [video] by porlw on Monday October 17, 2022 @11:10AM (#33234566)
I think it was because in the 80's the US was wealthier and systems with disk drives were a lot more common.

People would swap games on disk, and there was less pressure to learn how the underlying system works.

Having a disk drive also enables more complex, larger games, which would be harder to produce as a lone programmer.

Contrast this with the UK - we had much less money, it was common to type games in from magazines, which is how a lot of us learned programming.

We mostly had to make do with tapes, which limits the size of a game and its sound and graphics to physical RAM. It was entirely possible as a lone programmer to create a commercial level game with a few weeks of late night hacking.

Re:The Z80's feature discovered after 40 years [video] by FearNotDaniel on Monday October 17, 2022 @11:14AM (#33234625)
I'm sure media coverage helped. Back in the 8-bit days in the UK there was a regular BBC TV show for computer buffs that introduced a lot of the concepts, and each platform had a minimum of one glossy magazine per month full of tips and info - I remember reading about assemblers for both ZX Spectrum (Z80) and Atari (6502) in these kind of publications, that were widely available at regular newsagents.
Re:The Z80's feature discovered after 40 years [video] by japanuspus on Tuesday October 25, 2022 @10:58AM (#33331397)
Just for context: I grew up in a small village in Denmark. My window to the world was one-hour bus trips to the nearest town which had a decent library, including some computer magazines.

None of my peers did any programming, and since Denmark does not have flat-rate local calls, calling up via modem to connect to a BBS was never really an option -- so there was really no-one to share with. That is certainly somewhere were the internet would have been a plus.

Re:The Z80's feature discovered after 40 years [video] by tluyben2 on Monday October 17, 2022 @04:18AM (#33230970)
Yep, I still know all the hex opcodes of the z80 (MSX) now so many years later. It was nice; just type them in basic, poke and go. I never, at that age, knew the assembler equivalents and didn’t know it was a think until many years later. I learnt c and pascal before having an actually z80 assembler. After that I moved on to Amiga where I did learn 68000 instructions to make demos and games.
Re:The Z80's feature discovered after 40 years [video] by bbojan on Monday October 17, 2022 @04:21AM (#33230986)
Haha, did the same thing also on a CPC464.

I did know about the concept of "assembler", I just wasn't able to obtain one.

Re:The Z80's feature discovered after 40 years [video] by shever73 on Monday October 17, 2022 @04:24AM (#33231012)
Did exactly the same on a ZX Spectrum. Fun times! Sprites drawn on graph paper and every byte was precious.
Re:The Z80's feature discovered after 40 years [video] by Tepix on Monday October 17, 2022 @04:33AM (#33231063)
Having to do the opcode translation to hex manually sounds like torture!

I started with the 6502 on the C64, the Z80 came much later when i wrote some trainer patches for Gameboy ROMs.

Re:The Z80's feature discovered after 40 years [video] by flohofwoe on Monday October 17, 2022 @05:10AM (#33231282)
After a little while you know the most common opcodes without having to look them up, I still have some burned into my brain forever:

LD HL,nnnn: 21 nn nn

LDIR: ED B0

JMP nnnn: C3 nn nn

CALL nnnn: CD nn nn

RET: C9

...etc..., and probably dozens more after getting back into the groove :)

Re:The Z80's feature discovered after 40 years [video] by Tepix on Monday October 17, 2022 @06:29AM (#33231702)
I only remember NOP from x86 assembler: $90
Re:The Z80's feature discovered after 40 years [video] by 0xf00ff00f on Monday October 17, 2022 @11:02AM (#33234459)
Wow, I've just remembered C3, CD and C9. What a blast from the past!
Re:The Z80's feature discovered after 40 years [video] by rwmj on Monday October 17, 2022 @05:18AM (#33231336)
The ZX81 & Spectrum manuals had a big table of opcodes in the back so it wasn't too bad. Most of them you memorized after a while. See page 94 here: http://www.retro8bitcomputers.co.uk/Content/downloads/manual...

Other Z80 computers did have pretty capable assemblers, even with simple macros as I recall.

Re:The Z80's feature discovered after 40 years [video] by mrspuratic on Monday October 17, 2022 @07:16AM (#33232025)
This was the tersest possible listing of opcode mnemonics :/

I cobbled together a basic understanding from various machine code listings (Toni Baker, Your Sinclair IIRC), and my "assembler" was paper, pencil and a FOR/INPUT/POKE loop...

My uncle loaned me a Sharp MZ700 one summer, its manual had a detailed breakdown of Z80 opcodes (in mere 4 pages) which was a revelation to me, and an annotated monitor in assembler. https://archive.org/details/sharpmz700ownersmanual (p160-)

Re:The Z80's feature discovered after 40 years [video] by Gordonjcp on Monday October 17, 2022 @04:46AM (#33231144)
The ZX81 and ZX Spectrum manuals had the character code table (ASCII-ish on the Spectrum, something totally different on the ZX81) alongside all the Z80 mnemonics and their hex and decimal values in the back.

I think the Jupiter Ace manual might have had that too, but it's been a long time since I've even seen my copy of that.

Re:The Z80's feature discovered after 40 years [video] by Starwatcher2001 on Monday October 17, 2022 @05:12AM (#33231294)
I did a lot of that on my CPC464 and TRS-80 too. Thanks for rekindling the memory. Relative jumps were the easiest way to make code relocatable, but you were limited to +/- 128 for an offset.

I used the "Programming the Z-80" book by Rodney Zaks, which is still on my bookshelf. Some manuals just can't be disposed of!

From memory I recall my favourite instruction - LDIR (Z80 block memory move) is EDB0, and JMP is CA.

Slightly more on topic, I piggybacked a 2716 EPROM onto the back of the TRS-80 ROM so I could get to the previous hard-coded RST locations and interrupt vector of the Z80 processor. In a nutshell, that allowed me to stop/debug/hack running programs without software being able to prevent me.

Fun times.

Re:The Z80's feature discovered after 40 years [video] by jgrahamc on Monday October 17, 2022 @05:23AM (#33231367)
I used the "Programming the Z-80" book by Rodney Zaks

I have that and the 6502 book by Zaks also. I read those books when I was a teenager as if they were tomes filled with wisdom of the ancients. I protected them with plastic book covers and wrote my own notes in the margins in pencil. I worked a Saturday job when I was 16 and spent the money on them. At the time they were so expensive!

Re:The Z80's feature discovered after 40 years [video] by davidgerard on Monday October 17, 2022 @06:18AM (#33231638)
same, protective plastic cover and all
Re:The Z80's feature discovered after 40 years [video] by GeorgeTirebiter on Monday October 17, 2022 @02:08PM (#33237484)
Thanks you guys, now the eBay price for those chestnuts has likely doubled! ;-)
Re:The Z80's feature discovered after 40 years [video] by abraae on Monday October 17, 2022 @01:10PM (#33236593)
Ditto, I've been purging my old tech books but I just couldn't let the Zaks book go.
Re:The Z80's feature discovered after 40 years [video] by pmontra on Tuesday October 18, 2022 @04:56PM (#33253812)
Same plastic cover on Zaks' book (it's still there) and excellent paper quality.
Re:The Z80's feature discovered after 40 years [video] by mananaysiempre on Monday October 17, 2022 @05:54AM (#33231509)
There’s an Russian-language memoir[1] by Kronrod (of the ITEP programming school that also includes Adelson-Velskij and Landis of AVL fame and served as the birthplace of ABBYY some decades later) that mentions that for some time, they did things exactly that way, and that it was a small breakthrough to be able to talk about symbolic variables and draw jumps graphically once they had explained to the secretarial staff how to translate that into addresses. So, taking into account the lack of accessible reference material, you are in good company :)

(The book also includes a discussion on VLIW-style microcoding, a plea for more registers, and a note how a population count instruction may be worth including despite its situational utility because of how easy it is to do in hardware compared to a software emulation. That team did one of the first chess programs, though, so it’s not surprising popcount came to minds easily.)

[1] https://www.goodreads.com/book/show/58582645

Re:The Z80's feature discovered after 40 years [video] by wazoox on Monday October 17, 2022 @06:03AM (#33231549)
I knew what an assembler was (because my friend who had a C64 had one), but it was too darn expensive, so I wrote one myself in MSX BASIC :) Though it was very primitive, and didn't implement much more than an opcode table and a load and save to tape feature.
Re:The Z80's feature discovered after 40 years [video] by actionfromafar on Monday October 17, 2022 @09:21AM (#33233086)
I bought one from a classified in a computer magazine. The guy who sold it had written it himself, in hand assembled machine code. I knew there existed other assemblers, but I couldn't find any to pirate or buy.

I didn't have a disk drive, only the standard cassette deck, so before selling it to me he had to slightly rewrite the assembler to support loading and saving programs to cassette.

In the end, the syntax was not exactly like in the Rodney books. Some examples worked, some not, so I resorted quite a bit to hand assembling myself.

Re:The Z80's feature discovered after 40 years [video] by wazoox on Monday October 17, 2022 @12:01PM (#33235450)
As I had the Rodney book (and no disk drive: it was twice as expensive as my computer!) at least I implemented my assembler as the one from the book :)
Re:The Z80's feature discovered after 40 years [video] by pjmlp on Monday October 17, 2022 @06:11AM (#33231593)
I feel you pain, using DATA statements in BASIC, or monitors, as I could not yet afford buying a nice Assembly editor at the time, and there wasn't none I could find on local shops, importing it from some UK store would have been the option.
Re:The Z80's feature discovered after 40 years [video] by davidgerard on Monday October 17, 2022 @06:18AM (#33231636)
did the same with the Rodnay Zaks book to hand. Definitely my favourite tech manual in my early teenage years.
Re:The Z80's feature discovered after 40 years [video] by xattt on Monday October 17, 2022 @06:37AM (#33231751)
What would you say would be a contemporary equivalent for kids to poke around on to the same experience you had back then with the Z80?
Re:The Z80's feature discovered after 40 years [video] by le-mark on Monday October 17, 2022 @07:10AM (#33231977)
This code and go type of environment was indeed the differentiator of those machines. I miss this too. Toward this end, I recently made a JavaScript plus html page with a textbox and canvas element with a simple gfx api. It uses eval to run the code from textbox and draw on the canvas.

I pointed my kids at it to do some coding, they seem to enjoy it.

Re:The Z80's feature discovered after 40 years [video] by markx2 on Monday October 17, 2022 @06:39AM (#33231760)
CPC6128 with among others a MAXAM 1.5 ROM hanging off the back. (Along with PROTEXT).

Couldn't write BASIC to save my life, but Z80 Assembler using MAXAM and the 6128 detailed manual and I flew along happily.

https://www.cpcwiki.eu/imgs/e/e2/Maxam_Manual.pdf

Re:The Z80's feature discovered after 40 years [video] by mattl on Monday October 17, 2022 @08:02AM (#33232380)
464 or 664?
Re:The Z80's feature discovered after 40 years [video] by chx on Monday October 17, 2022 @08:13AM (#33232473)
C9 club members unite!

(I forgot it all. It's been 35 years ago last I did this and high school mostly crowded it out of my memory. But C9 was RET, that I still remember. ZX Spectrum, for me. But Z80 manual (dis)assembly nonetheless.)

Re:The Z80's feature discovered after 40 years [video] by ikari_pl on Monday October 17, 2022 @09:48AM (#33233434)
Nice, you had a spec.

I had Discology, it had built-in disassembler. So I wrote a binary file like 00 00 01 00 00 02 00 00 03... and disassembled, and put in a notebook what code produced what command (then adding different arguments than all zeros, then finding longer opcodes and generating a new file for them...)

Re:The Z80's feature discovered after 40 years [video] by moosedev on Monday October 17, 2022 @11:17AM (#33234676)
> To program my Amstrad CPC646

Now I wonder if you meant CPC464 or CPC664 :)

(Probably the former, as the 664 was relatively rare, at least in my experience. I’m not sure I ever saw one.)

Re:The Z80's feature discovered after 40 years [video] by bch on Monday October 17, 2022 @01:25PM (#33236835)
My “paper programming” experience was about the same, but on the Vic-20 and Commodore-64. Only later did I realize the mnemonics could be coded directly, rather than me getting the decimal opcodes from a table and POKE-ing them into memory.
Re:The Z80's feature discovered after 40 years [video] by craig_livpl on Monday October 17, 2022 @02:20PM (#33237610)
I did the same, but with an Oric Atmos (6502). It came with an amazing manual, which I've recently had another look at. It taught BASIC, character graphics, machine code, binary and how negative numbers are represented, memory addressing, addressing modes, registers, and the instruction set, explaining each instruction, the machine's memory map, ASCII, lists of binary, hex and decimal conversions and tables of op-codes, ROM routines with call and return parameter registers, circuitry of the machine, and a decent index. I think I learnt more about computers from that book than from any other.
Re:The Z80's feature discovered after 40 years [video] by natas on Monday October 17, 2022 @02:21PM (#33237622)
the 464 was a ton of fun, I spent more time with it than my own family.
Re:The Z80's feature discovered after 40 years [video] by JoeAltmaier on Monday October 17, 2022 @03:13PM (#33238212)
Curious note: the opcode space of the Z80 was best viewed in octal, not hex. The first 2 bit decoded the instruction class e.g. 01 was the MOV set of instructions. The next 3 bits were register destination; the last three were register source?

Registers were numbered [0-7] b,c,d,e,h,l,m,a if I remember right. h and l were 'high' and 'low' part of the 16-bit indirect 'm' memory address.

So in octal, 134 was "mov e,h".

You now know 1/4 of the entire Z80 instruction set!

Re:The Z80's feature discovered after 40 years [video] by mfuzzey on Monday October 17, 2022 @04:46PM (#33239307)
I did that too, on a ZX80 back. Well after a week of doing it using a book and caclulating relative jumps (the backawards ones were worse) by hand I thought "there has to be a better way" and wrote my own assembler in BASIC (but I didn't know it was called an assembler at the time)
Re:The Z80's feature discovered after 40 years [video] by kazinator on Monday October 17, 2022 @05:26PM (#33239711)
> If only I had had the internet ...

I joined the fray later, in the early 1980's. I had access to public libraries, computer magazines like Byte and Creative Computing, computer stores with software, books and magazines, dial-up BBSes, computer expo events, enthusiast meet ups and swap meets, ...

Re:The Z80's feature discovered after 40 years [video] by kazinator on Monday October 17, 2022 @07:44PM (#33241103)
Though knowing what an assembler is didn't translate to easily getting one.

I used an interactive instruction-at-a-time assembler inside the Apple II+ ROM. This was a small level above entering hex. MS-DOS had a similar facility in DEBUG.COM.

Eventually I got my hands on a copy of Randy Hyde's LISA (Laser-Systems Interactive Symbolic Assembler), and was able to make larger, more complex programs.