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

c51: Pointer to a fucntion in array

I have seen the application article about function pointer, but after I have use the OVERLAY attribute, the link told me that :Invalid Keyword.
In a osddrive.c file, I create an array like below: code void(code *maincursordraw[])()={drawinputmenu};
Function drawinputmenu() has been in the same file.
The function is called in another function WriteMainMenu() like below:(*MainCursorDraw[bxMainCursor])();

The link in my project is:
BL51 @D3link.lin
A part of file D3link.lin is:
BANK1 { Icon.obj, OsdCtrl.obj, OsdWrite.obj, OsdTable.obj, OsdDrive.obj overlay(?co?osddrive~drawinputmenu),
OsdUtil.obj, gccduser.obj, basechar.obj},

Why the link program told me Invalid Keyword????

0