amaneureka / AtomOS

A multitasking monolithic Kernel based x86 targeting Operating System written in C# from scratch aiming for high-level implementation of drivers in managed environment.
http://www.atomixos.com
BSD 3-Clause "New" or "Revised" License
1.26k stars 86 forks source link

[Compiler]: structures not working #6

Open amaneureka opened 8 years ago

amaneureka commented 8 years ago

Ldobj MSIL not loading up structures properly after casting structure pointer.

       //Test code
        private static unsafe void structureTest()
        {
            var a = *(aman*)0x0;
            a.b = 0x2;
            a.u = 3;
            a.i = 0xDEAD;
            Debug.Write("Value: %d\n", a.i);
            Debug.Write("Value: %d\n", a.u);
            Debug.Write("Value: %d\n", a.b);
        }