Tuesday, September 15, 2015

Day 23: DX12 and the Limits on Making Code Better with 68K

Now that the RPP is over, I can thankfully move onto studying interesting topics again. Wherever I can find them. I went back to my programming assignment, thinking I could refactor my code and create a method to save and restore certain values (partition pointers and pivot index) in the stack. Unfortunately, this is actually quite impossible with 68K.

The way that a function (in this case, subroutine) is called in code with jsr/bsr is that the point of return, the opcode location after the bsr instruction, is pushed to the stack. What happens when you try to push other values to the stack from within the function BUT then call the rts instruction? Not only does the return address pop off, but all other values pushed to it, rendering the rts unusable. Actually, by way of using rts, the instruction jumps to the last value you pushed to it, thinking it is the return address on the stack. This doesn't work too well, and I was forced to step back from what seems to be an optimal amount of code.

As for interesting studies, DX12 tutorials (not by Microsoft) are finally available! This is fantastic news as I was just figuring a way to get comfortable with Windows 10 and Visual Studio 2015. So far the same guy who did the DX11 tutorials (Rastertek) has made a new set of tutorials on the subject. This is in its infancy, however, as such tutorials were nonexistent during the summer (forcing constant shifting between tutorializing in 2010 and translating to 2013, shiver). Thankfully, though, not too much has changed from DX11's original setup, save for the improved (and incredibly different) set of Windows gobblegook required to make a window. There is a window, though!

No comments:

Post a Comment