Paid episode

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

Monday Q&A #6 (2023-03-20)

Answers to questions from last week's video
29

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:

  • [0:00] Me telling everyone to go at their own pace, and that you don’t have to move on to the simulator stuff this week if you’d rather keep working on your decoder.

  • [1:08] "Do you suggest when we start simulating that it will be a 2 step process? First decode all instructions and then run all those instructions on some kind of machine state? Or would you still run the instruction while decoding. I'm just wondering about the pros and cons, thinking of jumps for instance to you set the instruction pointer in the original bytestream? Or do you do that in the decoded instructions set?”

  • [15:04] “What do jumps specify? the target in bytes it seems but is that correct?”

  • [19:28] “Could ParseDataValue have been implemented as a lambda? I guess that would be the closest thing to a local function in C++. There are arguments for not doing it, but if you wanted to keep it 'local' to the scope of TryDecode it would be an option, no?”

  • [24:32] “I'm really curious now how to generate code for this table. I can imagine how to generate all possible values for the first byte of the instruction, but I'm not sure what would be the next step. E.g. when you have a jump table based on the first byte, how do you generate jump table for the second byte and etc.? What's the actual code going to look like that jump table will point to?”

  • [38:52] Me elaborating on how my instruction table parser works.

The full video is for paid subscribers

Programming Courses
A series of courses on programming topics.
Authors
Casey Muratori