This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assembly routines producing NOP's

I'm new to the Keil compiler and am having problems with assembly subroutines. The program compiles and links just fine but when I download the debug file to my Metalink emulator the assembly subroutines show up has NOP's. Here's the C section:

if (have_ram)           /* if ram available save cause of reset*/
	{
		Chk_reg();			/* check if buffer variables are ok*/
		if (WTRF)			/* watchdog timeout*/
		{
			wdrst++;		/* increment number of times watchdog has occured*/
			WTRF=0;			/* clear flag*/
		}
		trst++;				/* increment total number of resets counter*/
		Lrc_reg();			/* calculate new storage reg LRC*/
	}

and here is the assembly routine:
$TITLE(LRC_REG)
PUBLIC  LRC_REG

DPL1		EQU	84H
DPH1		EQU	85H

LRC_REG	SEGMENT	CODE
	RSEG	LRC_REG    

	MOV		DPTR,#7FE0H	; start location of buffer
	MOV		B,#00H		; clear 
LRC1:
	MOVX		A,@DPTR		; load data
	XRL		A,B		; exclusive OR
	MOV		B,A		; store
	INC		DPTR		; next location
	MOV		A,DPL1		; check for end of buffer
	CJNE		A,#0F7H,LRC1    ; loop if not end
	MOV		A,B		; get computed checksum
	CPL		A               ; compliment for cleared RAM   
	MOVX		@DPTR,A		; store new checksum
	RET

	END

This is the assembly code it ends up producing:
48B4    LRC_REG: NOP
                 NOP
                 NOP
                 ...
It is doing this for multiple assembly subroutines. I know I'm doing something stupid but don't know what it is.