  
PGM_MTP	EQU	01FF0H
FCF	DATA	0B1H       
RSEG  ?PR?iap_read_manufacturer_id?RX2IAPLIB
iap_read_manufacturer_id:
        PUSH    IE                       ; disable interrupts
        CLR     EA  
        MOV     A,CMOD
        MOV     R2,A                     ; store copy of CMOD
        JNB     ACC.6,?IAPTAG2           ; if watchdog enabled then disable
        ANL     CMOD,#0BFH
?IAPTAG2:
	ANL	FCF,#0FCH		 ; enable bootrom
        MOV     R1,#00H
        MOV     DPH,#00H
	MOV	DPL,#00H
        CALL    PGM_MTP                  ; call iap routine
        MOV     R7,A                     ; id in accumulator
	ORL	FCF,#01H		 ; disable bootrom
        MOV     CMOD,R2                  ; restore CMOD (restore watchdog state)
        POP     IE                       ; restore interrupts to initial state
        RET     

; end of iap_read_manufacturer_id