Quantcast
Channel: Question and Answer » assembly
Viewing all articles
Browse latest Browse all 23

8051 – After API call at 0xFFF0, instruction pointer is not returning to my program

$
0
0

With microprocessor ATmEL 89C51RC2 , when I prepare registers and ACC for API call and I call

CALL 0xFFF0

instructions below the call are never executed. The process never returns from 0xFFF0. Are there any common mistakes begginers can do, that causes this? What is important to take care of, for API instruction to execute properly?

My code:

FLASH_ADR equ 01000h        ; adress in FLASH to write to
PGM_MTP equ 0FFF0h          ; adress of API subprogram
PulseRRef set 4230;

MOV R0, #11
MOV R1,#02h
MOV A, #low(PulseRRef)

MOV DPTR,#FLASH_ADR

LCALL PGM_MTP

JZ END_S

MOV DPTR,#TEXTES     ; writes message to the terminal
CALL SEND

END_S:

MOV DPTR,#TEXTME    ; writes different message to the terminal
CALL SEND

RET

Viewing all articles
Browse latest Browse all 23

Trending Articles