mstdn.io is one of the many independent Mastodon servers you can use to participate in the fediverse.

Administered by:

Server stats:

341
active users

So it suddenly occurs to me that I have a pending on by Operating Systems course. The assignment seems to be trivial: it is to create a bootloader which prints 'Hello World' on the console. Thought it would be interesting to understand this with some help from my mastodon folks 😄

PS: future me, if you happen to be reading this post after you have forgotten about this, you can thank me later.

So looking at what has been provided to me, I have this in the material:

Here is the code after a bit of good formatting(?) but at least its more readable. I have a lot of questions, but we will go through it line by line.

Re: [BITS 16], the most reasonable explanation I could find was that, when Intel introduced 32-bit CPU, it wanted to maintain backward compatibility with its older 16-bit bootloaders. So it made, the 32-bit mode of processing as a protected on-demand mode. Due to this convention, CPU's start processing the code in 16 bit mode, which then can transfer to 32 bits or 64 bits.

Bernie

@srevinsaju Which assembler are you using? I've never seen square brackets for assembler.dorextives. The traditional UNIX as as.wellcas gas uses . to introduce directives: ftp.gnu.org/old-gnu/Manuals/ga

ftp.gnu.orgUsing as - Assembler Directives

@codewiz I am using the nasm assembler, it was the one specified in our university study material.

@srevinsaju Here's some Motorola 68000 I wrote long ago for the :
codewiz.org/projects/amiga/XMo

How does it look compared to 8086 asm?

This is part my first open source project, a GUI tracker and module format converter.

I never managed to finish it, and now it seems silly to spend time rewriting the entire C startup code in assembly, when it's not at all performance critical.

But that's how kids learn!

@srevinsaju