Code: Select all
void main(void)
{ //- initialise vga memory (128 KiB).
Region<uint64>(0xA0000, 0xC0000) = uint64(0x1720172017201720);
uint8 byte(-1); //- byte = 0xFF
uint8 data = byte(2,4); //- data = 0x0F
cout << "data: $" << data << "\n";
byte(2,4) = ~data; //- byte = 0xC3
cout << "byte: $" << byte << "\n";
data(4,4) = byte(0,4); //- data = 0x3F
cout << "data: $" << data << "\n";
cout << "data: $" << data(1,6) << "\n";
cout << "\ndone...";
}
I still need to comment the code but will put it on my website when done.data: $0F
byte: $C3
data: $3F
data: $1F