When I am trying to recall my childhood the memory of ‘dreaming about writing my own program in assemly’ is more vivid then actually writing it. You see it took some time and a few preparation steps:
1. Preparing computer:
1.1 Discovering the opportunity: Turns out it can be soldered by myself which makes it cheap enough and thus actually even possible.
1.2 Convincing parents that even though I had no interest in electronics before it’s a good idea to build something called “computer”. Never mind what it is, it only needs a few chips and some other electronic components. I’ve seen one. It can work!
1.3 Hunting all components for weeks. Not an easy task where I have been back then.
1.4 Soldering all components to the board. Learning soldering on-the-go. I had zero interest in electronics before my friend had shown me a computer. It was the first time in my life I took soldering iron in my hands. Noticing expression of shock on faces of my parents I was calming down them with phrases like: How hard it should be? What could possibly go wrong? Right? :)
1.5 Discovering that computer would not work after soldering. It needs something called Power Supply and they don’t sell it. So the only way is to build one.
1.5.1 Hunting for components again. Power supply had to be build with short-circuit protection because burning computer would mean no second chance.
1.5.2 Building special power supply with basic components transistors, resistors, condensers, diods etc.
1.5.3 Learning some basic things about electronics and how power supplies function. Finding problems. Fixing them and making it work properly.
1.6 Discovering there is no way to buy a keyboard and recalling :) that computer actually needs Input device.
1.6.1 Hunting for old calculators.
1.6.2 Disassembling few calculators to extract buttons
1.6.3 Making keyboard with extracted buttons.
1.7 Turning On the computer. Discovering it’s not working and needs debugging.
1.8 Learning Digital electronics for some time from the book “Digital Electronics” by Tokhaim. Discovering that local schematics are not the same as in the foreign book. Oops! :) Tracing all kind of problems. Fixing them one by one and arriving to the stage where something should be shown on the screen.
1.9 Discovering that home TV doesn’t have ‘video in’.
1.9.1 Disassemble TV partially, study schematics and how TV works.
1.9.2 Make add-on with ’Video-In’ to make TV function as a Monitor.
1.10 Turn On the computer and Debug it with visual feedback. Much better! :)
1.11 Debugging computer with oscilloscope and learning how it should work on the go.
1.12 Celebrate first successfull start and making sure that everything works as it should.
2. Running Computer with visual feedback(monitor) and input device (keyboard) while everything is working properly :) Much better :)3. Discovering how to run own programs. BIOS had no documentation. With ‘try and error’ discover how to put codes into the memory and what command will actually execute them. Then locate where the video memory starts. To at least see something! Calling builtin BIOS functions was not an option.
4. Learning codes of CPU from the table by ‘try and error’ . Table had only mnemonics without any detailed descriptions. So you basically just guess the meaning. Sometimes you guess wrong. For example HLT will not stop the program properly :) Meaning you write program again :)
And then finally , after those preparation steps I wrote my first assembly program. I believe it was some 8 dots moving horizontally.
So I had a lot of time for that “dreaming about my first program” … :)
It was Sunday, and it worked. Small white line sliding in the center of the screen. Lovely. What you wouldn’t do for that!? :)