(I credit typing in listings for about 80% of my initial learning).
The punchline is that I did not necessarily have any way of saving those programs to persistent storage, so it was just like... keep the computer turned on for a week?
Most coders learn so much from hacking on other people's code, it's an indispensable step. So typing in code is a great opportunity to experience coding, starting with a working codebase, and perhaps making your own tweaks, fixes, and enhancements. Commodore BASIC was perfect for rapid prototyping and access to sound and graphics primitives.
I remember that I copied a short program in BASIC that you had to run in order to type in the machine code part of the main program you were typing. It would sound a bell if the checksum had no error, otherwise you would hear a buzz sound.
> and, somewhat regrettably, cut out the source-code middleman.
The programs I typed in had parts in BASIC and other in machine code. I just wish the machine code parts used the instruction mnemonics instead of the actual instruction byte code. It definitely would have been more educational to see instructions like LDA, SDA, CMP, JSR, etc instead of the actual number values.
https://archive.org/details/byte-magazine-1987-04/page/n151/...
{$K-}{ turn of checking for stack overf low }
program interrupttest;
type IoProcess = *integer :
var count: integer:
var timerhandler: IoProcess;
... {definitions of NewIoProcess and IoAttach }
procedure incrementer:
begin
count:=succ (count ) :
end;
begin
timerhandler:=NewIoProcess(Ofs(incrementer).1000):
count:=0;
ioAttach ($1C, timerhondler); | attach himerhondleich" user |
while true do
timer interrupt ( 1Ch )
begin
writeln (count );
Delay (100);
{ delay 100 milliseconds}
end; end.