mirror of
https://github.com/byteworksinc/ORCA-Pascal.git
synced 2024-11-04 18:05:49 +00:00
1 line
31 KiB
Plaintext
1 line
31 KiB
Plaintext
|
{-- Misc. pcodes -----------------------------------------------}
{ }
{ dc_cns - generate a constant value }
{ }
{ GenL1(dc_cns, lval, count); }
{ GenR1t(dc_cns, rval, count, type); }
{ Gen2t(dc_cns, ival, count, type); }
{ GenS(dc_cns, sptr); }
{ }
{ Creates COUNT occurrances of the constant lval, rval or }
{ ival, based on the type. In Gen2t can accept byte or word }
{ types. In the case of GenS, the operand is a string }
{ constant, and no repeat count is allowed. }
{ }
{ }
{ dc_glb - generate global label }
{ }
{ Gen2Name(dc_glb, r, q, lab) }
{ }
{ Creates a global label in the current segment with the name }
{ LAB^. If Q is 1, the label is marked as private to the }
{ current segment, otherwise it is marked as public. R bytes }
{ of space are reserved. }
{ }
{ }
{ dc_dst - generate global storage }
{ }
{ Gen1(dc_dst, q) }
{ }
{ Creates q bytes of storage (initialized to 0) at the }
{ current location. }
{ }
{ }
{ pc_lnm - line number }
{ }
{ Gen2(pc_lnm, lc, flag) }
{ }
{ Sets the current line number for the traceback facility and }
{ debugger. This p-code should only be generated after the }
{ pc_ent and pc_nam (if any), and should not be generated }
{ outside of a subroutine. Lc is the line number, while flag }
{ indicates the type of debugging action on this line: }
{ }
{ 0 - step/trace }
{ 1 - break point }
{ 2 - auto-go }
{ }
{ }
{ pc_mov - move memory }
{ }
{ Gen2(pc_mov, banks, bytes) }
{ }
{ The top of stack contains a source address, and TOS-1 has a }
{ destination address. The destination address is removed, }
{ and BYTES bytes are moved from the source to the }
{ destination. BANKS is the number of full banks to move; it }
{ is used when 64K or more must be moved. The memory areas }
{ must not overlap. }
{ }
{ }
{ pc_nam - subroutine name }
{ }
{ GenPS(pc_nam, str) }
{ }
{ Sets the subroutine name for the traceback facility, }
{ debugger, and profiler. Str is a pointer to the subroutine }
{ name. The following global variables should be set to }
{ appropriate values when this p-code is used: }
{ }
{ debugFlag - are we generating debug code? }
{ profileFlag - are we profiling? }
{ traceBack - are we doing tracebacks? }
{ includeFile - current source file name }
{ }
{-- Pcodes involved expressions --------------------------------}
{ }
{ pc_abi - integer absolute value }
{ pc_abl - longint absolute value }
{ pc_abr - real absolute value }
{ }
{ Gen0(pc_abi) cgByte,cgUByte,cgWord,cgUWord }
{ Gen0(pc_abl) cgLong,cgULong }
{ Gen0(pc_abr) cgReal,cgDouble,cgComp,cgExtended }
{ }
{ The value on the top of the evaluation stack is replaced }
{ by its absolute value. }
{ }
{ }
{ pc_acs - arc cosine }
{ }
{ Gen0 (pc_acs) }
{ }
{ Replace the top of stack with its arc cosine. }
{ }
{ }
{ pc_adi - integer addition }
{ pc_adl - long addition }
{ pc_adr - real addition }
{ }
{ Gen0(pc_adi) cgByte,cgUByte,cgWord,cgUWord }
{ Gen0(pc_adl) cgLong,cgULong }
{ Gen0(pc_adr) cgReal,cgDouble,cgComp,cgExtended }
{ }
{ The two values on the top of the evaluation stack are }
{ removed and added. The result is placed back on the stack. }
{ }
{ }
{ pc_and - logical and }
{ pc_lnd - long logical and }
{ }
{ Gen0(pc_and) cgByte,cgUByte,cgWord,cgUWord }
{ Gen0(pc_lnd) cgLong,cgULong }
{ }
{ The two values on the top of the evaluation stack are }
{ removed and anded. The result is placed back on the stack. }
{ Zero is treated as false, and any other value as true. The }
{ and is a logical and. See pc_bnd for a bitwise and. }
{ }
{ If the first operand is false, the second operand is not }
{ evalu
|