Saturday, December 26, 2009

I'm back...

OK, I'm back.

It was a lovely trip.

And I had a lovely bout of bronchitis.

More later...

Sunday, November 29, 2009

I'm Off!

But not in the way most people think :)

Off on vacation, You may not see anything from me for a few weeks.

Wednesday, November 25, 2009

Upcoming events...

Tomorrow, I run a 10K in the morning, and have Thanksgiving dinner in the afternoon.

On Monday, I board a plane for a warm, sunny destination.

And, as a followup to Apple Update, I have bought a PMP -- a Viewsonic VPD400. 800x480 4.3" screen, plenty of CPU horsepower, lots of codecs. Only 8GB of flash, but it takes MicroSCHC cards so I can carry all the video I can afford...

I would have preferred the VPD500 (5" screen, 16GB of flash), but while it has been announced it is not yet available.

And, for the curious, it's a lot like the Onda 535 (Yah, that's the 545, not 535. I couldn't find a link to the 535, but they are the same in all respects except a 5" screen on the 545). I considered the Onda545 (or even the 797, with a 7" screen!) but
    1) I'd prefer a brand name (and vendor) that was better known in the USA
    2) I was not sure that mp4nation could deliver in time.

And if you are interested in other PMP info, check out PMP Today.

Monday, November 23, 2009

A day that will live in infamy...

Happy Birthday to me,
Happy Birthday to me,
Happy Birthday dear me...
Happy Birthday to me.

What, you thought the subject has some other meaning?

Thursday, November 19, 2009

Not gone and Not forgotten!

This blog, that is.

Right now, it's crunch time at work and I'm getting ready to go on vacation.

No spare time to do anything, including writing blog entries (besides this hastily typed entry).

Sorry, I'll try to make occasional weird comments just to let you know I'm still around...

Friday, November 13, 2009

Personal computing history (part 7)

Despite what we could do with virus scan/removal, the company I worked for (names withheld to protect the guilty^H^H^H^H^H^Hinnocent^H^H^H^H^H^H^H^H^H^H^H^Hno one in particular) was losing it's customer base. We did not have a standout "Windows" program, and the business shrank.

Eventually, it folded.

I took a temporary job doing support work (that stretched to a year and a half, I'm lucky that I got out of there without it being permanent).

There was the "dot-com" boom, where I put in my time with a web startup (they were doing tech support via web interface, and wanted a virus scan component). They wound up with most of the rest of them...

Looking around, I remembered what a friend of mine had told me years ago -- that my skills were a good match for embedded programming. So I went after jobs there.

He was right -- while I had to get "up to speed" on the particular embedded controllers, my experience in assembly language and programming in C right down to the bare metal of the computer was just what they were looking for.

I settled in for the long haul...

Monday, November 9, 2009

Personal computing history (part 6)

And, after a while, DOS was no longer king. Windows ruled.

And with Windows came Microsoft's Word for Windows. Version 6.

And then came macro viruses...

From the anti-virus vendors came much shouting "How do we parse these files? What is in these files?"

And from Microsoft came the grudging reply "We cannot tell you."

Not "Will not". "Cannot".

You see, back then Word files (and Excel files) were saved C++ object streams. To save a WORD file, you had C++ write the associated objects to disk. To read it back, you have C++ read the associated objects from disk.

So nobody had "designed" the file. It was just C++ objects.

If you use the right C++ compiler and objects, everything just works. Use something else...

So, the best that Microsoft (again grudgingly) could do was to provide a "reference" implementation of C++ objects to read/write an appropriate OLE file, and some documentation on the internal WORD objects (complete with bugs...)

So, what do you do with this? Well, the anti-virus vendors split into 2 camps:
      1) Use the reference implementation as the basis of the scanner
      2) Use the reference implementation to figure out the actual binary contents of a .DOC file.

The company I worked for went for option #2. I had much "fun" (for strange values of "fun") translating object streams into actual binary data.

But in the end, we knew what was in a Word file (or Excel file or...). Down to the bit. And could parse a Word file in ANY language...

Wednesday, November 4, 2009

Personal computing history (part 5)

So, I now have a pair of tools:
     VIMas a debugger
and
     CODEGEN as a disassembler.

What do I do with them?

Well, around this time, the company I was working for became involved with the first computer viruses.

And I had tools that would let me simulate running any software, and rip apart programs with ease.

Of course, some viruses tried to make it hard. They didn't want to be traced, or encrypted themselves, or even kept the parts of themselves that were not currently executing encrypted (i.e. decrypt the currently required subroutine before executing it, and re-encrypt it when done. This was the "Whale" virus). None of it mattered. One or two virses (like the "Whale" virus) made me create a "tweaked" version of my tools, but that was hardly even a speed bump.

And so I spent many years disassembling viruses and writing anti-virus software...

Monday, November 2, 2009

Personal computing history (part 4)

As I mentioned last time, the debugger I wrote has 2 instruction decoders. One of which creates both instruction string and executable information.

This turned out to be VERY useful.

Why?

Well, after a while, I also wanted to disassemble programs, not just debug them.

And I had an engine that allowed me to decode instructions and execute them. So I could know not only that a DOS call or BIOS was being made, I could determine what function was being asked for.

Add an algorithm to separate code and data, and you have a very powerful disassembler...

Wednesday, October 28, 2009

Personal computing history (part 3)

The one problem with interpreters (like VIM) is that they are slow.

In fact, VIM used about 400 instructions to interpret a single instruction. So your program ran 400 times slower than normal.

The early PCs and clones were running 8088 chips at 4.77Mhz. Since they weren't all that efficent (not like the single clock instructions of modern chips), you got less than 1 million instructions per second (MIPS). So, at it's fastest, your 1MIPS program was running at
          1000000 / 400 = 2500 instructions per second

Yah, it was slow.

This meant that all sorts of tricks were used to get any little bit of speed out of it that you could.

One of the biggest tasks of the interpreter was instruction decoding. Taking a byte stream like
          A3 34 12
and determinging that this was the instruction
          MOV [1234],AX

If you work with this for a while, you realize that you are much better off if you have two versions of the instruction decoder:
          1) produces readable strings and computer instructions
          2) just produces computer instructions

Most of the interpreters processing will be internal. You are not (usually) going to be watching every instruction. If you don't produce strings for the user (case 2), it is much faster.

If you are going to be producing strings for the user (for example, tracing a critical code section), you are not going to care (in general) how fast the routine is (the user can't keep up with the computer).

So, you trade code space for speed. A common trade-off.

You just have to be VERY SURE that both decoders are "in sync" so you can switch between them without anything breaking (or interpreting instructions incorrectly...)

Monday, October 26, 2009

Personal computing history (part 2)

So, why was this such a big deal?

Well, the best debugger is an interpreter. VIM stands for "VIrtual Machine", and is an interpreter for 8086 machine code.

With it's own memory space, so changing something important (like trashing the interrupt vector table) wouldn't crash the real machine.

Simulated periphirals (like interrupt controllers) and access to the actual machine hardware (keyboard, disk drive) so that it could do real-world simulations (like booting and running a different operating system the the one running VIM). And the ability to turn hardware access off, so you could protect your system from malicious software.

Breakpoint on data access, so you can see how a stray memory pointer is trashing your data.

Breakpoints were setup so that if executing an instruction would cause a breakpoint, the break occurred before that instruction executed (for example, if you wanted to see how memory location 1234 was being overwritten, you could set a breakpoint on 1234. Then, if executing the instruction

MOV BYTE PTR [SI],AL
would write to location 1234, VIM will stop before the instruction executed and trashed memory.)

VIM will also remember the last 2047 instructions executed, so you can figure out just how you got to this point.

Also, save/restore your debugging session to disk. So you can go home for the night and pick up where you left off in the morning. Or play "what if" on code execution, and go back to a known starting state any number of times.

So, I now had a tool that would let me do all sorts of neat stuff. And one that would become the basis for much of my work in the future (though I didn't know it at time time).

Friday, October 23, 2009

Personal computing history (part 1)

A long time ago, I wrote a lot of assembly language. I got very good at it.

Some years later, I was working for a company that did educational software. Back in the mid-80's a lot of PC software was copy protected. This was a major pain for us, as we had a $2000 program (back in the 80's this was even more of a painful cost than it would be now...) that broke when used on a faster (back then, 80286) machine.

So, my boss, knowing how good I was a low-level stuff, asked me to break the copy protection. No DMCA back then, I was free as a bird...

So, I started digging into the program with DEBUG. And taking notes...

After about 10 pages of scatterd notes with cryptic values written on them, I though to myself "Why am I doing this? I have a computer!" and so VIM was born. A month of effort got the basics working, and the copy protection was toast.

...to be continued...

Wednesday, October 21, 2009

Disk Rot...

Well, despite my warnings to others about software vanishing and keeping "old bits" around, I find that I've been bitten...

I'm doing some cleaning in the computer room (getting rid of old junk), and looked in a CD wallet that contains archives of my development work. The disks are succumbing to disk rot -- when I opened the sleeves in the wallet, they took the aluminum layer with them. Oops...

I think this was an interaction between that particular brand of CD and the plastic of the disk sleeve, since other CDs in the same wallet are fine.

Fortunately, I made multiple copies. On CD's from different companies. Stored in different locations and methods (CD wallets vs jewel cases).

I haven't lost anything, but that's just because I'm paranoid about such things. But not everyone is...

Monday, October 19, 2009

Back to work...

no, not you. Me.

About a week and a half ago I received an email from someone who sent me the source to Intel's AEDIT (of which SEE, the editor that came with DeSmet-C, is a clone). He is setting up a website about SEE, and both wanted me to have the AEDIT source (written in PL/M) and to have me "tidy-up" the DeSmet C pages in advance of being spidered by search engines for the new page.

So, this finally got me to get off my duff and post the DeSmet 2.51 C88 reconstruction I had done.

Though, if anyone wants to make a better DeSmet C page, I won't say no...

Also, I've started back in on the 2.51 GEN reconstruction I had started and not finished. This, as I anticipated, is more complex than the C88 reconstruction, as GEN had undergone more changes, both to support "large case" (i.e. large memory model) and to support direct generation of object code (no intermediate assembly language file).

I'm between 1/3 and 1/2 finsished, and plowing through. It's a bit worrysome, though, that I have several functions that I have yet to discover names for. This is probably due to routines that were subsumed by other functions, but it will mean that I have to "guess" names and code structure, which will make the reconstruction less useable. Hopefully I'll find the equivalent later code...

Monday, October 12, 2009

It's loose!

The reconstructed DeSmet C v2.51 source, that is.

It only took me from January 2009 to now to do it...

Friday, October 9, 2009

Easter Eggs, part 2...

Easter Eggs can also be in some surprising places. Like computer chips...

Known as Chip Art, these are microscopic doodles put in chip for fun (or copyright purposes, as described in the above wikipedia article).

Some of it is crude, some wonderfully detailed, all of it fascinating.

Check out Molecular Expressions and Chipworks and see if you really know what's inside your computer...

Thursday, October 8, 2009

Easter Eggs!

OK, not the kind you eat. It's the wrong time of year for that.

But, hidden "goodies" in film, software, TV, or whatnot are called easter eggs.

A common example is a hidden menu selection on a DVD. If you find the right button combination, you are taken to the "hidden" content (commonly a making-of feature or some such).

Another common easter egg is a hidden joke or reference. For example, in LOST, "the numbers" often show up in unexpected places, such as the numbers on police cars in a parking lot.

If you're interested in such things, check out The Easter Egg Archive.

Tuesday, October 6, 2009

Now with more Fiber!

Optical fiber, that is...

It's finally available in our area, so my wife and I have had Verizon FIOS installed.

Even with the "better" package, we have POTS, internet at 25MBPS down / 15MBPS up, and television, with lots of HD channels.

Pretty, and wonderful waste of time...

Wednesday, September 30, 2009

Down and dirty in unix...

Long ago, I used assembly language for the PC (in DOS) every day.

These days, working with microcontrollers, I only dip into assembly when debugging or writing initilization code.

But assembly is far from dead. Even for the PC.

Even for OSes like UNIX.

Yup. While Unix was written in C to be portable, you can get "down and dirty" if you want.

The interface is via (for a PC-based system) INT 80h, which also happens to be the website which teaches an introduction to assembly and UNIX on the PC.

Monday, September 28, 2009

Not forgotten...

You were excited. Waiting with baited breath. The new, must-have video game was finally here!

But that was years ago, and that new, must-have video game is long forgotten. The people who wrote it may have some memories, but the company that published it (and owns the copyright) is long gone.

It's call abandonware. And while someone, somewhere owns the copyright (it's not really abandoned), they don't care enough to either sell it or make it available.

So sites like abandonia exist, keeping the files alive.

Yes, it's technically illegal. But if the owners don't care enough to actually sell it to you or even tell you to stop distributing it, why should you care?

Friday, September 25, 2009

Superheroes: where to find them...

Since you already have the store for Superhero Stuff, keeping an eye on the store would probably be a good place to start.

Or just check out the World Superhero Registry...

Wednesday, September 23, 2009

For the Superhero in you...

When you read comics (admit it, you did!), didn't you ever wonder where all the neat toys came from?

Costumes, masks, gadgets, robots -- everything you needed to combat evil.

Sure, the Superhero is a genius, but who has the time to do it all?

Well, it turns out that Brooklyn Superhero Supply is the source for all your heroic needs.

Check it out, and maybe you can meet <insert your favorite hero or heroine here> and invite them out for coffee...

Monday, September 21, 2009

Instead of reality...

how about a little fantasy?

Steampunk rayguns from Weta.

They're pretty...

Monday, September 14, 2009

Daily routine, Part 1...

Like most people, I have a number of websites I visit regularly.

Some are humorous. Some are news. Some are educational. Some are just plain weird. Some are beautiful. Some are guilty pleasures.

And some fall into more than one category.

Like Astronomy picture of the day.

Often, I get to see a beautiful picture of some marvel of the universe. Othertimes, I get a lesson on science and how it relates to the world. And sometimes I try to see if I'm as smart as a (hypothetical) alien.

If you're not checking APOD daily, why not?

Friday, September 11, 2009

Yesterdays innovation is todays toy...

Long ago (1980!), Sinclair Research introduced the ZX80 computer. In it's own way, it was a marvel of engineering, bringing a real computer to the home for a low price.

I remember seeing the original announcement and lusting over one...

And a few years later, I had some spare money and bought a ZX81 kit. (Didn't work out, though... the PC boards were not solder masked and I wound up with an unfixable solder bridge across a number of traces...)

Today, you can build one yourself.

Or do what I did a couple of years back -- buy one (complete with memory expansion pack) at a computer flea market for a couple of bucks. But building it yourself has a much higher geek factor...

Just remember that you need an analog TV for display...

Wednesday, September 9, 2009

Apple update...

Well, after my previous Apple Disappointment, Apple has finally released it's updated Ipod Touch. Faster processor, more FLASH, and that's about it for anything I would use.

Of course, I've also seen a few alternatives in the meantime.

Archos has the Archos 5 and Archos 7 "Internet Media Tablets", which have a 800 x 480 screen (compared to the iTouchs' 480 x 320). But I've heard bad things about reliability and support.

The Nokia N810 and N900 also have 800 x 480 screens, though I've heard that the n810 doesn't have the CPU horsepower to do video at 800 x 480, and I haven't (yet) yeard about the CPU speed on the n900. And the n900 is expensive...

I'll probably wind up with a Touch, but there are other players out there...

Wednesday, September 2, 2009

I don't want to work today...

and so neither should you.

Instead, go read some computer humor.

Go ahead... your boss never checks up on you.

Friday, August 28, 2009

Kids stuff and old age...

Yesterday I told you about a website (which links to the websites authors blog) full of space art of yesteryear, aimed at children.

I've spent some time looking at his collection, and I find that it makes me quite sad.

I remember some of this from when I was young. Some crude, some wonderful (thank you, Chesley Bonestell). All of it the stuff of dreams.

And I can look at today's space art -- beautifully rendered, with real space photographs as backgrounds. But the soul is gone.

We (as a people) used to dream of the future. Show it to our children and ignite their hopes and imaginations.

Today it seems that we no longer look forward and outward, we just distract ourselves with something shiny and never look behind the curtain.

Thursday, August 27, 2009

Kids stuff...

I almost lost a website (someone else's, not mine...)

Addresses move on the web. And they don't always (or even normally) leave forwarding addreses.

One of these was a website by John Sisson, full of wonderful old space art, some of which I remember as inspiring me when I was a kid (You Will Go To The Moon (see here, too. The original edition is the way to go...)

Think about this site, I decided to go to archive.org and see if it had captured any of his stuff. On one of the last archived pages, I found a pointer to his new website. Win!

Go, look, and dream. It's the first step to the stars...

Monday, August 24, 2009

Back in the day...

you didn't fire up your web browser and look for the latest thing.

Instead, you headed off to the newsstand and bought the latest magazine.

So, for the electronics hobbiest, this mean you had a set of instructions and minimal distractions. And intent...

These days, physical electronics hobby magazines are few and far between. But some of them are still around, and even have web editions.

Nuts and Volts, Silicon Chip, and Circuit Cellar are all still around.

And Makezine, even though not solely dedicated to electronics, started in the age of the web and is very popular.

Go, read, enjoy, and think of what you can do with all the little goodies around you...

Tuesday, August 18, 2009

Some Itty Bitty stuff...

Like TinyBasic and a programming course based on the 1802 microprocessor.

And writing a video game -- 22 years ago!

Go have some fun...

Monday, August 17, 2009

Something to peruse...

Well, after coming back from the Worldcon in Montreal, I was off again for work.

This time, however, it was an un-airconditioned warehouse in Florida. Complete with large spiders and a visiting hawk. In August...

So, while I'm not having fun, why don't you go to the LadSoft website and have fun.

Among other things, they have a couple of C compilers (with source!)

(I like C compilers. With source -- they are fun toys! Does this show?)

Wednesday, August 12, 2009

Fannish Express...

when it absolutely, positively has to get there eventually.

Yah, it's a Fan joke. It's actually fairly common for fans to give something to another fan on their way to a convention, to be passed off at the convention.

No, I didn't do any of this at Anticiption, but an incident there made me think of it.

My wife and I used backpacks to carry stuff around the convention. Very convenient.

On the last day, my wife and I packed our luggage, and started to relax before driving back on Tuesday. After a bit, I realized that I hadn't left my "currently reading" book out for the evening. Looking around, I couldn't find it anywhere in the hotel room.

I almost never lose things, but it can happen. I know I was reading it before my last panel on Monday, so I went back to the Palis to see if I had left it there.

The convention was over, and the place was being cleaned. Went to the room of the panel, not there. Check the chair in the hall where I had been reading it. Not there.

Head down to the information / lost & found table. Nobody there, but there was someone at the nearby table. Lost and found has moved to ConOps at a hotel a few blocks away. Sorry, too busy to call and see if they have it.

So, I walk to the other hotel. I find that Lost & Found was being run by a friend of mine (Hi, Reg!) but she had not see it. But she did suggest that if one of the Palis workers had found it, it would be in their lost and found. So, go back to the Palis and try to find a security guard.

It's getting deserted as the teardown continues. I walk towards the last panel room, thinking that if a worker had found it, it would most likely be someone who's station is in that area. Finally find someone (a waiter pushing a cart, but at least he works for the Palis) and ask him where L & F is.

However, this is overheard by a fan working cleanup. She found a book, check with the people at the end of the hall.

Yup, they have it. They were on their way to ConOps. I intercepted them just in time, otherwise it would have been ships crossing in the night.

All is known to Fans, but it might take a while to find it...

Monday, August 3, 2009

Away for a few days...

Not that I'm keeping to my M - W - F schedule, but I'm about to go on back-to-back trips.

First, my wife and I are going to Anticipation, the 2009 World Science Fiction convention in Montreal. No "spock outfits" for us, but books, movies, panels, more books, and general tourism.

Then, two days after we get back, I'm going to Clearwater, Florida for work.
Current plan is to fly down Thursday, and back either late Saturday or sometime on Sunday. Definately not as much fun...

I don't know how much net access I will have in Montreal, so the best bet for a new update is Wednesday, August 12th.

Thursday, July 30, 2009

Rebuilding Apollo...

or at least the AGC.

OK, I've been busy. Between work and home I occasionally want to run away screaming.

But, to follow up on my previous entry, here's someone who built a AGC. With helpful details and plans to let you follow in their footsteps...

Monday, July 20, 2009

Retro computer hardware...

Before the PC revolution, computers took a lot of dedication.

You spent lots of money (or time, if you didn't have money) to buy / rent / build a computer.

Sometimes it took both money and time. Like building a computer completely out of NAND gates.

But the results could be very impressive. After all, one of these ancient machines took us to the moon 40 years ago today...

Friday, July 17, 2009

In the Beginning...

it wasn't the command line.

The actual beginning was hardwired logic circuits.

Then came machine code.

Then came Assembly language. That's far enough back for me...

So, you want to program your little toy? I've seen lots of programms think that Java or C++ or <insert language of the week here> MUST be the way to do it.

But all of these systems assume lots of system overhead is available. That isn't true for small systems. That's why languages like C and Assembly are the standard in microprocessors.

"But I can do more with <FOO>!" Nope... when all is said and done, everything compiles down the instruction set of the target processor. That's all it can ever be.

While some languages make it easier to do particular things, they cannot make the processor do things that another language cannot.

This brings us to Assembly. Anything that can be done in any language can be done in assembly. No compiler, however smart, can make things more efficient than a good assembly language programmer.

And, if you understand assembly for the target processor, you know what the hardware is and is not capable of. Which means that, even if you use a high level language (and whether or not C counts is a matter of debate), you can write better code because you know how your code is going to map onto the target processor.


So, go to someplace like Webster and find out what a compter is actually capable of.

Tuesday, July 14, 2009

ET Phone home...

or at least Mike S.

He actually ran across my datapackrat website while doing a search on Wendin. And that led him to this blog.

He emailed me (at the datapackrat address), but never replied to my response.

Mike, if you're still out there, feel free to email me about old software.

Wednesday, July 8, 2009

Get them while they're hot...

Since Geocities is going away, I'm going to post all my Geocities links so you can browse them (and maybe archive them) before they are gone.

R. J. Kunh has a site for robot enthusiasts, with microcontroller hardware and software links.

Ted Rossin has an electronics page for PIC microcontrollers, Z8 microcontrollers, and more.

GKDesign has a homepage, with plans for a solid state oscilloscope.

I did have some more, but checking them out I find that they also have independent pages (or, at least, independent DNS). Ricci Bitti does electronics, including a video DVM. Jason Shayer has moved his 80's Marvel Comics page to a blog.

Monday, July 6, 2009

The joy of spending...

Time is money. So is money...

It may sound weird, but with the bad economy interest rates took a steep plunge.

Since my wife and I needed some work on the house (heating and air conditioning, the AC died completely last fall), we decided to refinance at a low rate and take money out to do stuff.

This works because you basically reset the 30 years (or whatever period you had) of your mortage back to 0. With a lower interest rate and a lower principle, you get a lower monthly payment. If you do it right...

So, HVAC has been installed. And since (my wife claims) we aren't going to do this again anytime soon (I want to say 20 years...), we're doing a lot of projects around the house. Some electrical work. New driveway. Refinish floors. New furniture. Plumbing improvements. More.

This is a lot of stuff. And some of it (like floors and furniture) means that we have to have EVERYTHING out of the room(s). So, we're about half moving out of the house to do this. Much fun.

And I don't even want to start thinking about what we have to do with the cats when they need to start working on the floors...

Friday, June 26, 2009

Bye, bye, Goecities...

I've heard that Geocities is going away.

I've mentioned before about how history can just vanish on the web. At least this time, we get some warning.

If you have any links to Geocities accounts, this is a warning to start mirroring...

Monday, June 22, 2009

Out of town...

I'm going to be in Chicago for the next few days, attending the NPE trade show.

In the meantime, relax, have fun, and maybe even enjoy a movie.

Not sure what to watch? Well, the numbers (no, not the Lost numbers...) can give you lots to think about.

It will tell you about what's currently showing or new on DVD.

And check out "Movie archives" under "The movies". You can see what the top movies were in years gone by, and what movies where released in what years. That ought to help you find something to watch.

And check out the DVD release archives, too, for what might be available at your local video store.

Wednesday, June 17, 2009

BOOM!

The wife and I just came back from a little weekend vacation in Montreal, Quebec.

Among other things, we saw
The Eureka Festival, put on by the Montreal science museum.

The opening of the Montreal fireworks festival (BOOM).

The Cirque du Soleil show Ovo.

Pretty good.

And we'll be going back in August for Anticipation, the 2009 world science fiction convention.

Thursday, June 11, 2009

End of an era...

Analog TV (in the US, at least) ends tomorrow (June 12th).

While missing "Mork and Mindy" might be a tragedy for some, I'm going to morn it because of what is being lost in the microcontroller world.

Yup. Analog TV and microcontrollers.

As these little processors have been getting more powerful and faster, they have ventured into the realm of generating TV signals.

Check out PIC-PONG and PIC-TETRIS at Rickard Gunee's website.

Or maybe you'd like an oscilloscope (ok, that's PAL, a european TV standard, not the NTSC of US TV. But it would not be hard to make a NTSC version)?

And check out Jen's page.

This was even taught at universities.

You can still do microcontroller video with a LCD screen, but that takes more hardware (and, important to a hobbyist, more money). Output to a TV was cheap, easy, and everyone had access to one...

Monday, June 8, 2009

Apple disappointment...

WWDC is today. I've been looking at the "live blogs" occasionally.

I'm not an apple fanboy. I don't own any apple hardware. The software I use daily, and the software and development tools I've used for decades will not run on apple machines (not counting emulation).

But, I am jonesing for one thing in particular.

The touch is a really nice true portable video player (the cheap "MP4" players don't actually do MP4).

But, being the sort of person I am (and looking at a couple of 8+ hour flights and other assorted "downtime" situations), I'd like to be able to bring lots of video. And a few games wouldn't hurt.

I would really love a higher resolution screen (480 x 320 is about 1/2 the resolution of a "standard" TV picture). While the small size helps make up for some of the problem (you can't see details that small), it's still going to throw away lots of detail. But not even the new iPhone (the 3GS) has that.

And more processing power means better frame rates.

Also, the touch tops out at twice the storage of the iPhone. That would mean 64GB, so I can bring more than one set of video. If it turns out I don't like something (or just want a change), I can try something else.

It will probably come. Almost certainly before my long flights. But why make me wait?

Wednesday, June 3, 2009

Some amazing photographs...

Rapatronic photos are pictures taken of nuclear explosions.

With a duration on the order of 10 microseconds, taken in the first few milliseconds of an explosion, they are quite amazing and beautiful.

I just don't want to be near one when it's being done...

Check out more pictures here and here, too.

Tuesday, May 26, 2009

People are slime...

or another word starting with 's'.

I was hoping to write a really different blog today, but reality got in the way.

A couple of weeks ago, my wife and I took in a stray cat from the streets that a friend told us about -- a pregnant female. She was called "Mona", because her meow sounded like she was moaning.

The next day we got her to the vet. Nope not pregnant. Not even close. "Mona" was a neutered boy...

Cleaned up, dewormed, treated for fleas, "Mona" was now "Moe." And we took him out for his first "cat pimping" outing. At Petsmart, he looked pretty in the playpen and was active. One couple almost adopted him, but he lost out to a snowshoe siamese lap cat.

The next weekend, I was doing other things, and didn't take the foster babies out.

Then, last Tuesday, a woman looking through at the Stray Cat Blues website sent an email, saying that she was almost certain that Moe was her lost cat, Bentley. And her 4 year old daughter missed her cat.

I sent her more pictures. We made arrangements that I would bring Moe to Petsmart on Saturday, and she would come and positively identify Moe.

On Saturday, I was eager and waiting. But, an hour after she said she would be there, nothing yet. Call and leave voicemail (including phone number). Wait more hours. Try calling again (went to voicemail, but leaving 1 was enough). After a full day there, Moe was going home with me, and nobody had stopped in to see if Moe was their lost cat.

It's now Tuesday. Still no email or phone. If I thought I had found a lost cat, especially one that was a 4 year old daughters pet, I would make damned sure that I checked it out. And if I looked closely at the pictures and decided that this really wasn't the cat, I would at least let the people know that.

As part of cat rescue, we've seen just about everything, including cats thrown out a 4th story window. This is minor in comparison.

People are slime...

Wednesday, May 20, 2009

Ever want to take a picture...

...and all you have is a piece of paper and a roll of film?

No, me neither...

But, it can be done.

It's called a pinhole camera. If you trace the rays coming from a distant object through a tiny hole into a box, you see that the object is focused. If you put a piece of film inside the box, it will be exposed.

So, try it. You can make a mock 35mm camera with the instructions here. And check out the rest of the page, too.

Monday, May 18, 2009

Computational Search Engine Fail...

Wolfram Alpha launches today. It's supposed to be an "intelligent" search engine that can pull together information to answer your questions, not just provide websites that match your keywords.

But, being a good little geek (and with a little nod to Abstrusegoose), I though I would try to break it.

Best Star Trek Captain
fails miserably. It doesn't know what to make of the question.

OK, let's try something simpler
Is Angelina Jolie Hot.
Nope, still nothing.

But, humor aside, it doesn't work as a "search engine". Try searching on "c compiler" and it has no idea what to do.

But, if I enter "23.34 * 1.27" into google, it does know what to do with it.

Nice idea, but chances are I'd type any question into google first, since between it's built in calculator and billions of web page indices the answer is probably already out there. And it won't tell me it doesn't understand the question.

Friday, May 15, 2009

I feel like being a geek...

Actually, I feel like taking a sledge hammer to the prototype board, and deleting with extreme vengence all the source code, including the network backups.

But, that probably isn't a good idea in this job market...

So, instead I think I'll go watch Star Wars.

In glorious ASCII.

Yup. I'm not insane (well, no more than usual).

Make a big bowl of popcorn, fire up your computer, and telnet to towel.blinkenlights.nl and watch the show...

Friday, May 8, 2009

Fanboy time...

OK, despite being busy, I found time last night (May 7, 2009) to catch an IMAX showing of the new "Star Trek" movie with my wife.

We both liked it.

But, despite that, it's not an EXCELLENT movie.

This movie tried to do several things at once:
* Introduce us to the start of the USS Enterprise saga

* Give us fresh young actors in place of our aging heroes

* Reboot the franchise in a way that will not cause the continuity freaks to have kittens

* Be a "summer blockbuster" to bring in more than just the trekkies
(or trekkers...)

* Be "Star Trek"


That's a tall order. They seemed to do this by throwing plot to the wind (the first half actually seems to follow a plot. This did not carry through into the second half).

They also tried to "compress" the evolution of the characters into one movie, so that everything that comes after this is back to the Star Trek universe we all know. This results in weird stuff like a "about-to-be-kicked-out-for-cheating" cadet somehow winding up captain of a starship in the space of a couple of days...

Physical reality was thrown out the window (even more than the original 60's TV series) to make for better eye candy.

On the other hand, the writers have a great knowledge of Star Trek and the characters, and showed us their love of the universe (mostly... Chekov was way too far over the top...). There were cheers in the audience when lines were spoken ("I'm a doctor, not a physicist...", for example). The casting was damned near perfect, and kudos to Bruce Greenwood for a Captain Christopher Pike that brought a maturity and sense of purpose to a noisy, busy film.

So, my recommendation: See the movie on the big screen. You'll love the visuals. And the actors.

And hope the next installment brings in some of the thoughtfulness and philosophy of the original series.

Thursday, April 30, 2009

Work, Work, Work...

Strange, but the recession hits different people in different ways.

I write embedded code for a living, industrial temperature controllers and similiar things. We also provide OEM controllers for a number of industrial equipment manufacturers.

Sales are down. Our customers sales are down. But software development is so busy we've had to hire a contract programmer.

Why? Our customers (particularly the people we do OEM controllers for) are hoping that introducing new products will increase their sales. Especially with a big trade show just around the corner (NPE).

That, combined with a couple of extra foster cats, and I don't have time to relax anymore...

Friday, April 24, 2009

Computer archeology...

(Doing this quickly, forgive me for lack of links...)

Long ago, there was a company called Wendin, that made some DOS shells with VMS and UNIX flavors (called PCVMS and PCNX) (and, if you really look deeply, there was the XTC editor, too).

They also, later, made an Operating System Toolbox (roughly VMS flavored, as I remember) which was intended as the basis of a "roll-your-own" IBM PC operating system.

They then built a DOS clone with the OST, but with multiuser / multitasking support. This was called Wendin DOS.

To help launch this, they had a debugging contest. Buy the "beta" version for a fairly nominal fee, and whoever finds the most bugs wins $500.00.

I won. Since I did assembly language for my anti-virus work and had written my own 8086 machine code interpreter, I went through the DOS functions and COMMAND functions systematically with example programs and found lots of things that didn't work.

Later, there was internal strife in Wendin (father owned the company, sons worked for him). The developers left.

Since I was so good at debugging Wendin DOS, I got hired to keep working on it.

I think I did an OK job, but some of the stuff was beyond me (at that time).

What does this have to do with computer archeology?

Well, as I mentioned before, I'm archiving my floppies.

And I found the source code to Wendin DOS.

It's an older version. Since I didn't write the disk label, I think this is the source code provided to me when I started the job.

Maybe I'll find my development directory in my piles of bits. Maybe not.

But at least this part of computer history (and, yes, it's a minor part) has not been lost.

Friday, April 17, 2009

Encyclopedic knowledge...

of cartoons.

Check out Toonopedia, the Cartoon encyclopedia.

While not encyclopedic in it's depth, it will still keep you busy for hours / days.

Wednesday, April 15, 2009

Technology catches up with history...

OK, I'm back. Sorry I got busy for a few days.

As I've mentioned before, I started computers when you connected a terminal to the computer, typed in your program, saved it, and then ran it (and hope it worked...)

However, back then, the computer you connected to was "big iron", an expensive mainframe that was shared among many users to save on costs.

However, things have gotten smaller, cheaper, and faster. You can have the same experience today with a microcontroller and telnet (or hyperterminal).

Yup... you can take your cheap little microcontroller and run it as an interactive, programmable system like an early mainframe. Only 1 user, but you were only 1 user when you used the mainframe, too...

Check out StickOS for an embedded programming host that runs on multiple CPU types, and PicPuter for a system that runs on a PIC16F877.

Monday, April 6, 2009

Movie Overload, epilogue...

Don't have a lot of time today, so I'll be brief.

One of the shorts in "Hardcore Heroes and Heroines" at the Philadelphia Film Festival was entitiled "Rx/OTC" and part of it's desciption was "Brace yourselves -- there are some things worse than death."

I agree.

Watching this was worse than death.

I had to control myself to keep from shouting out "Can we get this piece of crap off the screen?"

Friday, April 3, 2009

Movie Overload 3...

Another day, another movie. Just one this time (Thursday was a day of rest. Getting to bed before 1am is definately underrated...)

God's Forgotten Town is a Spanish Horror/Thriller that's a dash of X-Files and Raiders of the Lost Arc in a cozy setting. A decent movie, and better pacing than other movies I've seen in this film festival.

This weekend, however, is going to be busy.

On Friday, my wife and I are seeing (after work) Sita Sings The Blues (an animated Indian myth) back to back with Institute Benjamenta (weird as only the Quay brothers can do it). Another late night...

Saturday brings us A Quay Brothers Sampler (some of their short films) and Surveillance (FBI agents try to reconcile accounts of a serial killer).

Sunday is loaded with Straight for the Kill (a series of horror shorts), Hardcore Heroes and Heroines (a series of shorts, not for children or the squeemish), and 9 to 5: Days in Porn (a documentary about being a porn actor as a job) -- all 3 back-to-back.

Wee...

Wednesday, April 1, 2009

Movie Overload 2...

Two more days, two more movies (for me... my wife has been busier than I've been).

The Chaser, a Korean action movie, was pretty good. It might have been tightened up a bit, but that would have resulted in almost continual action (the "boring" stuff gets cut...). Definately not a US movie, they avoided the "happy ending" for one character that is pretty much manditory for a US movie. However, the screenwriter does one thing that I'm finding more and more annoying every time I see it.

When the "bad guy" is down in a fight, FINISH THE JOB so that they do not get up again. You don't put a rabid dog on the floor and turn your back on it. Anyone who ever did this in real life would ONLY DO IT ONCE BEFORE THEY LEARNED, and for it to happen again and again in movies (even though everyone has seen movies where it happens) makes things annoying, not suspenseful.

The Magic Hour is a Japanese comedy, a US 1930's gangster movie set in modern day japan. Yes, it sounds silly. Yes, it is silly. It might have been tightened up (they didn't need to make the same joke several times, even though it was always funny), but it was a a very funny movie and well worth seeing.

My wife also saw 3 more movies. A documentary (Art and Copy), a collecion of shorts about women (My Voice is My Sword) and an Italian drama (A Game for Girls), all of which she enjoyed.

Monday, March 30, 2009

Movie overload...

This week (well, actually starting on March 26 and going through April 6th) is the Philadelphia Film Festival. Time to overload on movies!

So far, I've seen 5 movies (Moon,
I Sell the Dead, Before the Fall, 20th Century Boys, and 20th Century Boys Chapter Two), and my wife has seen 7 (the above, plus Hunger and The Other One).

So far, we're actually a bit disappointed. We would not have seen 20th Century Boys (and Chapter Two) if we had known that it is the start of a trilogy and the 3rd movie has not been released yet, and after seeing the first two I'm not sure it's worth the time to see the third (my wife definately thinks this).

Moon was technically good with great visuals, but my opinion is that just because an idea is new to you doesn't mean that it's a new idea.

I Sell the Dead was OK, and had a sense of humor about itself.

Before the fall could not decide if it was an "end of the world" picture or a "psycho killer" picture. I understand how these two ideas are supposed to play off each other in the movie, but it left things unfocused. Grim and gritty, I liked it but my wife found it was so grim that she couldn't decide if she liked it or not.

Friday, March 27, 2009

Retro Old School Hardware

Back in "the day", computers were expensive. So people worked hard to come up with cheap computers to experiment with. Like the COSMAC ELF.

Powered by an 1802 (still manufactured by Intersil) (which, interestingly, was often used in spacecraft -- the large geometry and silicon on sapphire construction of the chip makes it relatively immune to radiation), the ELF
used (in it's basic configuration) 7-segment LEDs and toggle switches for display and input.

If you want to play with one, you can use a simulator (there are several available), or even buy/build a modern ELF.

Wednesday, March 25, 2009

They don't make them like they used to...

...or do they?

Movies, that is.

Last night, my wife and I saw a preview of Alien Tresspass, which specifically tries to be a 1950's "B movie".

They succeeded.

It's a cute little movie. It doesn't try to be anything more. I've read that it's supposed to be a spoof of a B movie, it's not. It's an homage, that tries to bring back the matinee popcorn movie.

Personally, I think they did a good job.

The one thing that didn't work for me was the flying saucer in flight. On the ground, the physical saucer was fine. But the CGI of it flying was too good. They needed to use a model so it was as cheap and cheezie (though obviously done on a 2008 budget) as the rest of the production.

*** (out of 4)

Monday, March 23, 2009

Watch the skies...

...but not for anything to worry about.

Want to see what's (way) over your head? Check out this real-time, 3-d projection of (some) satellites in orbit.

Wednesday, March 18, 2009

Gone in a FLASH...

In my job, I work with microcontroller based industrial controllers. The products are increasing FLASH based program memory.

This can be a bad thing. People don't often think of it, but FLASH memory is not permanent storage (in fact, just about anything other than MASKED ROM is not permanent storage, but I'm going to keep refering to FLASH as it is the most common storage these days). That's why the startup code in the controllers contains a checksum routine. If the checksum fails, we try to tell the user and don't run the controller. That way, we will not do the wrong thing.

The FLASH lifetime can vary from long to short (see this paper from Texas Insturments, page 5 figure 1. While it is talking about a specific processor, it is similiar for all processors.) About 100 years (at room temperature, 25C) is pretty good. About 4.6 years (at max operating temperature, 70C) is not. (Note that this is under one set of conditions. Under a different set, the rention times are 1315 years and 61 years. Much better, but will everyone, especially "cheap" parts, take the extra time/effort?)

What that means is that, at some point, the product will fail, even though all the components are still "good." What then?

Well, if the manufacturer (us, or someone else) is still in business, they can be "repaired" by re-flashing them. Providing that the code is still around...
If the manufacturer is gone, so is the repair. And no replacements, either. Even a pre-purchased replacement could be useless, unless it was stored under cool conditions.

And what does this mean for consumer electronics? Well, take just one example: computer motherboards.

The BIOS on modern motherboards is FLASH based, not ROM based. That is why it is field upgradeable. But computers tend to run a bit warm. So the FLASH retention lifetime is reduced. And when the FLASH forgets, the BIOS and system bootability is gone. You can't even re-flash it, there is no way to bring up the system to run the FLASH utility, and there is no on-board connector.

So, as you look around your house or work, think of all the intelligent devices. Your clock/radio. Your DVD player. Your toaster. Your programmable thermostat. Your kid's flashing sneakers. All of them waiting to forget their function, and become useless even without any actual failure...

Monday, March 16, 2009

Retro hardware...

Along with old bits, one often needs hold hardware to use them.

While VMware and MAME can help, sometimes you really do need old hardware. But old hardware can be hard to find, and even harder to find in working condition.

Fortunately, some people are creating "new" old hardware. Want to run an APPLE I? Briel Computers can let you do it....

Wednesday, March 11, 2009

Vanishing applications...

I've talked before about the weakness in the web.

It's happened again.

Microchip, the manufactures of PIC microcontrollers, has acquired Hi-Tech Software, who used to produce, among other things a C compiler for PICs. And a freeware compiler for DOS/Windows. An 8051 C compiler. A TI MSP430 compiler. A Cypress PSOC compiler.

But, it's not in Microchip's interest to support competing microcontrollers.

So, all the compilers except for Microchip PIC C have vanished from their webstite. They will support their customers until the end of their contract, but I would not expect much. Nor can anyone download the trial version just to experiment with the chip.

More software has vanished into the "bit bucket..."

Monday, March 9, 2009

Old bits...

I've mentioned before that I save "old bits".

Why? Well, a lot of hard work went into them by someone. There is a lot of good software and wisdom encoded in them.

And I'm not the only one.

Back "in the day", the BBS ruled the roost. Fidonet allowed the interchange of files between computers before the internet became easily accessable.

And the BBS' had files. Lots of them. Some good, many bad, and all of them the apple of someone's eye.

Fortunately, they are not all lost. Places like textfiles.com keep the old stuff alive. And even archive the CD's full of files that were published in the 90's.

Are they what you're looking for for your new PC? Probably not. But there is wisdom deep in the piles of bits...

Friday, March 6, 2009

Man and Superman...

The Watchmen movie is coming out. I'm looking forward to it.

There have been good comic book movies before, but if they did it right (and early reviews are good), this should be great.

But the Watchmen are a far cry from the origin of the superhero. Check out Action Comics #1, and then more early Superman arcana.

And, while you are watching the movie, you may want to keep an eye out for some easter eggs.

Tuesday, March 3, 2009

Another Insane kitty...


You may remember insane kitty from before. You might even remember that there were two insane cats, not just one.

The sister of insane kitty is Hocus Pocus (so named because she had a habit of vanishing as a kitten). She also had gingivitis problems, though not as bad.

Well, she went to the vet yesterday, and is coming home today (since she needs to be tranquilized to be caught, she can't be given anesthetic when she comes in, so she needs to go a day early). She has lost 4 teeth (poor baby), and so I'll be dealing with an insane kitty in a playpen. Sigh...

(Add this to the other two cats that went to the vet yesterday for dental problems, and I'm the one feeling the pain...)

Friday, February 27, 2009

Compiler goodies, part 2...

The DeSmet C compiler uses a "hand-built" parser.

Most compilers these days start with Lex and Yacc. It's simple to build a compiler with them.

But it loses the "personal" flavor...

Wednesday, February 25, 2009

Catching up with history...

OK, I'll admit it. I read comic books as a kid.

I even collected them, since
1) I'm a bit of a packrat
2) I wanted to see how the story started

But this makes me feel bad for people today, who are even furthur away from the characters origins, and have even more to catch up with (who is really going to track down and buy 500+ old issues?). Fortunately, it's easier today.

GIT corp has (for at least some titles) tracked them down for you, and put them conveniently on DVD. Now all you have to do is spend (mumble) hours on your computer reading them all...

Or wait for a Kindle with high resolution color screen and take them all with you...

Wednesday, February 18, 2009

Compiler goodies...

Want to know more about compilers? Read the book (for free)!

_Compiler Construction_ by Nikulas Wirth.

And, a note: I will be out of town for a few days. Next blog update will be on Wednesday, Feb 25th.

Monday, February 16, 2009

The infinite circuit...

Some years ago (2004?) I was writing a simulator for a PIC microcontroller. I though it was a neat project, and maybe someon else would be intersted. So, I put up a website for it.

I wanted to make it look better, so I did a background for it.

Website backgrounds often (though not always) consist of a image that is repeated "forever" (or at least enough to fill the page). So, for a good background, the image should "make sense" when the right/left/top/bottom of one image connets to the corresponding left/right/bottom/top of the adject image (think of the image as the 2-D equivalent to the unit cell in crystalography).

Since I was dealing with microcontrollers and circuits, I decided to make a large "mesh" circuit that could go on forever.

I started with a simple circuit:

that was drawn so that connections on the top would match the connections on the bottom, and connections on the right would match the connections on the left.

So, doing a cut-and-paste, you can see how the circuit matches on top, bottom, right, and left (click on the picture for a better view):


And since each of the new circuit placements can have their own connections, you get a complete grid (click on the picture for a better view):


For the website background, I greyed-out the image so that the text could be read.

I occasionally toyed with the idea of writing software for the processors in the mesh -- something simple that would do a state change based on the linkages to it's neighbors, and see what would evolve in the system. Differences in startup timing and power-up RAM values would create a random starting point for every power cycle, and a new pattern every time.

Why did I use the full-featured (i.e. expensive) 12F675 instead of it's cheaper cousin, the 12F629, or even the lowly 12F508? Because I was working my 12F675 simulator at the time. If it ever gets built, save yourself some money with a simpler chip.

(Note: Edited 2/18/2009 -- I was off by a pixel on my tiled images)

Wednesday, February 11, 2009

Net Neutrality is important!

Sure, you've heard it before.

I'm going to say it again.



And, right now (Feb 11th, 2009), it is under attack by Senator Diane Feinstein. She is trying to put a rider on the bailout bill. It failed when attached in public, but she's trying to put it again, without public knowledge or comment, when the house and senate versions are reconciled.

Don't you love how your rights are sold for a pittace to corporations?

Tuesday, February 10, 2009

Fanboys...

...the movie.

Many years ago, the movie Wargames came out. I saw it with a bunch of my "hacker" friends (before the word gained it's negative connotations). We really enjoyed the movie. Yah, it's a good movie, but it was *REAL*. We knew the people in the movie. They had the culture right. We caught all the little in-jokes, and had a better time than the rest of the audience.

This weekend, my wife and I saw Fanboys. OK, it's not as good as Wargames, but it doesn't deserve the bad reviews it has been getting. If you don't understand the culture it is lampooning, you won't get the jokes.

For us, we know the people in the movie. We understand the culture. We laughed and had a good time.

It's not a "general release" movie, because the general public doesn't know the culture. I want to see the DVD release, to see what it was before they tried to make it "accessable" to the general public. I'll bet it's even better.

Wednesday, February 4, 2009

Satisfy your urges...

Want to indulge your craving for "Space Geek" porn? Head over to Hobbyspace.

Be sure to check out _The Rocket Company_. It's availble at Amazon (buy it through the hobbyspace website, give them some money...)

Monday, February 2, 2009

The metric of a man...

So, my manager decides to talk to myself and two other people (the other software engineer and the EE) the other day, and says that they will be starting an "incentive bonus" plan. We can write our own performance metrics for the bonuses.

In a recession... When sales are flat...

The theory is that we will be going to a 4 day work week, but since the three of us will need to keep working full time, this is a way to keep paying us full salary, despite the fiction of not working full time.

But, this brings up an interesting question -- I write very low level software, to satisfy some very vague specifications. I normally get the schematics from the EE, and start planning, and later get the prototype hardware. Then I have to test the prototype to make sure the EE didn't make any mistakes (I often find one or two, usually something like a missing trace. His layout software is very good, and it uses the netlist from the schematic to try to make sure that all connections are accounted for, but in the last couple of boards we have found that somehow a ground trace gets lost by the software, and so a ground trace is missing. Very annoying...).

Then, I have to get the "application" working. Occasionally I get to write it from scratch. Often I have to take some code written 10 years ago (or longer...) for a different system (that writes down to the bare metal), and get it working on new hardware.

I can give an estimate, but the larger the project (and the more the customer gets to change the specs in the middle), the harder it is to give any estimate at all, let alone one with any accuracy.

So, how do you setup "performace metrics" for such a situation? I sure don't know, and my income will depend on it...

Thursday, January 29, 2009

In the beginning...

I played games on a dial-up teletype connected to a HP 2000C mainframe. Slow and frustrating, it did get me into computers, and I've been there ever since.

Today, I can look back at my humble origins, but I still can't decide if the latest whiz-bang computer game is more fun or not...

Monday, January 26, 2009

Smoke and Mirrors...

The web is a linked world. That's what it was designed to be, and it works.

But, sometimes that can be a problem.

Basically, all information on the web is ephemeral. If you look at a page today, you pull it from the server. If you look at the same page tomorrow, you pull it from the server again. The information that was here today can be gone, like a puff of smoke, tomorrow.

For lots of things, this doesn't matter. Who cares what was on diggs' homepage last year?

But for CNN(for example), we have completely different expectations. If I want to look up which politicians were indicited on Jan 21, 2009 (I can dream, can't I?), but CNN pulled the page after 1 month, how do I look back into history?

Even worse, the Orwellian prospect that history has been changed. Has a name been dropped from the list, or has one been added? A publisher can't recall and change all his "dead tree editions" overnight, but a minute with a keyboard and everyone's history has changed. What, this isn't what was there yesterday? Prove it... (this is why groklaw keeps an archive of all legal documents related to the SCO vs IBM and related cases.)

Sorry, veered off into politics. I must watch myself.

Getting back to my last post, the linked nature of the web's information can be it's weak point. If something happened to me, what would become of (for example) DeSmet C?

In a month or so, my provider would notice that I've stopped paying my bill, and cut off my service. The webserver would no longer be online, and the pages would vanish.

Could the internet archive carry on? To an extent -- it can't save everything, and has a size limit on what it does copy. The files aren't there, only the text.

There are links to the site and it's content, but everyone assumes that the information will be there (effectively) forever. I'm guilty of it, too...

What needs to be done is to not just link, but mirror. Wget is your friend. Disk is cheap.

Has an interesting / worthy site gone away? It doesn't have to vanish forever.

Friday, January 23, 2009

Because newer is not always better...

Sometimes, "new and improved" means it breaks things.

Your favorite feature may not work anymore...

It might not work with your system...

It might not be compatible with older files...

The UI was designed by a color-blind dyslexic student during a Saturday night bender...

And, with the linked nature of the web, chances are everyone links to the "canonical" download site (which will come up in a rant for another day...), so that you don't have a choice about what you are getting.

Unless you go to a site like oldversion.com, where the past versions of software are still available.

Wednesday, January 21, 2009

Geek relaxation...

After all the source code reconstruction articles, it's time for some geeky relaxation.

Go over to comic-images.com and wallow in it!

Monday, January 19, 2009

Re-creating source code, epilogue

So, what's the status of the DeSmet 2.51 recreation?

As of Jan 19, 2009:

The C88 souce has been recreated, compiled, and code equivalency (it's not identical, unfortunately) has been verified.

The GEN source is a work in progress. GEN has actually changed a lot between the versions (GEN was given the ability to generate object code directly, not just assembly), and backtracking it is tedious. That, and our cats (ok, that last page is very out of date. But it gives you an idea...) and work are taking a lot of time.

ASM88 has also changed, but I expect the changes to be fairly minor.

BIND has changed, but again I expect the changes to be fairly minor.

I really need to get off my ass and post at least the C88 source I worked so hard on...

Friday, January 16, 2009

Re-creating source code, Part 8

OK, enough suspense...

DeSmet C was written in DeSmet C.

But which version? Aye, there's the rub.

I don't know.

As I said before, later versions of the compiler have additional functionality and improvements. Part of the improvements is better code generation and register utilization.

For example, the C source file

int i;
char *j
main(argc,argv)
   int argc;
   char *argv[];
   {
   for (i = 0; i < argc; i++)
      j = argv[i];
   }

compiled with either version 2.51 or 3.03 generates (for the "j = argv[i];")

mov   si,word i_
shl   si,1
add   si,word [bp+6]
mov   si,word [si]
mov   word j_,si

but compiled with version 2.40, we get

mov   ax,word i_
shl   ax,1
mov   si,ax
add   si,word [bp+6]
mov   si,word [si]
mov   word j_,si

In addition, the x86 architecture has both "short JMPs" (for locations within
-126 to +129 bytes of the current location) and "long JMPs" (for locations within the current 64K segment). (It also has FAR JMPs, but we don't have to concern ourselves with this for the small memory model of DeSmet C).

All conditional JMPs are "short JMPs" (also called near JMPs). If your conditional has to send you to a location that is furthur away, you have to do a reverse-sense conditional JMP around a long JMP.

The compiler tries to use short JMPs wherever possible (both unconditional and conditional) to produce smaller executables. But, trying to guess how far away a forward JMP is is tricky, and sometimes it errs on the side of safety and uses a longer JMP just to make sure that it doesn't try to go "out of bounds". The exact rules, however, vary from compiler version to compiler version.

The result of all this is that, even after re-creating the source to version 2.51, I cannot get the same executable as the distributed 2.51. All the code sequences are equivalent, but the details of register useage and short JMP / long JMP are different. Very close, but no cigar.

Wednesday, January 14, 2009

Busy today...

Blog tomorrow.

Sorry about that.

Monday, January 12, 2009

Re-creating source code, Part 7

So, how do you compile a compiler?

It seems pretty straight forward, something like
      make compiler
and in many cases this is all that is necessary. But not always.

Many languages (like C or Pascal) are written in themselves (i.e. C compilers are written in C, Pascal compilers are written in Pascal). But, how do you get the first compiler compiled? This is known as bootstrapping a compiler.

If this is really the first instance of the language (i.e. you are Dennis Ritchie triumphantly creating the C language), your first compiler, however primitive, is written in another language. Later versions of the compiler are then written in the language itself.

If the language already exists on one computer and you are bringing it to a new system, you can either write the compiler in an already existing language for the new system, or you can use a cross compiler to generate the first generation of the compiler for a new system.

So, what does this have to do with re-creating an early version of the DeSmet C source?

Well, what compiler was used to compile DeSmet C?

Friday, January 9, 2009

Piles of bits...

I don't have time to do the blog entry I was planning for today (if you're curious and want to get a head start, look up up bootstrapping).

In my spare time (probably 10 minutes a day...), I've been archiving my old floppies. That isn't anywhere near a complete list (I probably have over a thousand floating around), I was interrupted by a lawsuit (not aimed at me, but that didn't matter). But I'm back to work at it now.

It amazes me, however, at all the stuff I've collected over the years. Who remembers the CDC Plato system? I found some source code for lessons. I have my virus zoo. Old games. Early programming attempts. Drivers for long gone and forgotten (by everyone, including their manufacturers) hardware. Commerical software where I wish I had kept the manual instead of the disk. And so much stuff that makes me wonder "Why the hell did I ever have that in the first place, and why have I kept it all these years?"

Ahhh... nostalgia.

Wednesday, January 7, 2009

Re-creating source code, Part 6

So, what toys do I have?

Well, I have the source to a later version of the compiler I use daily.

I have the compiler I use daily in binary form.

I have a disassembler.

I know how to decompile.

The magic trick is realize that the later version of the compiler is (almost always) a superset of the earlier compiler. It has the functionality of the earlier compiler, plus additional features and improvements.

So, I can compile the later version of the compiler, the disassemble it. This gives me source, binary, disassembly, and labels.

I can disassemble the binary of the earlier compiler. This gives binary and disassembly.

I can now compare the disassemblies. This will let me generate labels for the disassembly of the earlier compiler. It will also let me (thinking about decompiling) see what source statements were / were not in the source to the earlier compiler.

So, as I compare the disassemblies, I can edit the later compiler source to backtrack it to the earlier compiler source.

Good, right? Well, it turns out that there is one more thing that must be considered in doing this. I'll talk about it next time.

Monday, January 5, 2009

Re-creating source code, Part 5

So, looking at the previous example, it's obvious that decompiling is a lot harder than disassembly.

So, it would be stupid (or really masochistic) to try to decompile a big program. Like a compiler.

But, before I got the source code to DeSmet C, I tried just that. Ran the compiler (at least the 1st pass of the compiler) through a disassembler, and went in and started decompiling.

This took me a few months of spare time. In the end, I had a decompiled compiler, but there was too much ambiguity (like unknown variable names -- even badly named variables are much better documentation than no names at all) to be of any use. Oh, well...

Fortunately, I did track down the source code sometime later, and had the toy I wanted. Almost...

I had the source code to a later version of the compiler. And later means more features and bug fixes. This is good.

But, I've also learned that you don't change compilers (or even compiler versions) unless you have a good reason to do so.

Most of my early code was in an earlier version, and since it worked, I kept on using it. And this was not the version I had the source to. This is not so good.

But then I had an idea. I'll talk about it next time.

Friday, January 2, 2009

Nothing to do with Re-creating source code

Happy New Year!

Next time, more tech geek stuff...