Geek

Some code I wrote, years ago

Early eighties, to be more precise.

You see, there was Apple DOS (Disk Operating System). And then there were other Disk Operating Systems, faster and therefore better (OK, faster because very often they left out a whole lot of error checking that the Apple DOS performed — but if you have an error there’s not much you can do about it so why check :-)

One of these was Diversi-DOS. It had a splash screen, which of course was stored on the disk, along with display code.

So of course I promptly hacked the splash screen to display my own message. Recently came across a printout from way back then. So here we have some of the first machine code I ever wrote.

086C-   20 2F FB    JSR   $FB2F       JSR $FB2F and $FC58 clears the High-Res and normal text screens.
086F-   20 58 FC    JSR   $FC58
0872-   A0 00       LDY   #$00
0874-   B9 A2 08    LDA   $08A2,Y     Y=0, load from $08A2 (it's down there, 8D 8D 8D etc)
0877-   F0 07       BEQ   $0880       If the value you've loaded is zero, go to $0880 ($00 marks the end)
0879-   20 ED FD    JSR   $FDED       Otherwise print the character ($FDED prints the accumulator A), increment Y
087C-   C8          INY
087D-   4C 74 08    JMP   $0874       And get the next character
0880-   A0 04       LDY   #$04        Now, load Y with 4 and jump to the subroutine at $0895, below.
0882-   20 95 08    JSR   $0895
0885-   C8          INY
0886-   C0 20       CPY   #$20
0888-   D0 F8       BNE   $0882       Then, increment Y and loop, stop when Y reaches $20 (32 -- $ indicates base 16)
088A-   20 95 08    JSR   $0895
088D-   88          DEY               Now do the same thing, but from $20 down to 4.
088E-   C0 04       CPY   #$04
0890-   D0 F8       BNE   $088A
0892-   4C FD 08    JMP   $08FD       And then exit (back to Diversi-DOS)

                                      So here we are with Y=4..31, then 32..5
0895-   98          TYA               Move Y to X via A (because this is how a 6502 works) Second TYA maybe a bug*
0896-   AA          TAX
0897-   98          TYA
0898-   8D 30 C0    STA   $C030       Click the speaker by accessing $C030 (yes, one bit, on or off, no Soundblaster)
089B-   20 A8 FC    JSR   $FCA8       $FCA8 delays for some time dependent on the value in A
089E-   CA          DEX               Now decrement X and loop, i.e. do this as many times as the value in Y
089F-   D0 F6       BNE   $0897
08A1-   60          RTS               And return
08A2-   8D 8D 8D    STA   $8D8D       This is the text that gets displayed by the code up there from $872 to $87E
08A5-   8D 8D 8D    STA   $8D8D       Says "COPIED BY THE DIRTY DEVIL"** in the middle(-ish) of the 40 x 24 screen
08A8-   8D 8D 8D    STA   $8D8D
08AB-   8D 8D 8D    STA   $8D8D
08AE-   A0 A0       LDY   #$A0        $A0 = Spaces
08B0-   A0 A0       LDY   #$A0
08B2-   A0 A0       LDY   #$A0
08B4-   C3          ???               $C3 = C, $CF = O and so on.
08B5-   CF          ???
08B6-   D0 C9       BNE   $0881
08B8-   C5 C4       CMP   $C4
08BA-   A0 C2       LDY   #$C2
08BC-   D9 A0 D4    CMP   $D4A0,Y
08BF-   C8          INY
08C0-   C5 A0       CMP   $A0
08C2-   C4 C9       CPY   $C9
08C4-   D2          ???
08C5-   D4          ???
08C6-   D9 A0 C4    CMP   $C4A0,Y
08C9-   C5 D6       CMP   $D6
08CB-   C9 CC       CMP   #$CC
08CD-   00          BRK

* As I said, the second TYA is not needed, TAX doesn’t change A. But it’s from the earlier code, which didn’t vary the time of each “note”.

** Which is what I called myself waybackwhen.

The result is a sliding note that slows down as it gets lower, then speeds up again. At full volume (erm, there only was one volume) it’s guaranteed to get attention. Of course some guys were much much more into this than I was.

Stay tuned (might take a few years) for when I blog about the digitized voice I once hacked into the Diversi-DOS startup screen… yes, you can recognizably digitize a voice using only one bit.

 

April 1st

From http://www.speedygrl.com/funnies/texts/computer.folklore.from.net.rumors.html

Another story, which took place on April 1st 1984:

I was requested to present Unix software tools to the Software
Workbench undergraduate course. After talking about grep, SCCS,
lex and what not, I described an experimental expert system that
creates applications by combining UNIX tools. Given an English
description of an application, the system produces user manuals.
Given an “O.K.”, it would go on and produce the actual
software.

The system was a success: it kept some of the students busy for
a long time. Here it is, reconstructed from memory:

#!/bin/csh -f
echo “What should your application do?”
echo “Type a short description followed by a control-D”
cat > /dev/null
echo “Working… here is the user’s manual:”.
/usr/games/festoon | some sed | nroff -man | more
echo “Is that O.K? If not, please describe what’s wrong.”
exec /usr/games/doctor

I’m I strange for finding this hilarious?

(Yes, I know the answer, never mind)

Geek line, do not cross.

Continue reading…

Ross Micro Eight (RE-815)

Some people collect tiny transistor radios. I don’t have enough of them to call it a collection but I guess I’m working on it.

The Ross Electronics Corporation imported transistor radios from Japan from 1955 to about 1970. They were located at 589 East Illinois Street and later (I think) 2834 South Lock Street, Chicago. As far as I can tell, there’s no relation to the Ross Radio Company of Youngstown, Ohio.

Here’s a better image of the schematic on the inside of the back cover (yes, there was a time when radios came with schematics).

It would be a mistake to expect good performance from a 1965-ish design running on one 1.5V cell, but the performance of my one is beyond mediocre. But then again, I didn’t really buy it to use it.

Mike has a nicer one, in a box nogal.

A sad day at the de Waal-Hubbard-Blake household

We have at least one copy of everything Sir Pterry ever wrote. At least one, because both Tanya and I were fans long before we met, and the libraries merged.

I discovered Discworld when The Colour of Magic hit paperback, back in ’85 or so. Been hooked since. Re-read the whole thing recently, it’s so obvious that while the author really wants to write parody, the Discworld keeps forcing him back into Being Serious.  And that’s the thing. While Discworld is light-hearted, the issues are serious. You can read right over all of that without skipping a beat, or you can take your time and realise that real issues are being addressed.

*Sigh* I guess we sort of expected him to be Cohen the Barbarian, so adept at surviving that nothing can kill him.

Alas.

Spider, visionary

In 1982, Spider Robinson wrote a short story about copyright law in the future.

Copyright ceases to exist fifty years after the death of the copyright holder.   But the size of the human race has increased drastically since the l900s–and so has the average human lifespan.   Most people in developed nations now expect to live to be a hundred and twenty; you yourself are considerably older.   And so, naturally, S. ‘896 now seeks to extend copyright into perpetuity.”

But

“There are eighty-eight notes.   One hundred and seventy-six, if your ear is good enough to pick out quarter tones.   Add in rests and so forth, different time signatures.   Pick a figure for maximum number of notes a melody can contain.

And one has to conclude that

“Artists have been deluding themselves for centuries with the notion that they create.   In fact they do nothing of the sort.   They discover.   Inherent in the nature of reality are a number of combinations of musical tones that will be perceived as pleasing by a human central nervous system.   For millennia we have been discovering them, implicit in the universe–and telling ourselves that we ‘created’ them.   To create implies infinite possibility, to discover implies finite possibility.

Have you ever seen a cheerful elephant?

 

 

Morse Key No. 19

Trust the military to call a Morse key a “Key and Plug Assembly No. 19”.

It goes with the Wireless Set No. 62, which was vehicle mounted. You strap the key to your leg so that you have one hand free to hold on for dear life while presumably frantically tapping out code with your other hand.

 

 

Fun with TDI plumbing

Is there an echo here?

The one in front was my brother’s car, when he decided to sell it I persuaded my boss to buy it for me. Nice car. Leather interior, just over 300 000 km on the odo. Goes not unlike the proverbial raped ape.

The one at the back belonged to a friend of my brother’s, when she decided to sell it I pounced. Cloth interior (which Tanya prefers), about 380 000 km on the odo, and for some reason doesn’t haul ass as nicely as my one does.

Both are 1.9 TDI, my one’s chassis is 12111 later but my engine is 45 earlier. Chances are they were on the same transport from Wolfsburg to South Africa.

These cars get around eighteen kilos on the litre, or a thousand kilos on a tank, whichever way you slice it that’s pretty damn good.

When I bought #2 I took it down to Barons in Claremont, got them to do the 5 gazillion point check. Mostly because I wanted to make sure the timing belt is OK but you know, it’s a good thing to get an expert under the hood, make sure there are no latent problems.

Yea right.

Fast forward a couple of months and Tanya complains that some dinky little car carrying four farmers and a pig passed her going up Constantia hill, and could I please Do Something.

So I googled it. And then I had a look.

Hmmm. That doesn’t look kosher. Lemme zoom in  a bit.

That’s what almost 400 000 km’s worth of wear and tear looks like. All the vacuum is escaping, leaving nothing for the N75 boost control solenoid, which means you’re now driving a non-turbo diesel.

So new pipe was acquired (from Nesco) and installed and things are back they way they were. Not great, but adequate.

I sure hope they paid more attention to the state of the timing belt.

Uptime

[root@mort ~]# uname -a
Linux mort 2.6.6 #1 Mon May 31 12:28:13 SAST 2004 i686 unknown
[root@mort ~]# uptime
 08:21:51 up 900 days,  2:10,  2 users,  load average: 0.21, 0.08, 0.03
[root@mort ~]#

Try that with Windows.

But they’re moving the datacentre today so that’s as high as it’s going to get for the next couple of years.