ok, it's been a long time since i used ASM for MCS-51 but....
isn't JNB a two argument instruction???? shouldn't you have a label somewhere else???
i think you have a wrong code to begin.....
well. doing a eight input OR gate is easy if you remember that:
an OR output is TRUE when ANY of their inputs is TRUE (could be one, could be more, could all...)
an OR output is FALSE when ALL of their inputs is FALSE...
so... check if any input is logic 1, and set the output to true...
it's so d(at)mn easy...
..
boh, here it's (let's suppose that Port 2 are all your eight inputs...)
Code:
here:
mov A,P2
jz all0 ; if all inputs are 0 set output 0!
all1: ; if any input is 1, all the port is different from 0 so, the output is 1! boh!
setb P1.5
sjmp here
all0:
clr P1.5
sjmp here
review your Instruction Set to use the instruction appropriately....