TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The code that lived in my head rent free for 30 years

21 点作者 ayende11 个月前

5 条评论

yencabulator11 个月前
&gt; There is no definition of AH anywhere,<p>Meanwhile:<p><pre><code> var regs: Registers; begin with regs do </code></pre> AH came from Registers.<p>Overall, I&#x27;d say the author fell in between the computer generations. After things started to <i>look</i> high-level, but where a lot of the interesting stuff was still very low-level.<p>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 &quot;making sense&quot; as such; it was just hardware control.
simonbarker8711 个月前
Very similar to programming micro controllers, a lot of setting registers to arbitrary values to toggle certain bits high or low to enable&#x2F;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.
评论 #40618588 未加载
DerekL11 个月前
I wonder why uninstalling the hard disk and installing it in a different computer was the best solution.<p>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?
评论 #40617076 未加载
unixhero11 个月前
Why did Pascal have to die?
评论 #40645455 未加载
simonblack11 个月前
<i>There is no definition of AH anywhere, I can’t tell where it is coming from. And $13, what is that about?</i><p>AH is the high byte of AX a 16 bit register in the 8086. AL is of course the low-byte of AX.<p>$13 is the hex number of the interrupt used in MSDOS.<p><i>What is AH or the Intr() call?</i><p>AH is as above. Intr() call is a Pascal call (was it Turbo Pascal, I wonder) to the 8086 interrupt code in a PC.<p>Yes this knowledge is arcane, and Yes, you &#x27;just have to know it&#x27;<p>That&#x27;s because this was the only way (Such a kluge!) you could interface the hardware to a &quot;high level language&quot; like Pascal that didn&#x27;t have that capability built in.<p>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.<p>But when you&#x27;re a learner, you do what you can. Even if it turns out to be &#x27;the hard way&#x27;.<p>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&#x2F;Z80 code. Enough of them to look at a hex dump of 8080 machine-code and know roughly what is supposed to happen.
评论 #40617070 未加载
评论 #40618428 未加载