Implemented some maths functions to my kernel's runtime library because I want cool graphics stuff, so tested out some pixel plotting, and a couple famous line and ellipse drawing algorithms. Everything works but I gave some off parameters and got this! Want to become good with the graphics/mathematical side of things

Implemented some maths functions to my kernel's runtime library because I want cool graphics stuff, so tested out some pixel plotting, and a couple famous line and ellipse drawing algorithms. Everything works but I gave some off parameters and got this! Want to become good with the graphics/mathematical side of things

Well, that looks fine to me, if you goal was to depict a Mobius strip. I gather it wasn't, however.

_________________Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTFμή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίανLisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.

Not really going crazy, and it's actually expected behavior, but crashing nonetheless. I am currently porting my compiler/VM to my OS to provide a user-mode programming language. Here you can see it come to life.

What happened is the VM crashed because of an unimplemented opcode, which resulted in the VM trying to drop its hosting task. However, my proof-of-concept implementation is running it in the kernel task, which is "immortal" (can't be dropped). The result is that the CPU continues executing garbage and eventually raises an interrupt.

Looks like a pretty standard panic screen right? Turns the screen red and print some debug info? The reason that, shall we say, mildly surprised me is that I never programmed it to turn red. In fact, the whole operating system literally has no code to change the color of the screen!

It even got worse from there:

What it turned out to be was that I had screwed up my initial implementation of threading, and was setting the RSP0 value in the TSS to the bottom of the allocated stack region, so the stack was immediately clobbering kernel data. What happened to be right below the stack for the first thread? The default background color applied to all characters printed.

Who is online

Users browsing this forum: Bing [Bot] and 9 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum