Result

ERROR

Code [DL]

`define EOF 32'hFFFF_FFFF
`define STDIN 32'h8000_0000

module cat;
	integer c,d;
	initial begin
		c = $fgetc(`STDIN);
		
		while (c != `EOF) begin
			d = c;
			while(c != "\n") begin
				c = $fgetc(`STDIN);	
				d = d + c;
			end 

			$write("%c", d);
			
		end
	end
endmodule

stdin

00000001
10111111
00010010
01000010
10001000
10101000
00111011
01011000
00011110
00000100
00001111
01001110
11010010
00110111
01111000
00010101
10110101
01010100
00111110
10011001
00000011
11100101
10100101
11101111
01101001
00001001
10111000
00101101
01101100
01001101
11100111
01011011
00100100
10000111
00000000
00011100
10011100
00001101
00101010
10101011
11110000
00010100
10010110
00001010
00000110
00001111
11111101
10111110
00001110
01001110

stdout

stderr

strace