Zur Übersicht - INFO - Neueste 50 Beiträge - Neuer Beitrag - Suchen - FAQ - Zum CC1-Forum - Zum CC-Pro-Forum

Re: call Kategorie: Programmierung (von Robert - 26.07.2001 11:23)
Als Antwort auf Re: call von Eric - 25.07.2001 22:21

> I am also trying to call some assembly routine from a C2 program. I"m able to call to routine in segment 3, it executes correctly, but at the RETS instruction the C-Control reboots.
> To find out what wrong I"m now trying to disassemble the os.hex file! I use the CrossView debugger supplied on the CD (just read the os.hex file as an image). So far I found a jump table for all VM-codes at address 0x394. For the call function (code 62) the entry is 0x3db6. At this address I see a construction to call the assembly routine. However, how it works I haven"t figured out -yet-. It seems R4 and R5 hold the segment and offset to be called, by pushing these on the stack and performing a RETS instruction, the call is made.
>
>

Hello Eric,

so what it looks like, this call-routine is verry tricky.

It seems that the code-block who is pushing the registers R4 and R5 (holding the segment and offset for the call) is only a subroutine, preparing the call-function.

The call itself is performd in a main routine.

So you have to look after codeblocks, from where this codeblock is called and have to dissassemble the part of codeblock after the point where the RETS comannd is retuned.

Best regards
Robert


    Antwort schreiben


Antworten: