Very similar to programming micro controllers, a lot of setting registers to arbitrary values to toggle certain bits high or low to enable/disable device functionality or set some interrupt or other. You needed the data sheet as well as the code to work out what was going on.
I wonder why uninstalling the hard disk and installing it in a different computer was the best solution.
Were the files so big that it would have used too many floppies? Did the two computers use different sizes of floppies? Could he not afford blank floppies (but he could afford damaging his hard disk)? Did he not have the right software to split a file into pieces to fit on multiple floppies?
Why did Pascal have to die?
There is no definition of AH anywhere, I can’t tell where it is coming from. And $13, what is that about?
AH is the high byte of AX a 16 bit register in the 8086. AL is of course the low-byte of AX.
$13 is the hex number of the interrupt used in MSDOS.
What is AH or the Intr() call?
AH is as above. Intr() call is a Pascal call (was it Turbo Pascal, I wonder) to the 8086 interrupt code in a PC.
Yes this knowledge is arcane, and Yes, you 'just have to know it'
That's because this was the only way (Such a kluge!) you could interface the hardware to a "high level language" like Pascal that didn't have that capability built in.
It would probably have been better to use 8086 assembly with MSDOS system calls than Pascal as it was intrinsically able to interface with the hardware where Pascal was not.
But when you're a learner, you do what you can. Even if it turns out to be 'the hard way'.
We all have stuff that lives rent-free in our heads. In my case I can look at a lot of 8-bit hex numbers and know what machine instructions they represent in 8080/Z80 code. Enough of them to look at a hex dump of 8080 machine-code and know roughly what is supposed to happen.
> There is no definition of AH anywhere,
Meanwhile:
AH came from Registers.Overall, I'd say the author fell in between the computer generations. After things started to look high-level, but where a lot of the interesting stuff was still very low-level.
One of the first things I learned to do in Commodore-64 basic was poke53280,0 to change screen background color. It was low level for everything, and there was no expectation of the address or the value "making sense" as such; it was just hardware control.