I did the Bare Bones C# tutorial with success on an Ubuntu VM. I can successfully launch QEMU, and display text. I did some modifications, then Tysila told me the following:
Code: Select all
Error: REX prefix invalid in i586 mode
kernel.cs:
Code: Select all
namespace OS
{
class Program
{
unsafe static void Main()
{
string s3 = "s3";
}
}
}
Here's my batch file to compile the project and launch emulation:
Code: Select all
#!/bin/bash
nasm -felf -o bin/loader.o source/loader.asm
gmcs /target:exe /out:bin/kernel.exe /unsafe source/*.cs
tysila2.exe --arch i586-elf-tysos -fno-rtti -o bin/kernel.o bin/kernel.exe
ld -m elf_i386 -T source/linker.ld -o iso/kernel.bin bin/loader.o bin/kernel.o
grub-mkrescue -o bin/barebones.iso iso
qemu-system-i386 -cdrom bin/barebones.iso
Code: Select all
source/kernel.cs(7,20): warning CS0219: The variable `s3' is assigned but its value is never used
Compilation succeeded - 1 warning(s)
Assembling Method: static void Main()
in Type: OS.Program
Error: REX prefix invalid in i586 mode