BYTE
SUNDB86x Only
The BYTE compiler directive allows the insertion of 8-bit values that represent machine code instructions within PL/B source code. These values perform instructions normally unavailable in PL/B. The instruction uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
code
Required. One or more control literals (binary, decimal, hex, or octal) containing 8 bit absolute machine code, Data Definition Labels, a VARLIST of valid Data Definition Labels that are inserted into the PL/B object code.
Flags Affected: NONE
Note the following:
The value of each item in {code} is not translated but written into the output code exactly as given. This instruction should only be used by programmers knowledgeable in machine language. This is an area where Sunbelt may offer examples but will not provide support, except at prevailing time and material consulting rates.
Multiple {code} items may be placed on a single line and may be continued onto other lines using the colon (:) line continuation technique.
A Data Definition Label may be a {code} item that references a variable. The compiler automatically inserts the address of the variable, in correct byte order, in place of the referenced variable.
Multiple +/- operations may be performed on an address by placing a plus (+) or minus (-) sign and a valid Ctrl literal designating the number of offset bytes immediately following the Data Definition Label.
When referencing variables within {code}, care should be taken not to overwrite the variable designator or Form Pointer/Length Pointer (as appropriate). When a Data Definition Label is used, the memory location referenced is not the first byte of the data for the variable. Therefore, it is necessary to increment this address by one for FORMs or INTEGERs and by two for DIMs or INITs to access the data therein.
Moving data into a DIM/INIT does not automatically adjust the Form Pointer or Length Pointer as if performed through other PL/B instructions. Any data transferred may not be accessible until the Form Pointer and Length Pointer have been adjusted appropriately.
If the DS, ES, SS, or SP registers are modified, they must be saved prior to such modification and restored before executing a PL/B instruction other than BYTE or WORD. The saving and restoration may be accomplished using BYTE/WORD instructions.
See Also: Example Code, BYTEX, ENTERZ/EXITZ, WORD, WORDX, and Compiler Directives
![]() |