Appologizingzzzzzzzzzzzzzzz
Dear Robert!
I appologize for my hasty answer on your question!
I saw example in P-S-I.odc help file and simply remade it.
I DO NOT KNOW WHY IT DOESN'T WORK PROPERLY!
When I opened aaa.ocf file in hiew.exe I can saw many unknown codes after my
inline. I do not know the neaning of that codes.
Excuse me, please! I was hurry :o(((((((
Text from P-S-I.odc:
System flags for procedures
Name Value Description
code 1 Definition of a Code procedure (see below).
ccall -10 Procedure uses CCall calling convention.
Code procedures
Code procedures make it possible to use special code sequences not generated
by the compiler. They are declared using the following special syntax:
ProcDecl = PROCEDURE "[" SysFlag "]" IdentDef [FormalPars]
[ConstExpr {"," ConstExpr}] ";".
The list of constants declared with the procedure is interpreted as a byte
string and directly inserted in the code ("in-line") whenever the procedure
is called. If a parameter list is supplied, the actual parameters are pushed
on the stack from right to left. The first parameter however is kept in a
register. If the type of the first parameter is REAL oder SHORTREAL, it is
stored in the top floating-point register. Otherwise the parameter (or in
the case of a VAR/IN/OUT parameter its address) is loaded into EAX. For
function procedures the result is also expected to be either in the top
floating-point register or in EAX, depending on its type. Be careful when
using registers in code procedures. In general, the registers ECX, EDX, ESI,
and EDI may be used. Parameters on the stack must be removed by the
procedure.
Examples
PROCEDURE [code] Sqrt (x: REAL): REAL (* Math.Sqrt *)
0D9H, 0FAH; (* FSQRT *)
PROCEDURE [code] Erase (adr, words: INTEGER) (* erase memory area
*)
089H, 0C7H, (* MOV EDI, EAX *)
031H, 0C0H, (* XOR EAX, EAX *)
059H, (* POP ECX *)
0F2H, 0ABH; (* REP STOS *)
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Received on Thu Jun 29 2000 - 07:02:53 UTC
This archive was generated by hypermail 2.3.0
: Thu Sep 26 2013 - 06:27:45 UTC