rendered paste bodyclass PtrTest {
unsafe static byte *PutChar(char ch, byte *ptr) {
*ptr = (byte) ch;
ptr++;
*ptr = 0x0F;
ptr++;
return ptr;
}
unsafe static public void Main() {
byte *ptr = (byte *) 0xB8000U;
ptr = PutChar('H', ptr);
ptr = PutChar('e', ptr);
ptr = PutChar('l', ptr);
ptr = PutChar('l', ptr);
ptr = PutChar('o', ptr);
ptr = PutChar(' ', ptr);
ptr = PutChar('W', ptr);
ptr = PutChar('o', ptr);
ptr = PutChar('r', ptr);
ptr = PutChar('l', ptr);
ptr = PutChar('d', ptr);
while(true) {}
}
}