Hacker News new | ask | show | jobs
by becurious 1052 days ago
Direct to the hardware would be initializing the frame buffer and writing there. Which means that you need to have all the glyphs and then look them up and write them into the frame buffer.

This is what we used to do with 8 bit computers that didn’t have a hardware text mode. You might be able to look up the bitmaps in the ROM, otherwise it’s time to define them all yourself.

Using a direct system call would be like calling a ROM routine or an OS routine to print characters. You’d either call the routine or invoke a software interrupt.

1 comments

Check my reply earlier in the thread. I was working under the assumption that SWI is akin to x86's OUT opcode. Maybe you can decode the quoted stuff and set my brain straight.
SWI is just software interrupt. Gets trapped by supervisor mode. Then the registers can be decoded by the kernel to implement the correct syscall. Old school real mode x86 equivalent would be an INT instruction.

If you want to do straight to the hardware bare metal then you need to do something like this (https://www.rpi4os.com/part5-framebuffer/) but you’re going to have to do all the other system init work that a modern system needs. Old computers were simpler!

That would definitely be far outside the scope of what I was trying to accomplish with all the helloworlds. Although I could do it and list it as the most needlessly complicated version.