#8088 machine code, IBM PC DOS, 35 bytes Unassembled listing: _LOOP: AC LODSB ; load byte [SI] into AL, increment SI 8A F0 MOV DH, AL ; save original byte in DH B9 0204 MOV CX, 0204H ; set up nibble counter and shift count D2 C0 ROL AL, CL ; reverse nibbles (display high order first) _NIB: 24 0F AND AL, 0FH ; mask low nibble 3C 0A CMP AL, 0AH ; is < 10? 72 02 JC _ASC ; if so, is a numeric digit 04 07 ADD AL, 07H ; otherwise adjust for A-F hex ASCII _ASC: 04 30 ADD AL, '0' ; ASCII convert B4 0E MOV AH, 0EH ; BIOS output char function CD 10 INT 10H ; display char 8A C6 MOV AL, DH ; restore original nibble to AL FE CD DEC CH ; decrement nibble counter 75 EC JNZ _NIB ; if > 0, repeat 81 FE 0123 CMP SI, OFFSET _EF ; is SI < last byte? 7C DE JL _LOOP ; if so, keep looping C3 RET ; return to DOS _EF EQU $ ; get program size This is a complete IBM PC DOS executable that displays itself as ASCII hex, so will always output as twice the program size. **Output** [![enter image description here][1]][1] Download and test [SELF.COM][2]! [1]: https://i.sstatic.net/DCz1W.png [2]: https://stage.stonedrop.com/ppcg/SELF.COM