Re: PROTEUS models
Popup Windows problem.
Somebody tryed to work with this class (or functions) ?;
I would like to make a Z80 microprocessor model ,and i am sticking at this point
Any help will be apreciated
I can not move the cursor to the right place in the status popup window
In the proteus sdk the definition of the print is:
VOID ISTATUSPOPUP:rint (INT col, INT row, COLOUR textcolour,
CHAR *msg, . . . )
Description
Outputs formatted text at a specified location in the status window.
This function works in exactly the same way as printf in C.
Parameters
INT col The character column to write text at.
INT row The character row write text at.
COLOUR colour The foreground RGB colour value for the text. A number of pre-defined
colour values are declared inVSM.HPP.
CHAR *msg The format string as per printf.
… Additional arguments as per printf.
My code is:
VOID DIGITAL1::setup (IINSTANCE *instance, IDSIMCKT *dsimckt)
{
inst = instance;
ckt = dsimckt;
cps = new CREATEPOPUPSTRUCT;
ADR = 0;
cps->id = 1;
cps->type = PWT_STATUS;
cps->caption = "Register";
cps->width = 20;
cps->height =20;
cps->flags = PWF_AUTOREFRESH;
statuspopup = (ISTATUSPOPUP *)instance->createpopup(cps);
statuspopup->print(1,1,RED,"R0"); // col 1 , line 1
statuspopup->print(3,1,RED,"R1"); // col 3 , line 1;
*****
}
The caption and size of the status window is corect, but only "R1" is printed at the first line.
The proteus SDK was last updated on 30/10/2000 and the version of the VSM.HPP file is 1.10 (01/09/2003)
Proteus program version 7.8 SP2
Thank You for any support.
Regards