<- Back
Comments (38)
- femtoWhat Woz did was the default way of writing assembly language programs for owners of 8-bit computers (mostly hobbyists). You didn't have money for a second machine, so you wrote your program on paper, you entered it then tested it in situ. Mostly you got it right, as doing it on paper was slow and meant you had the opportunity to put lots of thought into it. 8-bit instruction sets were simple enough that you eventually learned the most common instructions by heart. There was a point where I could mostly translate a Z80 program from assembly to machine code from (my) memory.Maybe that is part of the nostalgia for the 8-bit days: the practice of "slow programming"? It was relaxing, sort of like those "slow tv" shows.
- II2IIFollow-up question: how did Woz get BASIC into ROM?The handwritten interpreter is fairly common knowledge since Woz has told that story many times, but I don't recall any accounts of how he bridged the gap from paper to silicon. All of the discussion about the machine language monitor doesn't really address the question. At best, it moves the question from programming a ROM for BASIC to programming a ROM with the machine language monitor. Even with the monitor, additional hardware would be required to program a ROM. At the very least, a latch would be required to hold the address and data. Of course, it is possible that he did it without the computer (using a rig that let him "toggle" the pins). It is also possible that he used another computer to program the ROM, but, as he said, he didn't have the money to program BASIC on a computer so why would that be different for a ROM?
- mrandishI got my first computer in 1981, a 4K Radio Shack Color Computer for $500 (a huge purchase decision at the time). So I missed hand assembling for bare metal and Altair-type toggles.However, there was an interesting period of a few years where assembler tools were either unavailable or fairly expensive, so it was common to use the computer's BASIC to write an assembly language monitor program. Such program listings were pretty common in early hobbyist 'zines. It was also pretty common to use BASIC to POKE in a quick bootstrap program to load a value in a register and jump to an address, which I could usually do from memory. After 40 years I still remember the 6809 RTS was $39 and NOP was $12, two very handy instructions to POKE a quick mod into a program.
- le-markAnd then he wrote SWEET16 which was also amazing. Him and Niklaus Wirth are two people I truly admire; they knew so much and shared so freely.
- asdefghykI would say bit by bit, I mean "small part" and then keep making small extensions to the program(s)First for new hardware would be a monitor program. Either write one, or port one from other hardware. A monitor program allows the inspection and edit of memory data and also to run programs in such memory. The monitor program often placed in ROM for convenance. A 6502 cross assembler, could be used to avoid the need for hand assembly the program to 6502 machine code.Probably where WOZMON came from.Then using WOZMON start writing a VERY simple basic interpreter.Maybe the monitor program was borrowed from other hardware that used a 6502 ( would need slight mods for the Apple 1 ) NOTE This is just a possibility - I actually have NO idea I suspect WOZ would have invented his own in any case ...(OFF TOPIC - I messed around with a 68008 chip in mid 1980s?? and I recall I found a book with a complete montor program in for this chip - I can not recall the name of the book. )
- WillAdamsFor the sequel to this, see:https://www.folklore.org/MacBasic.html
- wewewedxfgdfIt's taken me more than 40 years to learn a fraction of a % of what Woz knew in 1975.
- david-gpuI only had to assemble instructions by hand three times in my career. It is not difficult if you are already familiar with the ISA of that particular processor, but it is tedious.The first time was in my first job writing OpenGL ES 2.0 blending operations for the Imagination Technologies SGX 535, which was a remarkably advanced little GPU for its time. Alpha blending happened through special instructions in the fragment/pixel shader. We did have a compiler, but it didn't handle blending, for whatever reason.Through testing I noticed that NVidia GPUs performed blending incorrectly, according to the specification, which was a big surprise. Only years later I figured out that the specification had some errors; I now would bet that NVidia was doing the correct thing.The second time I had to assemble instructions by hand happened while working on a stripped down version of the Radeon 7xxx series that shipped on some mobile phones. I don't recall what the problem was, whether we were adding a feature or optimizing the microcode generated for a particular OpenGL operation, but it involved a rarely-used feature called user-defined clipping planes. We didn't have an assembler for that GPU; all microcode was assembled by hand.The third time happened at NVidia, and I will be vague, as not enough time has passed for me to be comfortable going into any detail. I had an idea for how to provide hardware acceleration for persistent CUDA kernels, which eventually was marketed as Cluster Launch Control (CLC). In order to quantify the benefit of adding some hardware, when it was possible to approximate that functionality in software, I needed to test the most efficient software implementation that was possible, and the compiler wasn't quite giving the assembly I wanted, so I had to manually patch some instructions post-compilation. Why did I not use the assembler that was available? I couldn't, because the assembly language did not provide a way to express the exact feature I had to patch.
- xgkicktSimple answer: Because Woz is the wiz that was.
- iberatorIt's easy to relearn those skills:Just design and build a virtual CPU architecture in the language of your choice:) (not verilog but php, c, rust, zig or whatever)You create architecture, then OPCODES, then you can write simple programs in machine code.Then its SUPER EASY to write an assembler and disassembler.Then forth compiler.I did it all once as I was homeless on my phone in the mall .Fun and educational, even if you don't know assembly prior.
- heisenbitDid he really write the BASIC before he wrote the monitor program which sits at the top of the address space? The monitor was documented as part of the systems manual of the Apple ][ and contained a small disassembler which helped a lot when coding some instructions or jumps wrong. I learned a lot from that code.
- Grimeton>How did Woz write the Apple 1 BASIC before building the computer?Time travel!