4 ms·
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 80
by simonblack 2y ago
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.
- ayende 2y agoYes, I addressed it a bit further in the post I was trying to explain how my 12 years old self saw that code And I had no other resource to turn to at the time
- deleted 2y ago[deleted]