11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

HI-TECH C Assembly LanguageMacro Assembler4.3.8.15 REPTThe REPT directive temporarily defines an unnamed macro, then expands it a number of times asdetermined by its argument. For example:REPT 3sl w0ENDMwill expand tosl w0sl w0sl w04.3.8.16 IRP and IRPCThe IRP and IRPC directives operate similarly to REPT, however instead of repeating the block afixed number of times, it is repeated once for each member of an argument list. In the case of IRPthe list is a conventional macro argument list, in the case or IRPC it is each character in one argument.For each repetition the argument is substituted for one formal parameter.For example:PSECT romdata,class=CODE,reloc=4,delta=2IRP number,4865h,6C6Ch,6F00hDW numberENDMPSECT textwould expand to:PSECT romdata,class=CODE,reloc=4,delta=2DW 4865hDW 6C6ChDW 6F00hPSECT textNote that you can use local labels and angle brackets in the same manner as with conventionalmacros.The IRPC directive is similar, except it substitutes one character at a time from a string of nonspacecharacters.For example:84

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

Saved successfully!

Ooh no, something went wrong!