
For grins I redid your program to the following and assembled it 
using A51.EXE

;******************************************************
.EQU    LIGHT,  0A7H            ; LED connected to port P2.7
        .ORG 	0x00
RESET1:	LJMP MAIN1
        .ORG 	0x30
MAIN1:	CPL	LIGHT		; Compliment P2.7
HERE1:	SJMP	HERE1		; Hang here till dooms day
.END
;******************************************************

I then disassembled it with Jeff Post wonderful disassembler 
D51.EXE to the following.

;******************************************************
;  8051 Disassembly of temp1.hex
	org	0
RESET1:	ljmp	MAIN1		; 0000   02 00 30   
	org	30h
MAIN1:	cpl	p2.7		; 0030   b2 a7      
HERE1:	sjmp	HERE1		; 0032   80 cc      
	end
;******************************************************

Using JSIM.EXE simulator I single step thru the program and 
verified that P2.7 complimented when told. 

The only thing missing was a comma in the original EQU line (.EQU
LIGHT, 0A7H)

;******************************************************
hex of program
:03000000020030CB
:04003000B2A780CC27
:00000001FF
;******************************************************

Hope this helps.

Regards,

Charles Bannister

Ps I also misuse the terms assembler and compile (and lots more).
