Ok , he is doing in the program the following:
sending
0 0 1 1 1 0 0 0 to portA
then
0 0 0 0 1 0 0 0 to portA
then
0 0 0 0 0 1 1 0 to portA
then
0 0 0 1 0 1 0 0 to portA

how do we know which one is which (DISPLAY OFF,
ENTRY MODE SET etc...)

k