13.07.2015 Views

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PCP Assembly Language3−25• • • • • • • •.BYTESyntax[label] .BYTE argument[,argument]...DescriptionWith the .BYTE directive (Define Constant Byte) the assembler allocatesand initializes a byte of memory for each argument.An argument can be:• a single or multiple character string constant• an integer expression• NULL (indicated by two adjacent commas: ,,)Multiple arguments are stored in successive byte locations. If an argumentis NULL its corresponding byte location is filled with zeros.If you specify label, it gets the value of the location counter at the start ofthe directive processing.Integer arguments are stored as is, but must be byte values (within therange 0−255); floating−point numbers are not allowed. If the evaluatedexpression is out of the range [−256, +255] the assembler issues an error.For negative values within that range, the assembler adds 256 to thespecified value (for example, −254 is stored as 2).In case of single and multiple character strings, each character is stored inconsecutive bytes whose lower seven bits represent the ASCII value of thecharacter. The standard C escape sequences are allowed:.BYTE ’R’ ; = 0x52.BYTE ’AB’,,’D’ ; = 0x41420043ExampleTABLE .BYTE ’two’,0,’strings’,0CHARS .BYTE ’A’,’B’,’C’,’D’Related information.SPACE (Define storage).ASCII / .ASCIIZ (Define ASCII string without/with ending NULL).WORD / .HALF (Define a word / halfword)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!