The Mudcat Café TM
Thread #72619   Message #1256113
Posted By: HuwG
25-Aug-04 - 07:05 AM
Thread Name: BS: Help El Ted to count to 100 in binary
Subject: RE: BS: Help El Ted to count to 100 in binary
Thanks for your praise, GratefulTed, but has anyone spotted that my code contained an elementary error? (I was going to say deliberate, but I am going to be honest).

In essence, it loops forever. To be correct, it should read:

L@0001:
    mov    ax,[bx]
    add    bx,2
    cmp    ax,dx
    jz      L@0001
    sub    bx,2

    etc.


In contrast to modern, fourth- and fifth-generation programming languages, like C# and .NET and so on, which practically refuse to allow you to write erroneous instructions, never mind try and compile them, assembler code was always teetering on the brink of programmer-induced disaster. A classic computer saying is, "garbage in, garbage out". Twenty years ago, it was quite often a case of "garbage in, irretrievable system crash, with half the hard disk corrupted".


I did Latin at school too. Indeed, a useless language. It also caused me some embarassment when I saw the immortal scene in Monty Python's "Life of Brian" when Centurion John Cleese is correcting Brian's (Graham Chapman) Latin graffiti; I was the only one in the cinema to get that particular joke and had to suffer everyone else staring at me while I nearly burst laughing.


I don't get on too well with Strats myself either, but that's my fault, not that of the elegantly classic design of the Strat. (I tend to smudge notes on it. When I indulge in Blues or anything more raucous, I have an Epiphone SG-310. Mind you, the SG never was a perfect design. The neck and fretboard and pickups are lovely, but the number of times I have hit the pickup selector switch in mid-riff, causing the sound to suddenly go very muddy, makes me cringe.)