x-lang

Voor beeld test code, meer uitleg volgd binnenkort (kijk over een jaar maar weer)

 

startup 'myasm';
include 'myasm2';
include 'myasm3';
// Set this file in the queue to be parsed
import 'hash';

// Define a function that will exist in the assembly but not in the context
extern function CLI_Write(dword string);
extern function CLI_Newline();

// Define a function calling type
define function MyCallback(dword a, dword b);

global dword MyGLobal;
global dword MyGLobalValue = 123;

struct Prio {
   dword index;
   dword value;
}
struct Process {
   dword pid;
   Prio priority[5];
}
// The main function
function Main(dword a, dword floppyport) dword a, dword b {
   
   b = a:Process[sizeof(Process) * 1].priority[sizeof(Prio) * 3].value;
   
   b = a:byte + floppyport:byte;
   
   CLI_Write(byte:'Van \b41 tot \b5a');
   CLI_Write(byte:'\b00\b0fActivating 32-bit mode (\b00\b07protected mode\b00\b0f');
   CLI_Newline();

   //a = in:[floppybase + 1];

   //out:[floppybase + 1] << b++;
}

function a20line() byte tmp {
   while(in:0x64 & 2 == 0);
   out:0x64 << 0xAD;

   while(in:0x64 & 2 == 0);
   out:0x64 << 0xD0;

   // wait for 1
   while(in:0x64 & 1 == 0);
   tmp = in:0x60;

   while(in:0x64 & 2 == 0);
   out:0x64 << 0xD1;

   while(in:0x64 & 2 == 0);
   out:0x60 << tmp | 2;

   while(in:0x64 & 2 == 0);
   out:0x64 << 0xAE;

   while(in:0x64 & 2 == 0);
}