[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OS calls.
Dancer wrote:
> The timing characteristics are the same, but the operational function of
> them is not. With a lineA/F you peek at the instrtuction that sent you
> hence, and that's your opcode.
> You can suffix that with data, rather than stack-pushing,
Only if the parameters are constant values. You wouldn't be able
to alter these values in a read-only text segment. Instead, you
would have to push the instruction, the parameters and an "rts"
instruction, then jump to that piece of code on the stack. Not
much different from pushing the function opcode and parameters,
then execute a "trap" instrution. In fact, the latter will be
slightly more efficient.
> or you can set up an A5 call-stack, so that data is always
> in a known location.
Same is possible with a "trap", isn't it?
> This saves the classic motorola 'which stack is the
> damn address/function code/argument on' dilemma,
> and saves you a heap of code.
Sure, it saves a bit test; quite a "heap of code". Of course you'll
need that same "heap of code" to extract the function opcode from
the line-A instruction opcode.
Regards,
Waldi