module kernel.main;
extern(C) void main(uint magic, uint addr) {
int ypos = 0; //Starting points of the cursor
int xpos = 0;
const uint COLUMNS = 80; //Screensize
const uint LINES = 25;
ubyte* vidmem = cast(ubyte*)0xFFFF_8000_000B_8000; //Video memory address
for (int i = 0; i < COLUMNS * LINES * 2; i++) { //Loops through the screen and clears it
volatile *(vidmem + i) = 0;
}
volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
for (;;) { //Loop forever. You can add your kernel logic here
}
}gdc -c kernel.main.d -o kernel.main.o -ggdc -c kernel.main.d -o kernel.main.o -g
kernel.main.d:12:4: error: undefined identifier 'volatile'
volatile *(vidmem + i) = 0;
^
kernel.main.d:15:2: error: undefined identifier 'volatile'
volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:16:2: error: undefined identifier 'volatile'
volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^gdc -c kernel.main.d -o kernel.main.o -g
kernel.main.d:12:23: error: basic type expected, not *
@volatile *(vidmem + i) = 0;
^
kernel.main.d:12:24: error: unexpected ( in declarator
@volatile *(vidmem + i) = 0;
^
kernel.main.d:12:32: error: identifier expected for template value parameter
@volatile *(vidmem + i) = 0;
^
kernel.main.d:12:32: error: found '+' when expecting ')'
@volatile *(vidmem + i) = 0;
^
kernel.main.d:12:34: error: no identifier for declarator _error_*
@volatile *(vidmem + i) = 0;
^
kernel.main.d:12:35: error: found ')' when expecting ';' following statement
@volatile *(vidmem + i) = 0;
^
kernel.main.d:12:37: error: found '=' instead of statement
@volatile *(vidmem + i) = 0;
^
kernel.main.d:15:12: error: basic type expected, not *
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:13: error: unexpected ( in declarator
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:21: error: identifier expected for template value parameter
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:21: error: found '+' when expecting ')'
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:23: error: no identifier for declarator _error_*
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:50: error: found ')' when expecting ';' following statement
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:52: error: found '=' instead of statement
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:16:12: error: basic type expected, not *
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:13: error: unexpected ( in declarator
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:21: error: identifier expected for template value parameter
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:21: error: found '+' when expecting ')'
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:23: error: no identifier for declarator _error_*
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:54: error: found ')' when expecting ';' following statement
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:56: error: found '=' instead of statement
@volatile *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^ gdc -c kernel.main.d -o kernel.main.o -g
kernel.main.d:12:20: error: basic type expected, not *
shared *(vidmem + i) = 0;
^
kernel.main.d:12:21: error: unexpected ( in declarator
shared *(vidmem + i) = 0;
^
kernel.main.d:12:29: error: identifier expected for template value parameter
shared *(vidmem + i) = 0;
^
kernel.main.d:12:29: error: found '+' when expecting ')'
shared *(vidmem + i) = 0;
^
kernel.main.d:12:31: error: no identifier for declarator _error_*
shared *(vidmem + i) = 0;
^
kernel.main.d:12:32: error: found ')' when expecting ';' following statement
shared *(vidmem + i) = 0;
^
kernel.main.d:12:34: error: found '=' instead of statement
shared *(vidmem + i) = 0;
^
kernel.main.d:15:9: error: basic type expected, not *
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:10: error: unexpected ( in declarator
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:18: error: identifier expected for template value parameter
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:18: error: found '+' when expecting ')'
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:20: error: no identifier for declarator _error_*
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:47: error: found ')' when expecting ';' following statement
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:49: error: found '=' instead of statement
shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^ gdc -c kernel.main.d -o kernel.main.o -g
kernel.main.d:12:14: error: @identifier or @(ArgumentList) expected, not @shared
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:14: error: valid attributes are @property, @safe, @trusted, @system, @disable
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:21: error: basic type expected, not *
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:22: error: unexpected ( in declarator
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:30: error: identifier expected for template value parameter
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:30: error: found '+' when expecting ')'
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:32: error: no identifier for declarator _error_*
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:33: error: found ')' when expecting ';' following statement
@shared *(vidmem + i) = 0;
^
kernel.main.d:12:35: error: found '=' instead of statement
@shared *(vidmem + i) = 0;
^
kernel.main.d:15:3: error: @identifier or @(ArgumentList) expected, not @shared
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:3: error: valid attributes are @property, @safe, @trusted, @system, @disable
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:10: error: basic type expected, not *
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:11: error: unexpected ( in declarator
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:19: error: identifier expected for template value parameter
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:19: error: found '+' when expecting ')'
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:21: error: no identifier for declarator _error_*
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:48: error: found ')' when expecting ';' following statement
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:15:50: error: found '=' instead of statement
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2) = 'D' & 0xFF; //Prints the letter D
^
kernel.main.d:16:3: error: @identifier or @(ArgumentList) expected, not @shared
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:3: error: valid attributes are @property, @safe, @trusted, @system, @disable
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:10: error: basic type expected, not *
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:11: error: unexpected ( in declarator
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:19: error: identifier expected for template value parameter
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:19: error: found '+' when expecting ')'
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:21: error: no identifier for declarator _error_*
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:52: error: found ')' when expecting ';' following statement
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07)
^
kernel.main.d:16:54: error: found '=' instead of statement
@shared *(vidmem + (xpos + ypos * COLUMNS) * 2 + 1) = 0x07; //Sets the colour for D to be light grey (0x07).