Hi Thanks for the answers to the last question about the function call to an absolute address. I am trying to use the iap routines for the NXP p89v664 device. The first test is just to get the manufacturers ID but it doesn't work.
To simplify the code I just check if I can pass by the lcall instruction. With the lcall instruction I get 'a' to my terminal but no 'b' but if I comment it out, I get 'ab' while(1) { c=serial_getchar(); serial_putchar('a'); _asm mov R1, #0x00 mov dptr, #0x0000 lcall 0xfff0 _endasm; serial_putchar('b'); } I have tested many possible changes to the code but without success. Hope I'm not off topic and many thanks. Gudjon Ps. The relevant part from the p89v664 datasheet is below: All calls are made through a common interface, PGM_MTP. The programming functions are selected by setting up the microcontroller’s registers before making a call to PGM_MTP at FFF0H. IAP function IAP call parameters Read Id Input parameters: R1 = 00H or 80H (WDT feed) DPH = 00H DPL = 00H = mfgr id DPL = 01H = device id 1 DPL = 02H = device id 2 DPL = 03H = 6x/12x bit (bit 7 = 1 = 6x) DPL = 80H = ISP version number Return parameter(s): ACC = requested parameter ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user