Paid episode

The full episode is only available to paid subscribers of Computer, Enhance!

Monday Q&A #12 (2023-05-22)

Answers to questions from last week's videos
13

Each Monday I answer questions from the comments on the prior week’s videos. Transcripts are not available for Q&A videos due to length. I do produce closed captions for them, but Substack still has not enabled closed captions on videos :(

Questions addressed in this video:

  • [00:08] “If the 8086 didn't have memory protection but I assume could still support an OS which sets up the interrupt table like you mentioned, is there anything to prevent the user's code from overwriting the interrupt table or even the OS code?”

  • [04:45] “I was just adding a few more instructions to my disassembler and wanted to add the ‘test’ instructions. I was confused when the manual was totally wrong for the "Register/Memory and register " version of the test, but then I looked at your instruction table and you had the binary opcode of 0b1000010 just like the byte I got during disassembly and not the 0b000100dw from the manual. But how does one now decide if destination is in reg or not? Without the D flag how would one decide this? Or does that just mean that it cannot be the other way?”

  • [07:20] “When trying to test what your disassembler produces from my test asm it has a problem even earlier though.
    and bx, 7
    produces ERROR: Unrecognized binary in instruction stream”

  • [10:46] “I have an 8086 details question - Why is BP + DI one cycle faster than BX + SI in Table 2-20: EA Calc?”

    [If you would like to see the microcode to which I refer in the answer to this question, I have included a screenshot of it below with the extra 1-cycle unconditional branches highlighted.]

    Image
  • [15:42] “I recently was gifted one of the latest MacBook Pros and now I’m wondering how similar x86/x64 assembly is to m1/m2 assembly. I was pleasantly surprised to learn x64 is very similar to x86, so I’m kinda crossing my fingers the same goes for ARM :)

    I think I remember you mentioning ARM chips being reduced instruction set something or other, so in my head that makes me think it’s mostly the same just with fewer instructions. Is this right?”

  • [24:00] “I was trying to understand how debuggers or helper functions unwind the stack across code compiled with different languages and came across and example which I couldn't figure out how it works.”

The full video is for paid subscribers

Programming Courses
A series of courses on programming topics.