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.

3−64PCP Reference Manual.WORD/.HALFSyntax[label] .WORD argument[,argument]...[label] .HALF argument[,argument]...DescriptionWith the .WORD or .HALF directive the assembler allocates and initializesone word (32 bits) or a halfword (16 bits) of memory for each argument.ASSEMBLY LANGUAGEAn argument can be:• a single or multiple character string constant• an expression• NULL (indicated by two adjacent commas: ,,)Multiple arguments are stored in sets of four or two bytes. If an argumentis NULL its corresponding address locations are filled with zeros.If you specify label, it gets the value of the location counter at the start ofthe directive processing.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:.WORD ’R’.WORD ’ABCD’.HALF ’R’.HALF ’AB’.HALF ’ABCD’; = 0x52; = 0x41424344; = 0x52; = 0x4142; = 0x41420x4344If the evaluated argument is too large to be represented in a word /halfword, the assembler issues an error and truncates the value.ExamplesWRD: .WORD 14,1635,0x34266243,’ABCD’HLF: .HALF 14,1635,0x2662,’AB’

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

Saved successfully!

Ooh no, something went wrong!