???mmo (MMIX executable), 92 bytes, safe
Output is bare characters to stdout.
I'm surprised no-one got this. I thought the 0x98 characters appearing at five separate positions, all multiples of four, would give it away quickly.
A tetrabyte-by-tetrabyte explanation (including loader instructions):
98090100 lop_pre 1,0 (preamble, mmo v1, 0 tetras) 98010001 lop_loc 0x00,1 (the next tetra says where to load) 58484344 "XKCD" (because why not?) E3550064 SETL $85, 100 (i = 100) 37373637 NEGUI $55, 54, 55 (data = -1) E4372000 INCH $55, 0x2000 (data = [instruction segment start - 1]) AF55FF0B STOUI $85, $255, 11 (store 100 to octabyte after M₈[$255]¹) A2555537 STBU $85, $85, $55 (data[i] = i) 27555501 SUBUI $85, $85, 1 (i--) 5555FFFE PBPB $85, @-16 (jump back two instructions if i > 0) E0552000 SETH $85, 2000 ($85 = data+1) AD55FF03 STOI $85, $255, 3 (store $85 to M₈[$255]¹) 00000601 TRAP 0, 6, 1 (write first 100 data bytes to stdout²) 00000000 TRAP 0, 0, 0 (halt) 980A00FF lop_post 255 (begin postamble, rG = 255) 20000000 37555500 ($255 = 0x2000000037555500) 980B0000 lop_stab (begin symbol table) 204D2061 2069246E 584B4344 81000000 (val["Main"]="XKCD") 980C0004 lop_end 4 (symtab is 16 bytes long) Footnotes:
- Octabyte storage disregards the last three bits of the location to store.
- Syscall 6 is fwrite, which takes as arguments the Z operand for file descriptor (1 is stdout),
M₈[$255]as the buffer pointer, andM₈[$255+8]as the buffer length.
I didn't obfuscate this at all, except by arranging for a lot of repeated bytes (all the Us and 7s); I just wrote a simple algorithm and hand-assembled it.