Result

AC

Code [DL]

00000000  21 00 00 16 01 0e 00 cd  03 80 38 35 e6 01 47 79  |!.........85..Gy|
00000010  87 80 4f 6f 7a 87 57 20  ee cd 03 80 29 29 29 23  |..Ooz.W ....)))#|
00000020  3e ff 11 01 00 2c 2d 20  0b 24 25 20 07 3e 31 cd  |>....,- .$% .>1.|
00000030  00 80 18 cc 3c 1b 1b 19  38 eb 3e 30 cd 00 80 18  |....<...8.>0....|
00000040  bf 76                                             |.v|
00000042

Disassembly

        ORG     0000h

L0000:  LD      HL,0000h
        LD      D,01h
        LD      C,00h
L0007:  CALL    8003h
        JR      C,L0041
        AND     01h
        LD      B,A
        LD      A,C
        ADD     A,A
        ADD     A,B
        LD      C,A
        LD      L,A
        LD      A,D
        ADD     A,A
        LD      D,A
        JR      NZ,L0007
        CALL    8003h
        ADD     HL,HL
        ADD     HL,HL
        ADD     HL,HL
        INC     HL
        LD      A,0FFh
        LD      DE,0001h
L0025:  INC     L
        DEC     L
        JR      NZ,L0034
        INC     H
        DEC     H
        JR      NZ,L0034
        LD      A,31h           ; '1'
        CALL    8000h
        JR      L0000

L0034:  INC     A
        DEC     DE
        DEC     DE
        ADD     HL,DE
        JR      C,L0025
        LD      A,30h           ; '0'
        CALL    8000h
        JR      L0000

L0041:  HALT

stdin

00011110
10101011
11111010
10111001
00110111
10111100
01101001
00000001
00000110
00011100
10011001
00000010
00001111
11110001
10001100
10011000
11010010
00010100
01000010
10001000
01010010
00000011
00000000
01110110
01001101
10010001
10000100
01000011
01101011
00001010
11111101
01011011
01111100
00010101
01011100
01001110
01000000
10101011
11110101
00100100
10111110
00110011
11100111
10001011
00110001
00000011
00011010
01111000
00101101
11011101

stdout

01001011111010001011011000000111010101011010010110

stderr

strace