mmo (MMIX executable), 112 bytes (28 tetras)
(jxd)
00000000: 98090100 98010001 00000100 e0002000 Ƭµ¢¡Ƭ¢¡¢¡¡¢¡ṭ¡ ¡
00000010: e3ff0140 00000300 58ff0002 00000000 ẉ”¢@¡¡¤¡X”¡£¡¡¡¡
00000020: 83010000 31ff0140 7502ff20 31ff015b ³¢¡¡1”¢@u£” 1”¢[
00000030: 7002ff02 c0010102 a3010000 e3ff0140 p£”£Ċ¢¢£ɲ¢¡¡ẉ”¢@
00000040: 00000601 f1fffff3 00000000 20000000 ¡¡©¢ȯ””ṙ¡¡¡¡ ¡¡¡
00000050: 98020008 00000001 980a00ff 00000000 Ƭ£¡®¡¡¡¢Ƭ½¡”¡¡¡¡
00000060: 00000100 980b0000 00000000 980c0001 ¡¡¢¡Ƭ¿¡¡¡¡¡¡Ƭ€¡¢
Disassembly and explanation:
98090100 lop_pre 1,0 (mmo v1, 0 tetras)
98010001 lop_loc 0,1 (start loading at next tetra)
00000100 256 (which is 256)
E0002000 SETH $0,#2000 (set $0 to address of data segment)
E3FF0140 0H SETL $255,2F (set $255 to address of handle)
00000300 TRAP 0,Fread,StdIn (read in one character)
58FF0002 PBNN $0,1F (skip next instr if not EOF)
00000000 TRAP 0,Halt,0 (quit)
83010000 1H LDBU $1,$0,0 (read that byte in)
31FF0140 CMP $255,$1,'@' (compare with '@')
7502FF20 ZSP $2,$255,#20 (if greater, then set $2 to 0x20)
31FF015B CMP $255,$1,'[' (compare with '[')
7002FF02 ZSN $2,$255,$2 (unless less, clear $2)
C0010102 OR $1,$1,$2 (or in $2)
A3010000 STBU $1,$0,0 (store it back)
E3FF0140 SETL $255,2F (set $255 to address of handle)
00000601 TRAP 0,Fwrite,StdOut (write that byte out)
F1FFFFF3 JMP 0B (loop back)
00000000 (padding for alignment)
20000000 2H OCTA Data_Segment,1 (the handle)
98020008 lop_skip 8 (slightly cheaper than two zero tetras)
00000001 (end of handle)
980A00FF lop_post 255 (postamble, rG = 255)
00000000
00000100 (start execution at location 256)
980B0000 lop_stab (begin symbol table)
00000000 (no symbols)
980C0001 lop_end 1 (symtab is one tetra long)
s/./\L\0/g
. \$\endgroup\$\L
is built in? \$\endgroup\$