+++*

Symbolic Forest

A homage to loading screens.

Blog : Posts tagged with ‘computers’

The Paper Archives (part two)

More relics from the past

The previous post in this series is here.

Spending some more time going through the things The Parents should arguably have thrown out decades ago, I came across a leather bag, which seemed to have belonged to my father. Specifically, he seemed to have used it for going to college, in the 1970s. Him being him, he’d never properly cleaned it out, so it had accumulated all manner of things from all across the decade. There were “please explain your non-attendance” slips from 1972; an unread railway society magazine from 1977; and the most recent thing with a date on was an Open University exam paper from 1983. It was about relational database design, and to be honest some of the questions wouldn’t be out of place in a modern exam paper if you asked for the answers in SQL DDL rather than in CODASYL DDL, so I might come back to that and give it its own post. What he scored on the exam, I don’t know. There were coloured pencils, and an unopened packet of gum.

Juicy Fruit gum

It seems to be from before the invention of the Best Before date, but the RRP printed on the side is £0.04.

Slightly more expensive: a rather nice slide rule. Look, it has a Standard Deviation scale and all. Naturally, my dad being my dad, it was still in its case and with the original instruction book, which will be useful if I ever try to work out how to use it.

Slide rule

And finally (for today) I spotted what appeared to be a slip of paper at the bottom of the bag with “NEWTON’S METHOD” written on it in small capitals, in fountain-pen ink. Had he been cheating in his exams? Had he written a crib to the Newton-Raphson method down and slipped it into the bottom of the bag? I pulled it out and…I was wrong.

Paper tape

It was a rolled-up 8-bit paper tape! Presumably with his attempt at a program to numerically solve a particular class of equation using Newton’s method.

I don’t know what type of machine it would have been written for, but I could see that it was likely binary data or text in some unfamiliar encoding, as whichever way around you look at it a good proportion of the high bits would be set so it was unlikely to be ASCII. Assuming I’m holding the tape the right way round, this is a transcription of the first thirty-two bytes…

0A 8D 44 4E C5 A0 35 B8 0A 8D 22 30 A0 59 42 A0 47 4E C9 44 C9 56 C9 44 22 A0 D4 4E C9 D2 50 A0

That’s clearly not ASCII. In fact, I think I know what it might: an 8080/Z80 binary. I recognise those repeated C9 bytes: that’s the opcode for the ret instruction, which has survived all the way through to the modern-day x64 instruction set. If I try to hand-disassemble those few bytes assuming it’s Z80 code we get:

ld a,(bc)
adc a,l
ld b,h
ld c,(hl)
push bc
and b
dec (hl)
cp b
ld a,(bc)
adc a,l

This isn’t the place to go into Z80 assembler syntax—that might be a topic for the future—other than to say that it reads left-to-right and brackets are a pointer dereference, so ld c,(hl) means “put the value in register c into the memory location whose address is in register hl. As valid code it doesn’t look too promising to my eyes—I didn’t even realise dec (hl) was something you could do—but I’ve never been any sort of assembly language expert. The “code” clearly does start off making assumptions about the state of the registers, but on some operating systems that would make sense. This disassembly only takes us as far as the repeated 0A8D, though: maybe that’s some sort of marker separating segments of the file, and the actual code is yet to come. The disassembly continues…

ld (&a030),hl
ld e,c
ld b,d
and b
ld b,a
ld c,(hl)
ret
ld b,h
ret
ld d,(hl)
ret
ld b,h
ld (&a0d4),hl
ld c,(hl)
ret
jp nc,(&a050)

Well, that sort of makes some sort of sense. The instructions that reference fixed addresses all appear to point to a consistent place in the address space. It also implies code and data is in the same address space, in the block starting around &a000 which means you’d expect that some of the binary wouldn’t make sense when decompiled. If this was some other arbitrary data, I’d expect references like that to be scattered around at random locations. As the label says this is an implementation of Newton’s method, we can probably assume that this is a college program that includes an implementation of some mathematical function, an implementation of its first derivative, and the Newton’s method code that calls the first two repeatedly to find a solution for the first. I wouldn’t expect it to be so sophisticated as to be able to operate on any arbitrary function, or to work out the derivative function itself.

If I could find jumps or calls pointing to the instructions after those ret opcodes, I’d be happier. Maybe, if I ever have too much time on my hands, I’ll try to decompile the whole thing.

The next post in this series is here

Geek news, not Greek news

Or, the Eurovision

I seem to have got the stupid thing working sort-of reliably now, by unplugging the old Windows hard disk completely. Well, I hardly ever used it. It’s not crashed at all since I did that.

Saturday night: I wasn’t impressed by the Eurovision result, but I wasn’t impressed by the songs generally. Ah, well. It’s always a big disappointment, I think: the song you want to win never does. Slovenia were working on the right lines by going for a complete camp-overload—isn’t that the whole point of the thing? Jessica Garlick would have done better if she’d worn shoes that matched her outfit, I think. And why did Malta do so well, anyway, when it sounded just like the music from Wish You Were Here? I kept having visions of Judith Chalmers.

Dimitra said she wants to forget all about this year’s song content so she can forget the Greek entry ever existed. It was definitely going into “so bad it’s good” territory—I couldn’t keep a straight face through it.

Fingers crossed...

Trying to bring things back to life

Well, it’s still broken. Sort of. I managed to get it running again most of the time—I’m not sure really how—but every so often the disk drive starts making nasty clonking noises and the whole thing just freezes. Actually, it did The Noises just then, but for some reason kept on working.

Because I’ve not been writing things down, I don’t seem to have anything interesting to write down. I quickly got bored of going back and forth to an internet café every two or three days to read all my email (I know, too many mailing lists). I was planning to take up lots of exciting new activities—and especially, get some more things ready to type and put up elsewhere on this site. But, um, I haven’t. I wrote a letter to a friend in the US, two poems to post to one of the many, many mailing lists, and that was about it. Oh, and I managed to get two friends’ computers online. No self-interest there, of course. One of them paid me in cake, which has to be a good thing.

If you go to Not You, The Other One, you can read all about what students at my university were like. Not me though, of course. Everyone else seemed to be Dead Posh. When I worked in the library, behind the counter, we could see what the students’ names were when their matric cards got scanned. There was a frightening number of people with names like “The Honourable James Twistleton Ponsonby-Smythe”. I had friends whose flatmates thought a nice weekend in the middle of term was a quick flight to Switzerland, for the skiing.

Oh, of course, I have to remind you that it’s the Eurovision on Saturday. My friend W (the actor) would be terribly disappointed if I didn’t point it out.

Update, 27th April 2022: Not You, The Other One no longer seems to be online these days, although its writer is still around and about on social media.

Aaargh

Or, technical failure

So, the computer has broken. The bastard. I won’t be writing much until I manage to get it fixed, which will probably take a couple of weeks at least. I managed this by persuading a friend to let me use his machine.