Arnauld
2011-04-18 15:21:30 UTC
Hi,
I'm a C / asm programer and I'm very interesting in switching to
modula-2 language as I'm a bit tired with bound checking, *overflows,
etc.. As far as I understood, we don't write in modula-2 like we write
in C. The inner philosophy is very different in m2. So, I looked for a
kernel wrote in modula-2 to have an example of how to address hardware
and very low level code in m2. But I found nothing....
So, I'd like to know if :
1/ modula-2 really suit well for writing a tiny kernel
2/ there's a simple example for i386 or amd64 plateform.
Here is a more concrete example.
I'd like to write on my video memory that begin in 0xB8A00. There are
25*80 characters on the terminal and each character is defined with 2
bytes : 1 byte for the character per se, and another byte for the
character attributes (color, bleep, etc.). So, for example, if I want
to write the letter 'A' in red in the upper left corner of my screen :
byte 0xB8A00 := 'A';
byte 0xB8A01 := 4; (* 4 encodes red color *)
How can I do this in m2 ?
Best regards,
I'm a C / asm programer and I'm very interesting in switching to
modula-2 language as I'm a bit tired with bound checking, *overflows,
etc.. As far as I understood, we don't write in modula-2 like we write
in C. The inner philosophy is very different in m2. So, I looked for a
kernel wrote in modula-2 to have an example of how to address hardware
and very low level code in m2. But I found nothing....
So, I'd like to know if :
1/ modula-2 really suit well for writing a tiny kernel
2/ there's a simple example for i386 or amd64 plateform.
Here is a more concrete example.
I'd like to write on my video memory that begin in 0xB8A00. There are
25*80 characters on the terminal and each character is defined with 2
bytes : 1 byte for the character per se, and another byte for the
character attributes (color, bleep, etc.). So, for example, if I want
to write the letter 'A' in red in the upper left corner of my screen :
byte 0xB8A00 := 'A';
byte 0xB8A01 := 4; (* 4 encodes red color *)
How can I do this in m2 ?
Best regards,