2004-03-31 12:20 AM
2004-03-30 07:41 AM
I get a Phase Inconsistency Error on DSP_CHx, DSP_UHR, DSP_ERR, but not on DSP_MAX. If I put e.g. the Programm DSP_CHx at the first place than this program gives no error, but the DSP_MAX.
The #INCLUDED Files are all without st7/ .. end so the asm generally works. I would like to use the Constants DSP_*** in other program modules for setup the display mode. ________________ Attachments : DISPLAY.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I09v&d=%2Fa%2F0X0000000bVL%2FS1.esjhC1atiZ_J7NO6dYEnM5_LM8k5LA60hS4ckQAA&asPdf=false2004-03-30 11:11 PM
I don't fully understand what you are trying to do, except use function pointers - but I would say it not possible.
The reason you are getting the phase errors is because you are using memory references before they are known by the assembler. Wouldn't using compare and jumps be much simpler to implement than function pointers? I would also strongly suggest you use include files rather than including asm files, this can lead to lots of problems later on. Regards sjo2004-03-31 12:07 AM
reply to sjo
The use of address pointers is the most effective way to run different programms. The pointer consists of an 8-bit Offset, hold in DSP_PNTR and the 16-bit base address DRUN_SUB. There will be approx.40 diff. display routines in totally, also with other 16-bit base address, for each mode of the device an other. e.g for TEST-Mode -> DTEST_SUB, for programming parameters -> DPRGM_SUB and so on. For each block I have a 256-Byte space for programs. With this technic, I can load in a other routine the DSP_PNTR with the value for the desired display program. The base address is given from the MOD_REG, e.g. 0=RUN, 1=TEST... I use this technic for programming Z86 processors and also for MC05. In my opinion, there must be something wrong with the ST7-assembler. Regards Kurt2004-03-31 12:20 AM
addition to the answer for sjo
I have put the EQU block at the end of the program block (after the last subroutine) then it works! Kurt