[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing ORCA/M and ORCA/C



gudat@avalon.physik.unizh.ch (gudat henrik) writes:

>Has anyone tried this: I want to call an ASM routine from C, but I need
>to set the A,X,Y registers to a specific value. The assmebly code sets
>the registers to new values and then returns to the C code. How can I
>set the registers with a C statement without asm (if possible) commands?
>And how can I read them?

W/o ASM statements, you are stuck, at least as far as setting the regs goes.
I'd have to check which registers are left alone by the subroutine-caller,,
anyway. As for returning values of registers: You can do it with either A
or X/Y (via the return type), I think it's not possible to have A/X/Y.
Are you sure there is no other way to accomplish what you want? Perhaps a less
cumbersome interface between your routines would be good? :)

Soenke
-- 
===========================================================================
More than silver, more than gold, I need   !    behrenss@informatik.
electricity. I need it for my dreams.      !    tu-muenchen.de
(RACTER)                                   !  FIDO: 2:246/13 Soenke Behrens