Home

R32C/100 Series C Compiler Package V.1.01 Assembler User`s

image

Contents

1. Selects Maximum Length of Data Record Area Function e The data record length of the Motorola S format is set to 32 bytes e The data record length of the Intel HEX format is set to 32 bytes Description rule e Specify this option before entering a file name Description example gt Imc100 L debug Specifies Output File Name Function e Specify the file name of the machine language file generated by Imc100 e Apath can be specified in the file name e The extension of the file name can be specified When omitting the specification of the extension Motorola S format file is output in mot and Intel HEX format file is output in hex e An output file is output in the directory which is the same as the specified absolute module file Description rule e Input this option using a form like O file name e Always be sure to insert a space between this option and the file name e Specify this option before entering a file name Description example gt Imc100 O test debug A test mot file is generated gt Imc100 O tmpltest debug A test mot file is generated in the tmp directory Indicates Version Number Function e The software indicates the version number of Imc100 If this option is specified all other parameters on the command line are ignored Description rule e Specify this option only and nothing else Description example gt Imc100 V 96 Error Messages of Imc100 A O
2. ccccccesseessesseeeeeeeeeeeeeeeseeeeeeseceeeeseeeseseseeeeeeeseeeeeees 66 Command File ds EA A A ced dus dus varius hbeteseSirs ovatacs desea aia 67 In10O Command Optio A a ieee abe bes 67 O Aae A an N aE N A a aea 68 E A NA 68 A 69 TOPE A A TO ecc 69 e tl e o ot Ade o tt ta ta 70 Ia e ler SM OEA a Lt dd DIO te 71 AA ate eee atin ee Stns aa et ee elit Ries carte a T aber e oat 72 THO CR sisas spdaveceetatantesesbietecetauact sa EES T 73 Mi A Td erect ok eee bal ae edie then als ean eet IN rae 75 MSEMSLE A A A i Sah ceed ated iii 75 MPB8 MPBI6FMBB32 0000 A dot A A TE 76 INOS TOP a a E ral 77 DA NA A a LE 77 ORDER A A A 78 PSE Pucon ai bt casaseccecitys o ea REENER 79 MN DS USA AS ahaa Re E nn eave oly ae eh salar aes tess 80 Uimaan Gals ccccelet A Soe ied A et obits Cesta ett tt ra 81 A Sita sac ctsazeehah E E E E E E 81 VECES a alas si a a 82 E A A Mat ANN 83 EW ct horn at alles A cots E E EE 84 insides ase OGTR ARA A A Rte eee aeeAOeaS 84 Error Messages of Ini DO DI o es Gh Se SIE PEER eS 85 Warning Messages of 11100 cccccccccseeseseseseeeeeseseeeeeeeeeeeeeseeeeeeeeseeeeeeeeeeeseeeeeeeeeeeeeeeseeeseeeeeeeeeeeeeees 87 Method for Operating lmcl100 ooooooonnoonncnnnnnnnnnnnnnnnnnonnnononnnnnnnnnnnnnononnnnn nono nnnnn non nono nono nro nn n OnE KTORAS 90 Command Parameters ccoccccccnnnonnnonononnnn nn nn nn non nn nn nro nono EN E E i OS 90 Rules for Specifying Command Parameters cccccesssesseessee
3. Condition 1 Library file reference was specified on the command line Condition 2 After all specified relocatable module files have been allocated some global labels remain whose values are depending determination Precaution The In100 editor links the entire relocatable module where necessary global labels are defined Rules for referencing library modules The In100 editor determines the relocatable modules to be linked in the order described below A relocatable module that has been determined to be linked is relocated section by section Sections are relocated in the same way as sections are relocated in a relocatable module file 1 The In100 first searches the global label information of relocatable modules entered in a library file Relocatable modules are referenced in the order they are entered in the library file 2 The labels searched from the library file are compared with the labels whose values are pending If any labels match In100 links this relocatable module in the library file to the absolute module file 3 After going over the relocatable modules in the library file if there remains any global label whose value is pending i e a relocatable module in the library file contains an external reference label In100 outputs an undefined error Example of referencing library modules libsmp1 a30 GLB sym1 External reference symbol SECTIONprogr1 END libsmp lib libsmp2 a30 GLB sym2 EQU SECTIONprog2
4. END osmp3 a30 GLB sym1 GLB sym2 External reference symbol sym1 EQU 1 SECTIONprog3 END Input command to link gt In100 libsmp1 L libsmp lib Result to link processing libsmp1 r30 processing libsmp lib libsmp3 r30 processing libsmp lib libsmp2 r30 17 Management of Include File The as100 assembler can read an include file into any desired line of the source program This facility can be used to improve the legibility of your program Rules for Writing Include File To write an include file follow the same rules that you follow for writing a source program Precaution Directive command END cannot be written in an include file Optimized Selection by AS100 The as100 assembler generates optimum selected or most suitable code for the source statements shown below e When jump distance specifier is omitted When instruction format specifier is omitted When addressing mode specifier is omitted e Combination of the above The following explains optimum selection by as100 for each case listed above When jump distance specifier is omitted normally omitted The as100 assembler performs optimum selection when all of the following conditions are met When the operand is written with one label When the operand is written with an expression that contains one label Label value determined when assembled Label value determined when assembled Value determined when assembled
5. ccccccccnnnnnnnnnnncnnnononnnnnonnnonnnnnnnnnnnnnnnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnss 23 Source Line Information Output occccccnnnnnnnnncccnnnnnnnnnnonacononononanononnrrnnnnnnnnnnnnncrronnnnnnnnnnnnrrconnnnnnnnnannooss 24 Symbol Dent ins 24 Environment Variables of as100 ooccccccnnnonononononononononononnnonononnnonnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnniness 25 Output Messe ai 25 Input Output Files of AS TOO ci cas 27 Relocatable Module File ccccccsseesssssseeeseeesecsseessecsseessesseeesecessesseeeseeeseeeseesseceseeeseceseseseeeseeseeees 28 Assembler List File ooonnnnnnnnnnnnnnnnconnnnnnnnnnnnonoconnnnnnnnnnnnroronnnnnnononnnorornnnn EEEE OEA E 29 Assembler Error Tag Flle ooonnnnnnnnninnninncinncinncinncnnncnnncnnn rr nn rr nr rra rr 32 Branch Information Piles cscc c cscs sacnsecsystenntdvataneesaesGassisaentedsna E Ea E AR a a EE 32 Absolute Module File ci di 32 Map Piles ias 33 Link Error Tas Fale anida anios 34 AS A A 35 Intel HEX Format oooocnnnnnonononaooonoonononno nono non nono nono nn nn nono nn nn non nr nn E nn nn nr narran naar r anne narran nr nn rra nn narran naar nano 36 A sat EA EAE E T 38 Library Ple lt 38 Library Liste nio eii 39 Absolute List Plena A a ari dadas 40 Starting Up Propra inside 41 Precautions on Entering CommMandS oooooononnnnnononnnnnnnnnonnnonnnnnnnonnnnnnnonnonnnnnnnnnn nn nn no nono nn nnnnnn rn on nn nnnnnnos 41 Structure of Command Line cocccc
6. gt Imc100 A 1000 11FF sample The starting address of a specified address range is set to 1000H and the ending address to 11FFH gt Imc100 A 1000 sample In the specified range of addresses 1000H is the start address value and the maximum address for data that is registered in the absolute module file sample is the end address value Sets the Starting Address Function e Set the starting address e Output to a Motorola S format file beginning with the address you have set e The Motorola S format file is output with the setting starting address Description rule Input this option using a form like E address value Always be sure to insert a space between this option and the value Always be sure to use hexadecimal notation when specifying an address value If the address value begins with an alphabet a to f always be sure to add O at the beginning of the value as you enter it Precaution This option cannot be specified simultaneously with H Description example gt Imc100 E 0f0000 debug A debug mot file is generated that starting address is Of000H gt Imc100 E 8000 debug A debug mot file is generated that starting address is 8000H 92 Sets data in a space area Function e Outputs arbitrary data to addresses holding no data within a specified absolute module file e Following three specifications are possible for this option 1 Specification of only the data value that is to be set in a fre
7. is missing for ENDIF IF for ENDIF is not found Check the position where ENDIF is written INSF is missing for EINSF INSF used with EINSF in a pair is missing Check where EINSF is put MACRO is missing for ENDM MACRO for ENDM is not found Check the position where ENDM is written MACRO is missing for LOCAL MACRO for LOCAL is not found Check the position where LOCAL is written LOCAL can only be written in a macro block MACRO or MREPEAT is missing for EXITM 2 MACRO or MREPEAT for EXITM is not found Check the position where EXITM is written MREPEAT is missing for ENDR MREPEAT for ENDR is not found Check the position where ENDR is written VER is duplicated VER is specified more than once in the file VER can be written only once in a file Delete extra VER s N is multiple specified in SECTION Two or more ALIGN s are specified in the SECTION definition line Delete extra ALIGN specifications BREAK is missing for FOR DO or SWITCH BREAK is used in an inappropriate location Make sure the BREAK command is written within the FOR DO or SWITCH statement CASE has already defined as same value The same value is written in the operands of multiple CASE statements Make sure the values written in the operands of CASE are unique and not the same 55 CONTINUE is missing for FOR or DO CON
8. Allocates RAM area in units of 2 bytes Function e This command allocates a specified bytes of RAM area in units of 2 bytes e Label name can be defined at the allocated RAM address Description format BLKW numeric value name BLKW numeric value Rules for writing command e This directive command must always be written in a DATA type section Section types can be made the DATA type simply by writing DATA following the section name when you define a section Always be sure to insert space or tab between the directive command and the operand Write an integral value in the operand A symbol can be written in the operand An expression can be written in the operand The expression in the operand must have its values determined when assembling the source program e When defining a label name in the allocated area be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example symbol EQU 1 SECTION area DATA work1 BLKW 1 work2 BLKW symbol BLKW symbol 1 Defines bit symbol Function e This command defines a bit position and memory address The symbol defined by this directive command is called a bit symbol e By defining a bit symbol with this directive command you can write a bit symbol in the operand of a 1 bit operating instruction e The defined bit position is a bit whose position is offset from the LSB of a specifi
9. label When operand labels are defined in the same section The section where the instruction is written and the section where the operand label is defined both are absolute attribute sections and are written in the same file Precautions e f conditions to perform optimum selection are not met as100 generates code as directed by directive command OPTJ When the branch instruction that is making reference to the global label is optimized specify OGJ Oglb_jmp of nc100 JOPT of as100 and JOPT options of In100 However the directive command OPTJ is ignored where these options were designated The following shows instructions selected by as100 Unconditional branch instruction The shortest instruction possible to branch is selected from jump distances A W B and Ss Precaution Size S is selected only when the branch instruction and the jump address label are present in the same section e Subroutine call instruction The shortest instruction possible to branch is selected from jump distances A and W e Conditional branch instruction Jump distance B or alternative instruction is generated Precautions The source line information in a list file is output directly as written in the source lines Code of alternative instruction is output to the code information section When instruction format specifier is omitted normally omitted The instruction format specifier norma
10. ENDIF is not entered Check the position where ENDIF is written Write ENDIF as necessary o ENDM statement ENDM is not entered Check the position where ENDM is written Write ENDM as necessary o ENDR statement ENDR is not entered Check the position where ENDR is written Write ENDR as necessary o FB statement FB is not entered When using the 8 bit displacement FB relative addressing mode always enter FB to assume a register value No SB statement SB is not entered When using the 8 bit displacement SB relative addressing mode always enter SB to assume a register value No LBBA statement LBBA is not written When writing an instruction to specify a relative address be sure to write LBBA so that a register value will be assumed No SECTION statement SECTION is not entered Always make sure that the source program contains at least one SECTION No at the top of comment 3 is not entered at the beginning of a comment Enter a semicolon at the beginning of each comment Check whether the mnemonic or operand is written correctly No input files specified No input file is specified Specify an input file No macro name No macro name is entered Write a macro name for each macro definition No space after mnemonic or directive tee daa O ee do i eee PAE oe eg RS eS de The mnemonic or assemble directive command is not followed by a blank
11. Function e The software starts up In100 by using the contents of the specified file as the command parameters Description rule e Input this option using a form like file name No space or tab can be entered between this option and the file name No other parameters can be written on the command line Description example gt In100 cmdfile Error Messages of In100 loc and locr are specified The loc and locr options are specified Check the option loc section section is multiple defined The section name specified by the loc option here has already been defined before Check the section name loc section section is not found The section specified by the loc option cannot be found Check the section name locr is multiple specified The locr option is multiple specified Check the option locr section section is not found The section specified by the locr option cannot be found Check the section name order section section is multiple defined The section name specified with order is defined twice or more Make sure that sections are defined only once order section section is not found The section specified with order cannot be found Check the section name and re run VECT option parameter symbol is undefined The symbol symbol specified with VECT is not defined yet Check the symbol name VECTN option
12. ID Transfers specified information to map file and ID file RVECTOR Sets the software interrupt number and software interrupt name Control instructions for outputting inspector information The following are the directive instructions for controlling the output of inspector information INSF Defines the start of a function subroutine in inspector information EINSF Defines the end of a function subroutine in inspector information CALL Defines where to call a function subroutine in inspector information STK Defines a stack in inspector information Macro directive commands MACRO Defines macro name Indicates beginning of macro body EXITM Stops expansion of macro body LOCAL Declares local label in macro ENDM Indicates end of macro body MREPEAT Indicates beginning of repeat macro body ENDR Indicates end of repeat macro body Macro symbols MACPARA Indicates number of actual parameter of macro call MACREP Indicates how many times repeat macro body is expanded Character string functions LEN Indicates length of specified character string INSTR Indicates start position of specified character string in specified character string SUBSTR Extracts specified number of characters from specified character string beginning with specified position 128 Indicates the assembly source file name being processed by as100 Function e This command expands a file name into the one that
13. Operan lt E EA delat bats le AAA A dd da EA A E 119 Rules for Writing Operands aisneis innne e ana ssn uedseeseebasidesvscessbevseesss aaaea ovasddtenddeeses 119 Operator Ea Ale ee LL oho asada ss 121 Character otr No Soe Cedi oes tek cobs asetens kee es en ai tec EER E dese tesen se ecu eh tes 123 Directive COMME acia 124 List of Directive Commands smerna neea n a a A a a aE E E R 125 Fl a E SA SAA IT ace ee aaa 129 MACPAR A coat A AS dat 130 MACRE Poio A A A A a EE 131 ADD SA e liada 132 ADICON autistas 133 ASSERT AA A TA heal deta e A A AN 135 BOKA al A ASS DITA 136 BEKR Bigeste nuore ia Na ial eth dis 137 BERD pemo ae a ETA A tanta nestles Soe da e Hee Lk 138 BER Piu A A A Sekt Mite gee Sole ed aa IS a Salts 139 BLE a e dd 140 SA ndsduwestecaistastaassaaecadsladsdaashcecelaad4g caatadeessalgagensdacadisiaeesatacnds 141 BTEQUI tr AA aie eek esta Pa ae ede le ee oe aes 142 1 BB Sep renee eee IS RS AE A Pee PPE 143 CATE O TN O O e e RdA oo ee 145 DEFINEN aL OAR E Sei 146 DOUBEE ont da al tc ico 147 INS add bi a 148 A E E IAN 149 PESE A E AEA NAE E NAE A 150 END eien ana E aA a Ea A EAA a E EA 151 ENDIE arias A A A A A aa 152 END ME A A A A A E ASADA Doa 153 END A A A las 154 QUA A A A ai 155 AA O TOTO E 156 A A D AEE a A A a A SN ao 157 P BOY MississseasedcctexsesisesapavesseassatostuszetetitsaneaSasebeasitzeceaesidbtecseiaaadordaSeckesetadadaiawaccesstastelooaveteestisdistioven 158 FIXED ad actos NAT 159 SOA TA ate Beds LOE N
14. and indicates the eight low order bits of 2 s compliment of that value Data Record 00 Record 1 Start mark 2 Code count 3 Address offset 4 Record type 00 5 Data 6 Checksum End Record 01 Record 00 0000 01 FF Bl Bl ll lel 1 Start mark 2 Code count 00 3 Address offset 0000 4 Record type 01 6 Checksum xa Expansion Segment Address Record 02 Record Expansion Segment Address Record expresses the 20 bit address 02 0000 02 XXXX XX Tf fl Bl Ml bl le 1 Start mark 2 Code count 02 3 Address offset 0000 4 Record type 02 5 Segment base address 6 Checksum The execution address of expansion segment address record is obtained as described below Segment base address lt lt 4 Address offset of data record Expansion Linear Address Record 04 Record Expansion Linear Address Record expresses the 32 bit address 37 Start mark Code count 02 1 2 3 Address offset 0000 4 Record type 04 5 Linear base address 6 Checksum The execution address of expansion linear address record is obtained as described below Linear base address lt lt 16 Address offset of data record ID File Only when you specify command option ID Imc100 outputs ID code to a file Format of ID file This file is output in a text format that can be output to a screen an
15. specify them in the form like value or symbol name software interrupt number value or symbol name software interrupt number Always be sure to enter a space between this option and the value or label name Always be to specify values in hexadecimal If the value begins with an English alphabet a b c d e f be sure to write O at the beginning Be sure to separate a value and a software interrupt number with a comma No spaces or tabs can be entered before and after a comma Always make sure software interrupt numbers are entered in decimal This option can be written at any position in the command line Description example gt In100 VECTN stop 20 sample1 sample2 1 gt In100 VECTN stop0 20 stop1 21 sample1 sample2 2 1 The address value of stop is set for software interrupt number 20 2 The address values of stop0 and stop1 are set for software interrupt numbers 20 and 21 respectively 83 On the occurrence of a warning no absolute module file is generated Function e Ontheoccurrence of a warning no absolute module file is generated e On the occurrence of a warning 10 is returned to the return value of OS Precaution When this option is not specified 0 is returned to the OS return value Description rule This command option can be specified at any position in the command line Description example gt In100 W sample1 sample2 Specifies Command File
16. 1 degree Precautions When this directive command is described in more than one assembly sauce file it becomes warning with the linkage editor Description example ID code character string fixed vector section lword start id Code Sets ID code Code Description example ID code numeric value fixed vector section RESET lword start id 20030401 Sets ID code 20030401 Conditional assemble control Function e This command indicates the beginning of a conditional assemble block e The assembler resolves the condition written in the operand and if it is true assembles the body that follows e If condition is true lines are assembled up to and not including the line where directive command ELIF ELSE or ENDIF is written e Any instructions that can be written in a as100 source program can be written in the conditional assemble block Description format AF conditional expression body ENDIF Rules for writing command e Always be sure to write a conditional expression in the operand of this directive command e Always be sure to insert space or tab between the directive command and the operand Function of conditional expression e Conditional assemble is performed based on the result of the conditional expression Rules for writing conditional expression Only one conditional expression can be written in the operand of the directive command Always be sure to write a relationa
17. 16 bit addressing mode that includes the name specified in the operand of this directive command Description format FBSYM name FBSYM name name Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e Always be sure to set the FB register value with directive command FB before you write this directive command When specifying multiple names be sure to separate the names with a comma as you write them e Be careful that the symbol you specify with this directive command is not a duplicate of the symbol specified by SBSYM Description example FB 80H LDC 80 FB FBSYM sym1 sym2 Stores a fixed point number data in ROM in 4 byte length Function e This command stores 4 byte long fixed point data in ROM e Label can be defined at the address where data is stored Precaution This directive command can only be written when the option PSFP is specified Description format FIXED numeric value name FIXED numeric value Rules for writing command e Write a fixed point number in the operand e Any value in the range 8 0 to 7 99999999 representable by fixed point numbers can be written b31 b27 bO S T decimal fraction constant S sign bit e Always be sure to insert space or tab between the directive command and the operand e When defining a label be sure to write the label name
18. Illegal file name The file name is illegal Specify a file name that conforms to file name description rules Illegal macro parameter The macro parameter contains some incorrect description Check the written contents of the macro parameter 57 Illegal operand is used The operand is incorrect Check the syntax for this operand and rewrite it correctly Include nesting over Include is nested too many levels Rewrite include so that it is nested within the valid levels Including the include file in itself An attempt is made to include the include file in itself Check the include file name and rewrite correctly Initialization function definition of the section is not appropriate The section initialization function that involves use of C language startup is defined incorrectly Check how the section initialization function is defined Interrupt number was already defined The software interrupt number was already defined Change the software interrupt number Invalid bit symbol exist An invalid bit symbol is entered Rewrite the bit symbol definition Invalid label definition An invalid label is entered Rewrite the label definition Invalid operand s exist in instruction The instruction contains an invalid operand Check the syntax for this instruction and rewrite it correctly Invalid option xx is in environment data 2 The environment variable contains invalid command
19. Imc100 functions eo Generates Motorola S format file Generates Intel HEX format file Outline of lb100 functions e Generates a new library file e Renewal a library file e Generates a library list file Outline of abs100 functions eo Generates absolute list files 11 The as100 assembler converts an assembly source file into a relocatable module file that can be read in by the linkage editor It therefore allows you to process assembly source files that include macro directive commands Relocatable Assemble e The as100 assembler is capable of relocatable assembling necessary to develop a program in separated multiple files It generates a relocatable module file from assembly source files that contains the relocatable information necessary to link multiple files e The Ini00 editor references section information and global symbol information in the relocatable module file generated by as100 while it determines the addresses for the absolute module file section by section Precautions Regarding hardware conditions consider the actually used system as you write source statements and perform link processing Hardware conditions refer to 1 RAM size and its address range and 2 ROM size and its address range Programs as100 and In100 have no concern for the physical address locations in the actual ROM and RAM of each microcomputer in the R32C 100 series Therefore sections of the DATA type may happen to be allocated in the ch
20. Operator 1 Operator to change priority 2 Unary operator SIZEOF TOPOF 3 Binary operator 1 1 4 Binary operator 2 5 Binary operator 3 gt gt lt lt 6 Binary operator 4 amp 7 Binary operator 5 8 Relational operator gt lt gt lt Expression and lts Value The following shows a description example of an expression and the value that results from operations performed by as100 Expression Result of operation 2 6 2 5 2 6 2 4 1 lt lt 3 1 16 1 lt lt 3 1 9 3 2 4 2 1 3 2 4 2 0 8 4 2 10 8 4 2 6 888 2 8 amp 8 2 4 6 3 18 6 3 18 6 3 18 Character String A character string can be entered in the operand of some directive commands This character string can be comprised of 7 bit ASCII code characters When writing a character string in the operand of a directive command be sure to enclose it with single or double quotations unless otherwise specified Example string string 123 AS100 allows you to write directive commands in addition to the R32C 100 series mnemonics in the source programs that can be assembled by AS100 There are following types of directive commands available Address control directive commands These commands allow you to specify address determination when assembling the source program Assemble control directive commands These commands allow you to specify how operat
21. Rules for writing command e Always be sure to write a macro name e To write a macro name follow the rules for writing name in Section 1 Rules for Writing Program e Formal parameters can be defined in the operand e Always be sure to insert space or tab between this directive command and the macro formal parameter e Space or tab can be written between this directive command and the macro name Rules for writing formal parameter e To write a macro formal parameter name follow the rules for writing name in Section 1 Rules for Writing Program e When defining a macro formal parameter use a name that is unique including nested macro definitions e When defining multiple formal parameters separate the formal parameters with a comma as you write them e Always make sure that the formal parameters written in the operand of directive command MACRO are written within the macro body Precaution All character strings enclosed with double quotations indicate the character strings themselves and nothing else Therefore do not enclose the formal parameters with double quotations e Up to 80 formal parameters can be entered Precaution This means that you can enter up to 80 formal parameters within the range of the number of characters that can be written in one line Rules for writing actual parameter e Always be sure to insert space or tab between the macro name and the actual parameter e Make sure that the actual pa
22. addresses overlap in two or more sections In100 outputs a warning Sections will be allocated overlapping each other For section type CODE or ROMDATA if addresses overlap in two or more sections In100 outputs an error If an attempt is made to allocate an absolute attribute after a relative attribute in sections of the same name In100 outputs an error If section names are the same and information on section attribute or type is inconsistent In100 outputs a warning Example of section allocation by In100 The following shows an example of how sections are actually allocated Section definition of file1 a30 SECTION program SECTION subroutine ORG OFFE10000H END Section definition of file2 a30 SECTION subroutine SECTION interrupt END Section definition of file3 a30 SECTION interrupt SECTION program END 14 The example below shows how sections are located when their start addresses are not specified by a link command Example 1 gt In100 file1 file2 file3 Result of section location program REL CODE 00000000 0000003 file1 REL CODE 00000003 0000003 file3 subroutine ABS CODE FFE10000 0000003 file1 REL CODE FFE10003 0000002 file2 interrupt REL CODE FFE10005 0000002 file2 REL CODE FFE10007 0000003 file3 Example 2 gt In100 file1 file2 file3 order interrupt 0ffe00000 Result of section location interrupt REL CODE FFE00000 0000002 file2 REL CODE FFE00002 0000003 file3 program REL CODE FFE00005 0000
23. as100 Oc work asmout sample L T 51 Starts the programmable sound field processor Function e Starts the programmable sound field processor e When this option is specified the following directive commands can be written in a source program Address control directive commands BLKL FIXED ALGN Assemble control directive commands SECTION EQU INCLUDE LBBA Link control directive commands SECTION GLB VER List control directive commands LIST PAGE FORM Extended Function directive commands ASSERT FILE o Macro directive commands MACRO EXITM LOCAL ENDM MREPEAT ENDR MACPARA MACREP LEN INSTR SUBSTR Precaution e 1Lword 4 bytes is processed as one address e If a global symbol defined in another file is referenced the symbol is processed as a global label The alignment correction value assumed when this option is specified consists of 2Lword no matter which option to the alignment correction value ALIGN2 or ALIGN8 is specified e The option S is added by default e The link option ORDER should be used to set the addresses at which sections are located Description rule This command option can be specified at any position in the command line This option must always be specified in uppercase letters Description example gt as100 PSFP sample 52 Specifies Local Symbol Information Output Function e The software outputs local symbol information to a relocatable
24. be omitted Command options Command options are not case sensitive so they can be entered in uppercase or lowercase e Always be sure to enter a space or tab between the command option and its argument abs100 Command Options The following pages describe rules you need to follow when specifying command options Disables Message Output to Screen Function e The software does not output messages when abs100 is processing e Error messages are output to screen Description rule e This option can be specified at any position on the command line Description example gt abs100 sample a30 Specifies File Search Directory Function e Specify the directory in which you want assembler list files to be searched e fthis directory is not specified abs100 searches assembler list files from the current directory Description rule e Input this option using a form like D directory name e No space or tab can be entered between this option and the directory name Description example gt abs100 sample Ddir Assembler list files in dir under the current directory are searched gt abs100 sample Ddir list1 File list1 1st 1s searched in dir under the current directory is searched Specifies File Output Directory Function e Specify the directory in which you want the absolute list file to be generated e If this directory is not specified the absolute list file is generated in the current directory Description ru
25. before the directive command e Always be sure to insert a colon after the label name Precaution Fixed point numbers can only be written in the operand of the directive command FIXED Use numerals 0 9 and the English alphabet E or e to write a fixed point number Description example FIXED 1 234 constant FIXED 1 0E 2 Stores a floating point number data in ROM in 4 byte length Function e This command stores 4 byte long fixed data in ROM e Label can be defined at the address where data is stored Description format FLOAT numeric value name FLOAT numeric value Rules for writing command e Write a floating point number in the operand e Refer to Rules for writing operand for details on how to write a floating point number in the operand Always be sure to insert space or tab between the directive command and the operand e When defining a label be sure to write the label name before the directive command e Always be sure to insert a colon after the label name Description example FLOAT 5E2 constant FLOAT 5e2 Specifies number of columns and lines in 1 page of list file Function e This command specifies the number of lines per page of the assembler list file in the range of 20 to 255 This command specifies the number of columns per page of the assembler list file in the range of 80 to 295 The contents specified by this directive command become effective beginning with the p
26. can be assembled file by file By allocating absolute addresses to a single file you can debug that part of program independently of all other parts You can also combine multiple source program files into a single debug file Optimized code generation function AS100 has a function to select the addressing mode and branch instruction that are most efficient in generating code for the source program Macro function AS100 has a macro function to improve a program s readability Source level debug information output in high level language AS100 outputs source level debuggable high level language information for programs developed in R32C 100 series s high level languages File generation Each program in AS100 generates a relocatable module file absolute module file error tag file list file and others IEEE 695 format file generating function The binary files generated by AS100 are output in IEEE 695 format Therefore AS100 can be shared with other R32C 100 series development tools using formats based on the IEEE 695 format IEEE Institute of Electrical and Electronics Engineers USA Outline of as100 functions eo Generates relocatable module files o Generates assembler list files Structure of as100 The name as100 represents a program to control these programs AS100 uses the assembler driver to control macro processor and assembler processor or programmable sound field processor Therefore macro processor assembler
27. cannot be output to a display screen or printer nor can it be edited Note that if you open or edit this file with an editor file processing in the subsequent stages will not be performed normally File name of relocatable module file The file name of the relocatable module file is created by changing the extension of the assembly source file a30 by default to r30 sample a30 gt sample r30 Directory for relocatable module file generated If you specified the directory with command option O the relocatable module file is generated in that directory If no directory is specified the relocatable module file is generated in the directory where the assembly source file resides 28 Assembler List File Only when you specified command option L or LM as100 generates source line information and relocatable information as a file in text format that can be output to a display screen or printer Format of assembler list file The information listed below is output to an assembler list file The output format of this assembler list file is shown in Example of Assembler List File 1 1 List line information SEQ Outputs the line numbers of the assembler list 2 Location information LOC Outputs the location addresses of a range of object code that can be determined when assembling 3 Object code information OBJ Outputs the object code corresponding to mnemonics 4 Line information OXMSDA Outputs informatio
28. character Enter a blank character between the instruction and operand Not enough memory Memory is insufficient Divide the file and re run Or increase the memory capacity Operand expression is not completed The operand description is not complete Check the syntax for this operand and rewrite it correctly Operand number is not enough The number of operands is insufficient Check the syntax for these operands and rewrite them correctly Operand size is not appropriate The operand size is incorrect Check the syntax for this operand and rewrite it correctly Operand type is not appropriate The operand type is incorrect Check the syntax for this operand and rewrite it correctly 59 Operand value is not defined An undefined operand value is entered Write a valid value for operands Option xx is not appropriate Command option xx is written incorrectly Specify the command option correctly again Questionable syntax The structured description command is written incorrectly Check the syntax and write the command correctly again Quote is missing Quotes for a character string are not entered Enclose a character string with quotes as you write it Reserved word is missing No reserved word is entered Write a reserved word SB FB A1 A0 SP or A1 AO Reserved word is used as label or symbol Reserved word is used as a label or symbol Rewrite the la
29. character string with single quotations or double quotations as you write it Which character string is larger or smaller than the other is resolved by the value of character code ABC lt CBA gt 414243 lt 434241 therefore condition is true C lt A gt 43 lt 41 therefore condition is false e Space or tab can be written before or after the relational operator e A conditional expression can be written in the operands of directive commands IF and 164 ELIF Description example of conditional expression Description example 165 Reads file into specified position Function e This command reads the content of a specified file into a line of the source program e With either an absolute path given to the name of a file to include AS100 searches the given directory for the file If the file is not found an error occurs e With an absolute path given to the name of a file to include AS100 searches the given directory for the file If the file is not found an error occurs e With no an absolute path given to the name of a file to include AS100 searches for the file in the sequence given below gt In an instance in which no directory is designated for the file name designated in the command line at the time of starting up AS100 AS100 searches for a file name designated by the inclusion directing instruction In an instance in which a directory is designated for a file name designated
30. command SJMP to control code generation so that short jump instructions will not be generated at such a position Local function xxx is never used The local function xxx is not used once Check to see if it is a necessary function Object format version mismatch in file file The version information in the relocatable file or library file file does not match the version information Check to see that the relocatable file or library file is one that was generated by the AS100 program Regenerate the file as necessary If this error occurs please contact tool support personnel Section type mismatch section Sections of the same name section have different section types Check the section types in the source file The free area s address in vector table isn t specified The free area s address in vector table isn t specified Check the free area in vector table 89 This section explains how to operate Imc100 The primary function of Imc100 is to generate a machine language file in the Motorola S format from the absolute module files generated by 1n100 Command Parameters The table below lists the command parameters available for Imc100 Parameter name Function File name Absolute module file name to be processed by Imc100 Disables message output to screen A Specifies an address range of output data E Sets the starting address F Se
31. definition line This line is where macros are defined 46 mac5 MACRO pi 47 D MREPEAT LEN p1 48 D BYTE SUBSTR p1 MACREP 1 49 D ENDR 50 D ENDM e Label definition line This line is where only label name are described 70 0000000 samp_start e Mnemonic statement line This line is where mnemonics of the M16C Family are described 71 00000000 442D0000 BCLR flag 72 00000002 444D0000 BCLR flag2 e Condition assemble information line Indicates the line that was condition assembled This information is output only when you specified command option LI LMI or LMSI 74 AF MODE 1 75 X MOV B sym1 ROL 30 76 ELIF MODE 2 77 Xx MOV B sym2 ROL 78 ELSE 79 00000004 10 Z MOV B 0 ROL 80 ENDIF e Macro call line This line is where a macro is called If you specified command option LM this line outputs assembly source lines derived as a result of macro expansion 173 mac5 ABCD e Include file indication line This line is where the read in include file is indicated 65 INCLUDE sample inc 66 1 SECTION ram DATA 67 00000000 00000008H 1 work8 BLKD 1 68 00000008 00000004H 1 work_4 BLKF 1 69 1 SECTION constdata ROMDATA 70 00000000 30313233 1 num_val BYTE 0123456789 34353637 1 3839 e Assemble result information Outputs a total number of errors total number of warnings and a total number of list lines derived as a result of assemble processing Information List TOTAL ERROR S 00000 T
32. e An error results if the start address and the end address values are the same Description example gt Imc100 F FF sample Data 00H is output to a free area within the specified address range starting from 1000H and ending with 11FFH gt Imc100 A 1000 11FF F 00 1000 10FF sample Data OOH is output to a free area from address 1000H to address 10FFH within the specified address range starting from 1000H and ending with 11FFH gt Imc100 F 00 1000 11FF sample Data OOH is output to a free area from address 1000H to address 11FFH If the data area registered in the absolute module file sample does not exist within addresses 1000H through 11FFH the data registered in sample and data 00H are output to addresses 1000H through 11FFH gt Imc100 F 00 1000 sample Data 00H is output to a free area in an address range starting from 1000H and ending with the last data address registered in the absolute module file sample An error results 1f the last data address registered in the absolute module file sample is smaller than 1000H 93 Converts File into Intel HEX Format Function e The Imc100 generates an Intel HEX format file e The Imci00 generates an Original HEX format for microcomputers if the address value exceeds 1Mbytes Precaution If Maskfile Converter MM is used this option cannot be specified Description rule e Specify this option before entering a file name e This option cannot be spe
33. enter the ORDER option at the beginning of each new line e The maximum number of characters that can be written on one line in the file is 2048 characters If this limit is exceeded In100 outputs an error e Comments can be written in a command file When writing comments be sure to enter the symbol at the beginning of each comment Characters from to Carriage Return or Line Feed are handled as comments Example of command file description sample1 sample2 sample3 ORDER ram 80 ORDER prog sub datasub and data M In100 Command Options The following pages describe rules you need to follow when specifying command options 67 Disables Message Output to Screen Function e The software does not output messages when In100 is processing e Error messages are output to screen Description rule e This option can be specified at any position on the command line Description example gt In100 sample1 sample2 Specifies Start Address of Program Function e This option sets the entry address of an absolute object module This address is used to indicate the start address to the debugger e Numeric values or label names can be used to specify an address value However local label names cannot be specified Description rule e Input this option using a form like E numeric value or label name e Always be sure to insert a space between this option and the numeric value or label name e Always be sur
34. hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Re
35. in the command line at the time of starting up AS100 AS100 searches for a file name resulting from adding a directory name specified in the command line to a file name specified by the inclusion directing instruction gt AS100 searches the directory designated by the command option l gt AS100 searches the directory set in the environment variable INC100 Description format INCLUDE file name Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e Always be sure to write a file extension in the operand file name Acharacter string that includes directive command FILE or can be written Nesting level of include files is within 9 Precaution Do not specify INCLUDE the file itself within the include file Description example INCLUDE initial a30 Provisionally defines a section name Function e Provisionally defines a section name e This is a C language startup only directive command Precaution This directive command is generated by the C language startup initsct c initialization function and is usable in only a compiler Description format INITSCT section name section type align INITSCT section name section type noalign Rules for writing command e Be sure to put a space or a tab between this directive instruction and the operand Be sure to put a comma between the section name and the section type Be sure to put a comma between th
36. in which LP can be set to 1 2 IIR and MAC instructions Precaution This directive command can only be written when the option PSFP is specified Description format LBBA numeric value Rules for writing command Always be sure to insert space or tab between the directive command and the operand e Only the value that is determined when assembled can be defined in the operand e An integer in the range of 0 to O1FFFH can be written in the operand e Asymbol can be written in the operand Precaution No symbol names that are forward referenced can be written in the operand Description example LBBA 1000h LDR 1000h LBBA LDA 1000h 0 1200h 1 Relative address 1200H 1000H 200H is set in DA Indicates length of specified character string Function e This command indicates the length of the character string that is written in the operand Description format LEN character string LEN character string Rules for writing command e Always be sure to enclose the operand with e Space or tab can be written between this directive command and the operand e The 7 bit ASCII code characters including a space and tab can used to write a character string Precaution Kanji and other 8 bit code are not processed correctly However the as100 assembler does not output errors e Always be sure to enclose the character string with quotations as you write it Precaution If you want a macro parameter to be exp
37. include file name Check the directory where the include file is stored Can t read file filename The filename file cannot be read Check the permission of the file Can t use directive commands INXxx The INXxx directive command cannot be used Check the command option Can t use directive commands INXLx or INXBx The INXLx or INXBx directive command cannot be used Check the command option Can t use directive commands INXR x or INXBx The INXRx or INXBx directive command cannot be used Check the command option Can t use directive commands INXBx The INXBx directive command cannot be used Check the command option Can t write ASSERT message file xxxx Data cannot be written to the ASSERT output file Check the permission of the file gt 56 Can t write in file filename Data cannot be written to the filename file Check the permission of the file CASE not inside SWITCH CASE is written outside a SWITCH statement Make sure the CASE statement is written within a SWITCH statement Characters exist in expression Extra characters are written in an instruction or expression Check the rules to be followed when writing an expression Command line is too long The command line has too many characters Re input the command DEFAULT not inside SWITCH DEFAULT is written outside a SWITCH statem
38. military use When exporting the products or technology described herein you should follow the applicable export control laws and regulations and procedures required by such laws and regulations 4 All information included in this document such as product data diagrams charts programs algorithms and application circuit examples is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas products listed in this document please confirm the latest product information with a Renesas sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website http www renesas com 5 Renesas has used reasonable care in compiling the information included in this document but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document 6 When using or otherwise relying on the information in this document you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application Renesas makes no representations warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of th
39. now TOTAL ERROR S 00000 gt as100 C N L T sample e If this command option is combined with an option to disable message output to a screen the following output will be obtained gt as100 C L T sample mac100 exe L T rREV F sample a30 asp100 exe ALIGN4 L T sample m30 46 Sets Symbol Constant Function e The software sets values to symbols e The value is handled as an absolute value Precaution The symbols defined by this option are processed in the same way as those symbols that are defined in the start positions of the source program However these symbols are not output to an assembler list file e The symbols defined by this option are handled in the same way as the symbol definitions described in the assembly source file Namely if a symbol definition of the same name is described in the assembly source file it means that the symbol is redefined at that description position e f multiple files are specified on the command line the symbols defined by this option are handled as being defined in all of these files Description rule Specify this option in the form of D symbol name numeric value This option can be specified at any position on the command line Do not enter a space or tab between the command option and the symbol name Values can be defined to multiple symbols When defining values to multiple symbols separate each symbol with the colon while you enter them in a form l
40. of this directive command in one assembly source file Precaution The as100 assembler does not detect errors in the subsequent lines after this directive command either Description example END Indicates the end of a conditional assemble block Function e This command indicates the end of the conditional assemble block Description format AF conditional expression body ENDIF Rules for writing command e Always make sure that there is at least one instance of this directive command in a conditional assemble block e This directive command does not have an operand Description example AF TYPE 0 byte Proto Type Mode ELIF TYPE gt 0 byte Mass Production Mode ELSE byte Debug Mode ENDIF Indicates end of macro body Function e This command indicates that the body of one macro definition is terminated here Rules for writing command e Always make sure that this command corresponds to directive command MACRO as you write it Description format macro name MACRO body ENDM Description example Ida MACRO value MOV W fivalue A0 ENDM ida 0 MOV W 0 A0 Indicates end of repeat macro body Function e This command indicates the end of a repeat macro Description format label MREPEAT numeric value body ENDR Rules for writing command e Always make sure that this command corresponds to directive command MREPEAT as you write it Description example rep MACRO n
41. option e When you specify a command option always be sure to insert a space or tab between the command option and other specifications on the command line Address specification e The Ini00 editor determines absolute addresses section by section as it generates an absolute module file e When invoking In100 you can specify the start address of a section from the command line e Use hexadecimal notation when specifying address values If an address value begins with an alphabet add 0 to the value as you specify it Example 7ift 64 0a57 66 Command File The In100 editor allows you to write command parameters in a file and execute the program after reading in this file Method for specifying command file name e Add at the beginning of the command file name as you specify it Example gt In100 cmdfile e Adirectory path can be specified in the command file name e If no file exists in the specified directory path In100 outputs an error Rules for writing command file The following explains the rules you need to follow when writing a command file to ensure that it can be processed by 1n100 e The name of the command file s own cannot be written in the command file e Multiple lines of command parameters can be written in a command file e The comma cannot be entered at the beginning and end of lines written in a command file e f you want to write specification for section allocation in multiple lines be sure to
42. option xx Set the environment variable correctly back again The options that can be set in environment variables are L N S and T Invalid reserved word exist in operand 2 The operand contains a reserved word Reserved words cannot be written in an operand Rewrite the operand correctly Invalid symbol definition An invalid symbol is entered Rewrite the symbol definition Invalid option xx is used An invalid command option xx is used The specified option is nonexistent Re input the command correctly Location counter exceed OFFFFFFFFH The location counter exceeded OFFFFFFFFh Check the operand value of ORG Rewrite the source correctly NEXT not associates with FOR No corresponding FOR is found for NEXT Check the source description No ENDIF statement No corresponding ENDIF is found for the IF statement in the source file Check the source description No ENDS statement No corresponding ENDS is found for the SWITCH statement in the source file Check the source description No NEXT statement No corresponding NEXT is found for the FOR statement in the source file Check the source description No WHILE statement 4 No corresponding WHILE is found for the DO statement in the source file Check the source description 58 o END statement END is not entered Be sure to enter END in the last line of the source program o ENDIF statement
43. or tab can be inserted before and after gt or gt gt e Directive command FILE can be written in the file name Description example ASSERT string gt sample dat Message is output to file sample dat ASSERT string gt gt sample dat Message is added to file sample dat ASSERT string gt FILE Message is output to a file bearing the same name as the currently processed file except the extension Allocates RAM area in units of 3 bytes Function e This command allocates a specified bytes of RAM area in units of 3 bytes e Label name can be defined at the allocated RAM address Description format BLKA numeric value name BLKA numeric value Rules for writing command e This directive command must always be written in a DATA type section Section types can be made the DATA type simply by writing DATA following the section name when you define a section Always be sure to insert space or tab between the directive command and the operand Write an integral value in the operand A symbol can be written in the operand An expression can be written in the operand The expression in the operand must have its values determined when assembling the source program e When defining a label name in the allocated area be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example symbol EQU 1 SECTIONarea DATA work1
44. parameter symbol is undefined The symbol symbol specified in VECTN is undefined Check the symbol name CODE section section 1 is overlapped on the section 2 The CODE sections section 1 and section 2 are overlapping Relocate the sections so that they will not overlap ROMDATA section section 1 is overlapped on the section 2 The ROMDATA sections section 1 and section 2 are overlapping Relocate the sections so that they will not overlap section is written after the same name of relocatable section A relative attribute section is followed by an absolute attribute section of the same name section Make sure that relative attribute is located after absolute attribute symbol is multiple defined The symbol symbol is defined twice or more Check external symbol names symbol value is undefined The value of the symbol symbol is not defined yet The program will be processed assuming values 0 Check the symbol values Absolute section section is relocated Absolute section section is going to be relocated Correct the section locating specification Address is overlapped in CODE section section Addresses are overlapping in a CODE section named section Relocate the section so that its addresses will not overlap Address is overlapped in ROMDATA section section Addresses are overlapping in a ROMDATA section named section Reloc
45. processor and programmable sound field processor cannot be invoked directly from your command line Outline of macro processor functions e This program processes macro directive commands written in the source file The processed file is available in a file format that can be processed by assembler processor Outline of assembler processor functions e This program converts the assembly languages written in the source file and those that derive from processing by macro processor into a relocatable module file Outline of programmable sound field processor functions This program converts the assembly languages for the programmable sound field processor written in the source file and those that derive from processing by macro processor into a relocatable module file Outline Processing by as100 e After interpreting the input command lines as100 activates each program of macro processor and assembler processor or programmable sound field processor e as100 controls the command options added when each program starts up and the file names to be processed e Each program is started up sequentially in the following order 10 Normal 1 Macro processor 2 Assembler processor PSFP option is specified 1 Macro processor 2 Programmable sound field processor Outline of In100 functions e Generates an absolute module file e Generates an map file e Assigns sections e Utilizes relocatable modules in library file Outline of
46. register value Function e This command assigns a provisional SB register value e When assembling the source program the assembler assumes that the SB register value is one that is defined by this directive command as it generates code for the subsequent source lines e SB relative addressing mode can be specified in the subsequent lines The assembler generates code in SB relative addressing mode for the mnemonics that use labels defined by directive command SBSYM or SBSYM16 Description format SB numeric value Rules for writing command Always be sure to insert space or tab between the directive command and the operand e Always make sure that this command is written in the assembly source file e Always be sure to write this command before you use the SB relative addressing mode e AN integer in the range of 0 to OFFFFFFFFH can be written in the operand Precaution This directive command only directs the assembler to take on a provisional SB register value and cannot be used to set a value to the actual SB register To set an SB register value actually write the following instruction immediately before or after this directive command Example LDC 80H SB e Asymbol can be written in the operand Description example SB 80H LDC 80 SB Selects SB relative addressing mode for bit symbol Function e The 16 bit SB relative addressing mode is selected by specifying a bit symbol of undefined value for the operan
47. section sizes whether or not sections are aligned and module names relocatable module file names SECTION LOC or LOCR This information includes the section information relocated by command option LOC LOCR Variable vector table information This information includes variable vector table 3 Global label information This information includes global label names and addresses This information is output only when you specify command option MS MSL 4 Global symbol information This information includes global symbol names and numeric values This information is output only when you specify command option MS MSL 5 Global bit symbol information This information includes global bit symbol names bit positions and memory addresses This information is output only when you specify command option MS MSL 6 Local label information This information includes module names relocatable module file names local label names and addresses This information is output only when you specify command option MS MSL 7 Local symbol information This information includes module names relocatable module file names local symbol names and numeric values This information is output only when you specify command option MS MSL 8 Local bit symbol information This information includes module names relocatable module file names local bit symbol names bit positions and memory addresses This information is output only when
48. so that Renesas products may not be easily detached from your products Renesas shall have no liability for damages arising out of such detachment 12 This document may not be reproduced or duplicated in any form in whole or in part without prior written approval from Renesas 13 Please contact a Renesas sales office if you have any questions regarding the information contained in this document Renesas semiconductor products or if you have any other inquiries For inquiries about the contents of this document or product fill in the text file the installer generates in the following directory and email to your local distributor SUPPORT Product name SUPPORT TXT Renesas Tools Homepage http www renesas com tools O Microsoft MS DOS Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries e BM and AT are registered trademarks of International Business Machines Corporation Intel and Pentium are registered trademarks of Intel Corporation e Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated O Netscape and Netscape Navigator are registered trademarks of Netscape Communications Corporation in the U S and other countries All other brand and product names are trademarks registered trademarks or service marks of their respective holders ASTON Contents ua cedida 4 Specifications OF AS DO E N 8 Character edi ia 8 Outhne o
49. that value no right side of operator is equal to or greater than value on left side This operator can only be written in operand of directive commands IF and ELIF Evaluates that value on left side and right side of operator are equal This operator can only be written in operand of directive commands IF and ELIF Evaluates that value on left side and right side of operator are not equal This operator can only be written in operand of directive commands IF and ELIF Operators to priorities operation Operator Function Operation enclosed with is performed first before any other operation If one expression contains multiple parentheses leftmost pair is given priority Parenthezed operations can be nested Operation Priority in Expression The as100 assembler follows the order of priority shown below as it performs arithmetic operation on the expression written in an operand and handles the value resulting from this operation as an operand value 1 Operation is performed in order of operator priorities highest priority first Operator priorities are listed in the table below The smaller the value shown in this table the greater the priority 2 Operators of the same priority are operated on sequentially beginning from the left side 3 The priority of operation can be changed by enclosing a given operator with parentheses Priority Type Operator
50. the macro defined macro body is expanded into the line from which the macro is called e Actual parameters corresponding to macro defined formal parameters can be written Example of source program After expansion Macro definition SECTION program SECTION rogram main Prog main mac _____ Macro call Ex anded macro END Body p END position Repeat Macro Function The macro body enclosed between directive commands MREPEAT and ENDR is expanded repeatedly into places after the specified line a specified number of times Repeat macros are expanded into the defined line Labels can be written in repeat macro definition lines Precautions This label is nota macro name There is no macro call available for repeat macros 22 Conditional Assemble Control The as100 assembler allows you to specify whether or not you want a specified range of lines to be assembled by using conditional assemble directive commands Configuration of Conditional Assemble Block The diagram below shows the configuration of a conditional assemble block Conditional assemble block can be written ELIF CE 7 i Conditional assemble Conditional Body block can be written assemble Can be omitted block IN Can be written for i i multiple instances Conditional assemble block can be written Can be omitted CE Conditional expression Executing Conditional Assemble The following shows examples of how condi
51. this case locations in error are output with the assembly source lines Format of link error tag file This file is output in the same format as an assembler error tag file An editor s tag jump function 34 can be used The link error tag file is output in order of the assembly source file name error line number and error message as shown below smp inc 2 Warning In100 smp2 r30 Absolute section is written after the absolute section ppp smp inc 2 Error In100 smp2 r30 Address is overlapped in CODE section ppp File name of link error tag file The file name of the link error tag file is created by changing the extension x30 of the absolute module file into Itg sample x30 gt sample ltg Directory for link error tag file generated The link error tag file is generated in the directory where the absolute module file resides Motorola S Format The Imc100 generates a Motorola S format file that can be programmed into EPROM The following can be specified when generating a Motorola S format file e Adata area at addresses from OH to OFFFFFFFFH can be set e Set the length of one data record to 16 bytes or 32 bytes e set the start address of a program e Imc100 generates a file in which addresses are arranged in ascending order File name of Motorola S file The file name of the Motorola S file is created by changing the extension x30 of the absolute module file into mot sample x30 gt samp
52. 0 5e 20 5 010 120 Expression An expression consisting of a combination of numeric value name and operator can be entered e A space or tab can be inserted between the operator and numeric value e Multiple operators can be used in combination e When writing an expression as a symbol value make sure that the value of the expression will be a valid value when your program is assembled e The range of values that derive from an expression as a result of operation is 2147483648 to 2147483648 Precautions Even if the operation results in exceeding the range of 2147483648 to 2147483648 the assembler does not care whether it is an overflow or underflow Floating point numbers cannot be written in an expression Character constants cannot be used in any terms of an expression Operators The table below lists the operators that can be written in as100 s source programs Precautions When writing operators SIZEOF and TOPOF always be sure to insert a space or tab between the operator and operand Relational operators can only be written in the operand of directive commands IF and ELIF Unary operators Operator Function Handles value that follows as a ositive value Handles value that follows as a negative value e Logically NOT s value that follows SIZEOF Handles section size bytes specified in operand as value TOPOF Handles start address of section specified in operand as a
53. 003 file1 REL CODE FFE00008 0000003 file3 subroutine ABS CODE FFE10000 0000003 file1 REL CODE FFE10003 0000002 file2 Label and symbol The as100 assembler determines the values of labels and symbols defined in the absolute attribute section These values are not modified even when linking Furthermore the label and symbol information of the following conditions are output as relocatable information Global label and global symbol Information on global labels and global symbols are output to relocatable information Local label and local symbol Information on local labels and local symbols are output to relocatable information providing that they are defined in the relative attribute section However if command options S and SM are specified when assembling information on all local labels and local symbols are output to a relocatable file 15 Management of Label and Symbol Addresses This section describes how the label symbol and bit symbol values are managed by AS100 AS100 divides the label symbol and bit symbol values into global local relocatable and absolute as 1t handles them The following explains the definition of each type Global e The labels and symbols specified with directive command GLB are made the global labels and global symbols respectively e The bit symbols specified with directive command BTGLB are made the global bit symbols e The names defined in a file if specified to be global are m
54. Absolute section is written after the absolute section section The absolute attribute section section is followed by an absolute attribute of the same name The source program may be allocated at noncontinued addresses Linkage will be executed Check the address specification of the source program Absolute section is written before the absolute section section The absolute attribute is concatenated before the absolute attribute section section Concatenation will be executed Check address specification in the source program Address information mismatch in file file The address information in the relocatable file file does not match the addresses information Check to see that the relocatable file is one that was generated by as100 Address is overlapped in the same DATA section section Addresses are overlapping in the DATA sections of the same name section The sections are located overlapping one another Check to see if the sections can be located at overlapping addresses Directive command ID is duplicated ID is specified more than once in the file ID can be written only once in a file Delete extra ID s Global function xxx is never used The global function xxx is not used once Check to see 1f it is a necessary function JMP S instruction exist at end of bankladdress xxxxx The jump address of a short jump instruction overlaps a bank boundary Use the directive
55. BLKA 1 work2 BLKA symbol BLKA symbol 1 Allocates RAM area in units of 1 bytes Function e This command allocates a specified bytes of RAM area in units of 1 byte e Label name can be defined at the allocated RAM address Description format BLKB numeric value name BLKB numeric value Rules for writing command e This directive command must always be written in a DATA type section Section types can be made the DATA type simply by writing DATA following the section name when you define a section Always be sure to insert space or tab between the directive command and the operand Write an integral value in the operand A symbol can be written in the operand An expression can be written in the operand The expression in the operand must have its values determined when assembling the source program e When defining a label name in the allocated area be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example symbol EQU 1 SECTION area DATA work1 BLKB 1 work2 BLKB symbol BLKB symbol 1 Allocates RAM area in units of 8 bytes Function e This command allocates a specified bytes of RAM area in units of 8 bytes e Label name can be defined at the allocated RAM address Description format BLKD numeric value name BLKD numeric value Rules for writing command e This directive command must always b
56. D da Temporary label Function e This command defines a temporary label e The assembler references a temporary label that is defined immediately before or after an instruction Precaution The labels that can be referenced are only the label defined before or after an instruction e Atemporary file can be defined and referenced within the same file e Up to 65 535 temporary files can be defined in a file In this case if INCLUDE is written in the file the maximum number of temporary files you can enter 65 535 includes those in the include file e The temporary labels generated by the assembler are output to a list file e The temporary labels are changed into tl0001 tI0002 and tIFFFF Description format 2 mnemonic 2 mnemonic Rules for writing command e Write in the line where you want it to be defined as a temporary label e f you want to reference a temporary label that is defined immediately before an instruction write in the instruction operand e f you want to reference a temporary label that is defined immediately after an instruction write 2 in the instruction operand Description example 9 JMP 24 JMP 2 te JMP 2 Denotes a temporary label indicated by the arrow a JMP J me A JMP Concatenates character strings Function e This command concatenates macro arguments macro variables reserved symbols expanded file name of directive
57. Description example DOUBLE 5E2 constant DOUBLE 5e2 Defines the end of a Function in inspector information Function e Defines the end of a function Subroutine in inspector information e Defines the extent from INSF to the end of a function subroutine as a single function subroutine Description format EINSF Description rules In using this directive instruction be sure to use the directive instruction INSF e This directive instruction is for exclusive use with the assembly language Using this directive instruction in the asm function in NC 100 results in an error e This directive instruction turns effective when the command option finfo has been chosen Description example INSF glbfunc G 0 EINSF Resolves the second and the following conditions Function e Use this command to write a condition in combination with IF if you want to specify multiple conditions for conditional assemble to be performed e The assembler resolves the condition written in the operand and if it is true assembles the body that follows e If condition is true lines are assembled up to and not including the line where directive command ELIF ELSE or ENDIF is written Description format AF conditional expression body ELIF conditional expression body ENDIF Rules for writing command e Always be sure to write a conditional expression in the operand of this directive command e Always be sure to inse
58. H The value of the label label exceeds OFFFFFFFFh Check the allocated addresses of sections section data exceed OFFFFFFFFH The section data exceeds address OF FFFFFFFH Check the allocated addresses of sections 10 bits unsigned value is out of range 0 1023 address address Relocation data calculation resulted in the address exceeding the range of 0 to 1 023 Overflow is discarded Check whether the value is all right 13 bits unsigned value is out of range 0 8191 address address Relocation data calculation resulted in the address exceeding the range of 0 to 8 191 Overflow is discarded Check whether the value is all right 16 bits signed value is out of range 32768 32767 address address Relocation data calculation resulted in the address exceeding the range of 32 768 to 32 767 Overflow is discarded Check whether the value is all right 16 bits unsigned value is out of range 0 65535 address address Relocation data calculation resulted in the address exceeding the range of 0 to 65 535 Overflow is discarded Check whether the value is all right 16 bits value is out of range 32768 65535 address address Relocation data calculation resulted in the address exceeding the range of 32 768 to 65 535 Overflow is discarded Check whether the value is all right 24 bits signed value is out of range 8388608 8388607 address address Relocation data calculation resul
59. I HO ROI OFF HO RO message Declares local label in macro Function e This command declares that the label written in the operand is a macro local label e Macro local labels are allowed to be written for multiple instances with the same name providing that they differently macro defined or they are written outside macro definition Precaution If macro definitions are nested macro local labels in the macro that is defined within macro definition are not allowed to be used in the same name again Description format LOCAL label name label name Rules for writing command e Always make sure that this directive command is written within the macro body e Always be sure to insert space or tab between this directive command and the operand e Make sure that macro local label declaration by this directive command is entered before you define the label name e To write a macro local label name follow the rules for writing name in Section 1 Rules for Writing Program e Multiple labels can be written in the operand of this directive command providing that they are separated with a comma In this case up to 100 labels can be entered Precaution The maximum number of macro local labels that can be written in one assembly source file including the contents of include files is 65 535 Description example name MACRO LOCAL m1 m1 is the macro local label mi NOP JMP mi ENDM Stores data in ROM in 4 b
60. Not enough memory Memory capacity is insufficient Increase the memory capacity Section information is not appropriate in filename The section information in filename is incorrect Check the file name Warning Messages of abs100 Address area exceed OFFFFFFFFH The address range exceeds OFFFFFFFFh Check the absolute module file name File l filename is missing corresponding to module in a filename The file l filename corresponding to the module in a filename cannot be found The absolute list file for this module was not created Regenerate the assembler list file Check the directory where the assembler list file resides Lines num num are relocatable address in filename The lines num num in filename not converted to absolute addresses Check to see if the directive command LIST OFF is written in the assembly source file No information of l filename in a filename The file a filename does not contain information on I filename Check the file name No section information of l name in x name x name doesn t have the section information of l name Absolute list file can t be generated from l name Overwrite in filename 2 The file filename will be overwritten The contents of the old file are not saved anywhere This section describes the basic rules you need to follow when writing a source program that can be assembled by AS100 Precautions on Writing Pr
61. OS GORD acd AS OLAS POE OEE PONE Tea ag ees eb ae oe 160 TOR Mia E A talents ative a ala 161 ETA S A A A E Ms hotels Aes Pe Aa E to iz 162 A AE AA TT 163 O O AT NN 164 INCEUDE custodia tad 166 INTO it ii A A A A AAA it 167 INSP a cea Yas Sas a DSL ee OTS a Salsa a a ede dD ad Meee Dede OEE AI Sc N bas bea 8 168 INSTRE it steer ecstasl iat haa cbtstid A ASA cele tec EEEE EAN E ENEA EA 169 TIN XSGKE as ot arta iobs a oo dc Sy ira 170 VA A A RRA EE PRESETS TS 171 TENA A A RA a ais 172 HIS Eeee ea a E a a e Eaa Aa aaa ee shes dir 173 FOCA Liari nesini a a EEEN IE DIA EAE 174 DWORD oct EA A E R A E EA 175 MACRO E E IIE EE E EEA AEE P EA EE 176 MREPRA Pista a ala N Ta 178 A A O A NO NIN 179 ORGA A Ad IE E ESO LaS ds 180 PAGE ciutat italia 182 RVECTOR riiin A A A TE RG aisle eases 183 E EN AS 184 BB DT A E PTE ia 185 DBS Mit NI od aa add 186 A A A E RE PPT Re AER CES 187 SECTIONS a de E tee a os ici 188 TK A AE A E A E 189 SUBS LR init A Aa A E deco oe 190 VER La atte Elder ad ata clinic 191 WORD cta O ED AU OA A iaa 192 A O 193 O AN 194 AS100 has been designed based on the following specifications Make sure AS100 in your system is used within the range of this specification Item Specification Number of files opened simultaneously Maximum 9 files Number of characters that can be set in environment 2048 bytes characters variables Number of characters per line of source file 512 bytes characters Number of macr
62. OTAL WARNING S 00000 TOTAL LINE S 00181 LINES e Section information Lists the section types section sizes and section names Section List Attr Size Name DATA 00000006 000006H rami CODE 00000066 000042H prog1 File name of assembler list file The file name of the assembler list file is created by changing the extension of the assembly source file a30 by default to 1st sample a30 gt sample 1st Directory for assembler list file generated If you specified the directory with command option O the assembler list file is generated in that directory If no directory is specified the assembler list file is generated in the directory where the assembly source file resides 31 Assembler Error Tag File Only when you specified command options T and X as100 outputs to a file the errors that were encountered when assembling the assembly source file Format of assembler error tag file The assembler error tag file is output in a format that allows you to use an editor s tag jump function This file is output in order of the assembly source file name error line number and error message as shown below sample err 21 Error asp100 Operand value is not defined sample err 72 Error asp100 Undefined symbol exist work2 File name of assembler error tag file The file name of the assembler error tag file is created by changing the extension of the assembly source file a30 by default to atg sample a30 g
63. TINUE is used in an inappropriate location Make sure the CONTINUE command is written within the FOR or DO statement DEFAULT has already defined There are multiple instances of DEFAULT in SWITCH Remove unnecessary DEFAULT statements JMP S operand label is not in the same section Jump address for JMP S is not specified in the same section JMP S can only branch to a jump address within the same section Rewrite the mnemonic is missing is not entered Write the right bracket corresponding to the I Addressing mode specifier is not appropriate The addressing mode specifier is written incorrectly Make sure that the addressing mode is written correctly Bit symbol is in expression 2 A bit symbol is entered in an expression Bit symbols cannot be written in an expression Check the symbol name Can t create Temporary file Temporary file cannot be generated Specify a directory in environment variable TMP100 so that a temporary file will be created in some place other than the current directory Can t create file filename The filename file cannot be generated Check the directory capacity Can t open ASSERT message file xxxx The ASSERT output file cannot be opened Check the file name Can t open file filename The filename file cannot be opened Check the file name Can t open include file xxxx The include file cannot be opened Check the
64. The sections prog and prog3 are relocated in that order immediately following the section prog The specification method 3 LOCR main prog1 prog2 prog3 The sections prog1 prog and prog are relocated in that order immediately following the section main 73 This description example shows a case where sections located in order of prog1 prog2 and prog3 beginning with the address OFFEOOOOOH are executed after being transferred to the address 00010000H for prog2 and the address 00012000H for prog3 respectively In this case specification in In100 is written as shown below gt In100 ORDER prog2 010000 prog3 012000 prog1 0FFE00000 LOCR prog1 prog2 prog3 Execution address ORDER prog2 prog3 00010000H 00012000H FFE00000H Storing address LOCR 74 Generates Map File Function e The software generates a map file that contains address mapping information The file name of the map file is created by changing the extension of the absolute module file to map Description rule e This option can be specified at any position on the command line Description example e Files sample1 x30 and sample1 map are generated gt In100 M sample1 sample2 Outputs Symbol Information to Map File Function The software generates a map file that contains address mapping information The full name of symbol more than 16 characters are output to mapfile whe
65. The software generates a link error tag file when a link error occurs e This file is output in a format that allows you to use an editor s tag jump function e Even when you specify this option this error file will not be generated if no error is encountered e The error tag file name is created from the relocatable module file that is specified at the beginning of the command line by changing its extension to Itg If an absolute module file name is specified with command option O the tag file name is derived from the specified file name by changing its extension to Itg e Error information in the link error tag file is output with the number of assembly source lines Description rule e This option can be specified at any position on the command line Description example A sample1 ttg file is generated if an error occurs gt In100 sample1 sample2 T 80 Outputs a warning for the unused function names Function e Outputs a warning for the unused function names that are written in the C language source file Precaution 1 Before deleting the unused functions check to see that they really are unnecessary functions 2 This option is effective when the finfo option of NC100 and AS100 is specified 3 When calling any assembler function from a C language program always be sure to write the assembler directive INSF and EINSF for the assembler function 4 If any interrupt function is written wit
66. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry ENESAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted
67. abel name e A space or tab can be inserted between the label name and the mnemonic e When writing a comment in the assembly source line insert a semicolon after the mnemonic and operand and write your comment in columns following the semicolon e Comments are output to an assembler list file Precaution The asi00 assembler does not generate code for the mnemonics or directive commands written in columns after the semicolon Therefore be careful with the position where you enter the semicolon If a semicolon is enclosed with double quotations or single quotation AS100 does not assume it to be the first character of a comment A space or tab can be inserted between a mnemonic s operand and a comment Description example MOV W_ 0 RO RTS main MOV W 0 A0 RTS End of subroutine Label definition line Function e Any desired name can be written in this line Rules for writing e Always be sure to enter the colon immediately after a label name Do not write anything between the label name and the colon Label names can be written starting immediately from the top of a line A space or tab can be inserted at the beginning of a line When writing a comment in the label definition line insert a semicolon after the directive command and operand and write your comment in columns following the semicolon e Comments are output to an assembler list file Precaution The as100 assembler does not genera
68. acter string Precaution Kanji and other 8 bit code are not processed correctly However the as100 assembler does not output errors Always be sure to enclose the character string with quotations as you write it Precaution If you want a macro argument to be expanded as a character string enclose the parameter name with single quotations as you write it Note that if you enclose a character string with double quotations the character string itself is expanded This directive command can be written as a term of an expression Description example top EQU 1 point_set MACRO source dest top point EQU INSTR source dest top ENDM point_set japanese se 1 point EQU 7 This example extracts the position 7 of the character string se from the beginning top of the specified character string japanese Generates an index instruction that modifies the addressing modes of the following instructions Function e Generates an index instruction that modifies the addressing modes of the following instructions Precaution This directive command is usable in only a C compiler and cannot be written in the assembler Description format INXLB src Modifies the src value in data size of byte to op1 INXLW_ src Modifies the src value in data size of word to op1 INXLL src Modifies the src value in data size of long word to op1 INXRB src Modifies the src value in data size of byte to op2 INXRW src Mod
69. ade referencible from an external file e The names not defined in a file if specified to be global are made the external reference labels symbols or bit symbols that reference the names defined in an external file e All names specified with neither directive command GLB nor BTGLB are made the local names e Local names can be referenced within the file in which they are defined e Local names can have the same label name used in other files Relocatable e The values of local labels symbols and bit symbols in a relative attribute section are made the relocatable values e The values of the externally referencible global labels symbols and bit symbols become relocatable values Absolute e The values of the local labels symbols and bit symbols defined in an absolute attribute section become absolute values The diagram below shows the relationship of labels explained above Converting Relocatable Values The In100 editor converts the relocatable values in the relocatable module file into absolute values in the following manner e Addresses determined after relocating sections are made the absolute address e Inthe following cases In100 outputs a warning If the determined actual address lies outside the range of branch instructions and addressing modes determined by as100 16 Library File Referencing Function If all of the following conditions are met In100 links relocatable modules entered in a library file
70. age next to one where the command is written However if this directive command is written in the first line of the assembly source file the specified contents become effective beginning with the first page e If this directive command is not specified the assembler list file is output with the number of lines 66 and the number of columns 200 Description format FORM number of lines number of columns FORM number of lines FORM number of columns Rules for writing command e This command can be written for multiple instances in one assembly source file e Asymbol can be used to describe the number of lines and the number of columns Symbols cannot be used that are forward referenced e An expression can be used to describe the number of lines and the number of columns e If you specify only the number of columns in the operand be sure to enter a comma immediately before the numeric value you write for the number of columns Description example FORM 20 80 FORM 60 FORM 100 FORM line culmn Specifies global label Function e This command declares that the labels and symbols specified with it are global e f any labels or symbols specified with this directive command are not defined within the file the assembler processes them assuming that they are defined in an external file e f the labels or symbols specified with this directive command are defined in the file the assembler processes them to be
71. agram below the section name PROG1 stored in the ROM at the address FE0000h is transferred to the RAM at the address 000400h before being executed in the RAM address 000400h In this case specification for In100 is written as shown below gt In100 ORDER PROG1 400 LOC PROG1 0FE0000 000400h PROG1 section is executed after moved it address OFEO000h 72 Specify the assignment of section Function e The data in a specified section is relocated at a specified address or in a specified order of placement e Value of symbols in specified section is generated from the address specified by directive command ORG or specified by command option ORDER e The addresses at which data are stored can be concatenated to the end of absolute addresses or a specific section e Multiple sections can be located at contiguous addresses e The information of specified section is outputted to mapfile generated by In100 as SECTION LOC or LOCR Precaution 1 Itis possible that the program relocated by specification of ALIGN will not operate normally Therefor when using the LOCR option relocate a section whose beginning address is even to an even address and one whose beginning address is odd to an odd address 2 If the start address of a section is specified by an absolute address the start address of the section and that of its relocated destination are checked for a match even or odd and if they do not match an err
72. ain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronic
73. ammed into EPROM The following can be specified when generating an Intel HEX format file e A data area at addresses from OH to OFFFFFFFFH can be set e Imc100 generates a file in which addresses are arranged in ascending order e Set the length of one data record to 16 bytes or 32 bytes File name of Intel HEX file The file name of the Intel HEX file is created by changing the extension x30 of the absolute module file into hex sample x30 gt sample hex Directory for Motorola S file generated The files are generated in the current directory Format of Intel HEX Shown below is the Intel HEX format gt XX XXXX XX XX KK XX XX fa fal ls 5 NOR 1 Start mark This mark indicates the start of a record 2 Code count The code count is indicated as a two digit hexadecimal code This value is half of the total number of characters in 5 3 Address offset This address indicates the address where the data is stored It is always indicated as a four digit hexadecimal code 4 Record type This indicates the type of record It is indicated as a two digit hexadecimal code 00 Data Record 01 End Record 02 Expansion segment Address Record 04 Expansion Linear Address Record 36 5 Data This indicates registered data One byte of data is indicated as a two digit hexadecimal code 6 Checksum This adds up everything from the code count to the data 2 to 5 as a hexadecimal number
74. anded as a character string enclose the macro name with single quotations as you write it If enclosed with double quotations the character string length of the formal parameter written in macro definition is assumed This directive command can be written as a term of an expression Description example bufset MACRO f1 f2 buffer f1 BLKB LEN f2 ENDM bufset 1 Printout_data bufset 2 Sample buffer BLKB 13 buffer2 BLKB 6 buf MACRO fi buffer BLKB LEN f1 ENDM buf 1 data data is not expanded buffer BLKB 2 Controls outputting of line data to list file Function e This command allows you to stop OFF outputting lines to the assembler list file e Lines in error are output to the list file regardless of whether they are within the list output disabled range e This command allows you to start ON outputting lines to the assembler list file e All lines are output to the list file if you do not specify this directive command Description format LIST ONJOFF Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e To stop outputting lines write OFF in the operand e To start outputting lines write ON in the operand Description example LIST ON LIST OFF Example of source file MOV B 0 ROL MOV B 0 ROL LIST OFF Example of assembler list file output MOV B MOV B LIST MOV B Line in error gt Error HO RO
75. arate the names with a comma as you write them Description example SB 400H SBSYM16 sym MOV B 0 sym Inthe following case the 16 bit SB relative addressing mode is not selected for sym2 SB 400H SBSYM16 sym1 sym2 EQU sym1 1 MOV B 0 sym2 Defines section name Function e This command defines a section name e This command defines the beginning of a section An interval from one section directive command to the next section directive command or directive command END is defined as one section e This command defines a section type e If ALIGN is specified the beginning address of the section is corrected by In100 to be 2 4 or 8 byte aligned Precaution If the assembler option PSFP is specified the beginning address is 8 byte aligned no matter what value is set e If ALIGN is specified the alignment correction value for a specified section can be altered e Directive command ALIGN can be written in a ALIGN specified relative attribute section or an absolute attribute section Description format SECTION section name SECTION section name section type SECTION section name section type ALIGN SECTION section name section type ALIGN 2 4 8 SECTION section name ALIGN SECTION section name ALIGN 2 4 8 Rules for writing command e Always be sure to write a section name when you define a section When you write an assembly directive command to allocate a memory area or
76. as100 assembler references the environment variables listed below Environment Variables Program BIN100 as100 INC100 as100 LIB100 In100 TMP100 as100 In100 lb100 BIN100 The assembler driver as100 invokes the macro processor and assembler processor residing in the directory you have set If this variable is set always make sure that macro processor and assembler processor are placed in the directory you have set Multiple directories can be specified If multiple directories are specified as100 searches the directories sequentially from left to right in the order they are written INC100 The assembler as100 retrieves include files written in the assembly source file from the directory set in INC100 Multiple directories can be specified If multiple directories are specified as100 searches the directories sequentially from left to right in the order they are written LIB100 The 1n100 retrieves library file to link from directory that is set in this environment variable Multiple directories can be specified If multiple directories are specified In100 searches the directories sequentially from left to right in the order they are written TMP100 Programs generate a work file necessary to process files in the directory that is set in this environment variable The work file normally is erased after as100 finishes its processing Example of setting environment variable Separate the directory names wi
77. ate code for the mnemonics and directive commands written in columns after the semicolon Therefore be careful with the position where you enter the semicolon If a semicolon is enclosed with double quotations or single quotation AS100 does not assume it to be the first character of a comment e A space or tab can be inserted between a directive command s operand and a comment Description example SECTION area DATA ORG 00H sym EQU 0 work BLKB 1 ALIGN PAGE newpage ALIGN Comment Assembly source line Refer to the R32C 100 Series Software Manual for details on how to write mnemonics Here the following explains rules you need to follow to write the assembly source lines that can be processed by as100 Function Mnemonics available for the R32C 100 Series can be written in this line Rules for writing Always be sure to insert a space or tab between the mnemonic and its operand e When writing multiple operands always be sure to insert a comma between each operand A space or tab can be inserted between the operand and comma e Some mnemonics are not accompanied by an operand Mnemonics can be written starting immediately from the top of a line A space or tab can be inserted at the beginning of an assembly source line When defining a label in the assembly source line always be sure to write the label name in columns preceding the mnemonic e Be sure to enter a colon before and after the l
78. ate the section so that its addresses will not overlap Can t close file file The file file cannot be closed Check the directory information 85 Can t close temporary file The temporary file cannot be closed Check the remaining storage capacity of the disk Can t create file file The file file cannot be created Check the directory information Can t create temporary file A temporary file cannot be created Check to see if the directory is write protected Can t generate automatically the variable interrupt vector table The linker cannot automatically generate the variable vector table If the variable vector table is to be automatically generated do not write a program in the vector section Can t open file file The file file cannot be opened Check the file name Can t open temporary file The temporary file cannot be opened Check the directory information Can t remove file file The file file cannot be deleted Check the permission of the file Can t remove temporary file The temporary file cannot be deleted Check the permission of the file Can t registered symbol in the list Symbols cannot be registered in a list If this error occurs please contact tool support personnel Command file line characters exceed The number of characters per line in the command file exceeds the limit Check the contents of the command file Command li
79. attribute section Description example The following statement results in an error Breaks pages at specified position of list file Function e This command causes pages in the assembler list file to break e The character string written in the operand is output to the header section in the new page of the assembler list file Precaution The maximum number of characters that can be output to the header is value subtracted 65 from the number of columns in the list file Use directive command FORM to set the number of columns in the list file Description format PAGE character string PAGE character string Rules for writing command Always be sure to insert space or tab between the directive command and the operand Enclose the operand with single quotations or double quotations as you write it The operand can be omitted Description example PAGE PAGE _ strings PAGE _ strings Set the software interrupt Function e The software interrupt number and software interrupt name are set e The contents set to this directive command are allocated to the variable vector table e The content set in this directive command is output to a map file generated by the linker as variable vector table information Precaution e If this directive command is written a variable vector table is automatically generated by the linker If as a result of automatic generation a free space is creat
80. be located in a ROM area in the absolute module Example SECTION program CODE DATA variable data area e This area is where memory where contents can be modified is located e Directive commands to allocate a memory area can be written here e Specify that DATA type sections be located in a RAM area in the absolute module Example SECTION mem DATA ROMDATA fixed data area This area is where fixed data other than programs is written e Directive commands to set data can be written here e All commands except directive commands to allocate a memory area can be written here e Specify that ROMDATA type sections be located in a ROM area in the absolute module Example SECTION const ROMDATA Section Attributes Attribute is assigned to a section in which units addresses are controlled by AS100 when assembling the source program Relative e Addresses in the section become relocatable values when assembled e The values of labels defined in a relative attribute section are relocatable Absolute e Addresses in the section become absolute values when assembled e The values of labels defined in an absolute attribute section are absolute e f you want to assign a section an absolute attribute specify its address with directive command ORG in a line following the line where directive command SECTION is written Example SECTION program CODE ORG 1000H Alignment of sections Relative attribute sections can be adjuste
81. bel or symbol name correctly Right quote is missing A right quote is not entered Enter the right quote Same items are multiple specified 2 Multiple same items of operand are specified Check the syntax for this operand and rewrite it correctly Same kind items are multiple specified Multiple operand items of the same kind are specified Check the syntax for this operand and rewrite it correctly Section attribute is not defined Section attribute is not defined Directive command ALIGN cannot be written in this section Make sure that directive command ALIGN is written in an absolute attribute section or a relative attribute section where ALIGN is specified Section has already determined as attribute The attribute of this section has already been defined as relative Directive command ORG cannot be written here Check the attribute of the section Section name is missing No section name is entered Write a section name in the operand Section name is not appropriate Section name is not appropriate Change the section name Section type is multiple specified Section type is specified two or more times in the section definition line Only one section type CODE DATA or ROMDATA can be specified in a section definition line Section type is not appropriate The section type is written incorrectly Rewrite the section type correctly Size or format specifier is not appro
82. ble below lists the command parameters available for 1n100 Parameter name Function File name Relocatable module filename to be processed by In100 Disable message output to screen E Specifies start address of absolute module G Outputs source debug information to absolute module file JOPT Optimizes the branch instruction referencing the global label L Specifies library file to be referenced LOC Specifies section allocation sequence LOCR The data in a specified section is relocated at a specified address or in a specified order of placement LD Specifies directory of library to be referenced M Generates map file MS Generates map file that includes symbol information MSL Generates map file that includes full name of symbol more than 16 characters MPB8 MPB16 MPB32 Set the data bus width when started in microprocessor mode NOSTOP Outputs all encountered errors to screen O Specifies absolute module file name ORDER Specifies section address and allocation sequence PSFP Generates map file for programmable sound field processor T Generates link error tag file U Outputs a warning for the unused function names V Indicates version number of linkage editor VECT Sets the value for the free area in generating the variable vector table VECTN Set the address of the software interrupt number W On the occurrence of a war
83. ccnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn cece non nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnninnnss 41 Rules for Entering Command Line ccccceccesssesseesceseeeeeeceseseseceeeeeeeeseeeseeeeeeeseeeseeeseeeeeeeeeeeeeeeeeees 42 Method for Operating asl100O ooooonnoonnoooonnnnnnnnnnnnnnnnnonnnonnnonnnnnnnnnnnnnnonnnonnnnnnn non non nn nn nn nn NATERA 43 Command Parameters iia 43 Rules for Specifying Command Parameters ccccceceesseeseeeeceeseeeseeeseeeseeeeeeeseeeeeeseeeeeeeseeeeeeeeeees 43 Include File Search Directory sscccccccccsssssssseeeccccccucssseeeecccceeeesseceececcseeeesseeeececeseeaeesecesceceeees 44 as100 Command Options ccccccccc cece essseeeeccceccecussseeeeccccceceuuseceeccccseeeuassseeececcseeeuusaeeeececeseeeuaaaeeeeeess 44 A A EET E T A EA EAA A E E 45 ALIGNIFALIGNS asii EEEE E EENE aaa 45 Di a o o de nd rl a e e e e A 47 O A E A E 47 PA A A IA 48 Mad A A DA tot 48 E A E o A O a o O O ar O Id 48 E A A 49 Disraeli tidad jaa esa 50 Nr a A a a dd bad tiki AN sates Weave ol ces od 50 Di A o e e is Peo 51 PSOE A A ls 52 A A A ida 53 a BEREE DE AIE IN a Ske E LE A A IE EEE ai EA 53 E E A os Ceased cece e E E AAE Oeste als Ian 54 Error Messages of as TOO ost tte ill ies 55 Warning Messages 0f as 1 OQ a A A N NaS 62 Method for Operating 1N100 meci ei iii E OE Ei Aa EERE on nnnn nn nn nro S N 65 Command Parameters cia A ia dera 65 Rules for Specifying Command Parameters
84. cified simultaneously with option E Description example gt Imc100 H debug Set ID code for ID check Function Function e For details on the ID code check see the hardware manual of the microcomputer e The specified ID code is stored as 8 bit data in ID store addresses FFFFFFE8 FFFFFFE9 FFFFFFEA FFFFFFEB FFFFFFEC FFFFFFED and FFFFFFEB e lf you filled in ID store addresses with value in your source program when this option is specified the data of ID store addresses are always changed Without this option the filling data are output e When this option alone is specified ID code is FFFFFFFFFFFFFF e An ID file extension id is created to display ID codes set with this option e The specified ID code is stored as an ASCII code Precaution When assembler directive command ID is described this option isn t processed Description rules e Always specify this command option in uppercase letters e Add ID to the ID code e To directly specify an ID code specify ID followed by a number Description example Example 1 IDCodeNot ID code 436F64654E6F31 Address FFFFFFE8 FFFFFFE9 FFFFFFEA FFFFFFEB FFFFFFEC FFFFFFED FFFFFFEE data 43 6F 64 65 4E 6F 31 Example 2 IDCode ID code 436F6465000000 Example 3 ID1234567 ID code 31323334353637 Example 4 ID 49562137856132 ID code 495621378561 32 Example 5 ID 1234567 ID code 12345670000000 Example 6 ID ID code FFFFFFFFFFFFFF
85. claration will be ignored Rewrite the symbol declaration correctly Invalid SBSYM16 declaration it s declared by FBSYM The symbol is already declared in FBSYM The SBSYM16 declaration will be ignored Rewrite the symbol declaration correctly Invalid SBSYM16 declaration it s declared by SBSYM The symbol is already declared in SBSYM The SBSYM16 declaration will be ignored Rewrite the symbol declaration correctly Mnemonic in ROMDATA section Found mnemonic in the section type is ROMDATA Specify CODE type to the section written mnemonic Moved between address registers as byte size Transfers between address registers are performed in bytes Rewrite the mnemonic correctly Statement has not effect The statement does not have any effect as a command line Check the correct method for writing the command Too many actual macro parameters There are too many actual macro parameters Extra macro parameters will be ignored Too many structured label definition There are too many labels to be generated Divide the file into smaller files before assembling 63 bil BREAK is found Found two or over BREAK statement in a SWITCH block Check the source program 64 This section describes how to use the functions of 1n100 The basic function of In100 is to generate one absolute module file from two or more relocatable module files Command Parameters The ta
86. command FILE and specified character strings Description format character string character string character string character string O character string Rules for writing command e Spaces and tabs entered before and after this directive command are concatenated as a character string e Acharacter string can be written before and after this directive command e When you use for character data 40H be sure to enclose with double quotations When a string including is enclosed with single quotation strings before and after are concatenated This command can be written for multiple instances in one line Precaution If you want a concatenated character string to be a name do not insert spaces and tabs before and after this directive command Description example ASSERT sample gt FILE dat If the currently processed file name is samplel a30 a message is output to the sample dat file e A macro definition like the one shown below can be entered mov_nibble MACRO p1 src p2 dest MOV p1 p2 src dest ENDM mov_nibble L ROL H A0 MOVLH ROL A0 R32C 100 Series C Compiler Package V 1 01 Assembler User s Manual Publication Date Aug 1 2007 Rev 1 00 l Sales Strategic Planning Div Pupigned Bys Renesas Technology Corp Microcomputer Tool Development Department Edited by Renesas Solutions Corp 2007 Renesas Technology Corp and Renesas Solutions Corp All right
87. cription example INSF glbfunc G 0 isr glbsub CALL glbsub G isr locsub CALL locsub S EINSF Defines string symbol Function e This command defines a character string to a symbol e Asymbol can be redefined Precaution The symbols defined by this directive command cannot be specified for external reference Description format symbol name DEFINE character string symbol name DEFINE character string symbol name DEFINE character string Description rules When defining a character string that includes a space or tab be sure to enclose the string with single or double quotations as you write it Description example SECTION ram DATA data1 BLKB 1 flag DEFINE 01H data1 SECTION program CLB flag Stores a floating point number data in ROM in 8 byte length Function e This command stores 8 byte long fixed data in ROM e Label can be defined at the address where data is stored Description format DOUBLE numeric value name DOUBLE numeric value Rules for writing command e Write a floating point number in the operand e Refer to Rules for writing operand for details on how to write a floating point number in the operand Always be sure to insert space or tab between the directive command and the operand e When defining a label be sure to write the label name before the directive command e Always be sure to insert a colon after the label name
88. ctions are not optimized ON Branch instructions are optimized Default 2 JMPW Unconditional branch instructions not subject to optimization processing are generated with JMP W JMPA Unconditional branch instructions not subject to optimization processing are generated with JMP A Default 3 JSRW Subroutine call instructions not subject to optimization processing are generated with JSR W JSRA Subroutine call instructions not subject to optimization processing are generated with JSR W Default e Each parameter can be specified in any desired order Each parameter can be omitted If any parameter is omitted the jump distance does not change beginning with the default value or previously specified content Description example A combination of operands shown below can be entered OPTJ OFF OPTJ ON OPTJ ON JMPW OPTJ ONJMPW JSRW OPTJ ONJMPW JSRA OPTJ ON JMPA OPTJ ONJMPAJSRW OPTJ ON JMPA JSRA OPTJ ON JSRW OPTJ ONJSRA Specifies address value Function e Sections in which this directive command is written are assigned absolute attribute Precaution Absolute attribute sections cannot have their addresses relocated when linking programs e The addresses of a section in which this directive command is written take on absolute values e The addresses where code is stored for mnemonics that are written in the lines immediately following this directive command are determined e The memory add
89. d for alignment so that their start addresses always fall on even addresses as addresses are determined when linked If you want sections to be aligned this way specify ALIGN in the operand of directive command SECTION Example SECTION program CODE ALIGN 13 Rules on Section Management This section describes how AS100 converts the source program written in multiple files into a single executable file Section Management by as100 Absolute attribute section have their absolute addresses determined sequentially beginning with the specified address Relative attribute section have their relocatable addresses determined sequentially beginning with 0 section by section All start addresses relocatable of relative attribute sections are 0 Section Management by In100 Sections of the same names in all files are arranged in order of files specified Absolute addresses are determined sequentially beginning with the first section thus sorted Start addresses of sections are determined sequentially beginning with O unless otherwise specified Sections that differ each other are located at contiguous addresses unless otherwise specified Sections of the same name are allocated in order of files specified Sections are allocated in the order they are entered in the file that is specified first If an attempt is made to allocate an absolute attribute after another absolute attribute In100 outputs a warning For section type DATA if
90. d library file is nonexistent lb100 creates a new library file e Ifa relocatable module bearing the same name as one you are going to add is already entered in the library file lb100 outputs an error e If the relocatable module file you are going to add contains a definition of the same global symbol name as in the module that is already entered in the library file lb100 outputs an error Description rule e Input this option using a form like A library file name relocatable module file name Always be sure to insert a space between this option and the library file name and between the library file name and the relocatable module file name Description example gt lb100 A new lib sample3 r30 A sample3 module is added to the new lib file Creates New Library File Function The software creates a new library file Precaution If a library file of the same name as one you have specified in this command option already exists the contents of the old library file are replaced with those of the new library file Description rule e Input this option using a form like C library file name relocatable module file name e Always be sure to insert a space between this option and the library file name and between the library file name and the relocatable module file name Description example gt lb100 C new sample1 sample2 A new library file named new lib is created that contains samplel and sample2 101 Del
91. d of this command Description format SBBIT name SBBIT name name Rules for writing command e Always be sure to enter a space or tab between the directive command and operand A bit symbol defined by BTEQU or BTGLB can be written in the operand A forward referenced bit symbol can be written in the operand Before writing this directive command be sure to set the SB register value by directive command SB When specifying multiple names separate them with a comma Description example BTGLB extbit SB 80H SBBIT extbit BCLR extbit BTST extbit BSET extbit Selects 8 bit SB relative addressing mode Function e An 8 bit SB relative addressing mode is selected for the name specified in the operand of this directive command e An 8 bit SB relative addressing mode is selected for the expression of a 24 bit address 0 relative addressing mode including the name specified in the operand of this directive command Precaution e For the symbols defined by the EQU directive command 8 bit SB relative addressing mode cannot be selected by using the label name specified in this directive command For the case of description example 2 e For instructions that do not have 8 bit SB relative addressing mode available 16 bit SB relative addressing mode is selected Description format SBSYM name SBSYM name name Rules for writing command e Always be sure to insert space or tab betwee
92. d printer By referencing this file confirm ID code of ID code function The ID file is output in order command option information ID code store address IDCodeNo1 FFFFFFEC 43 FFFFFFED 6F FFFFFFEE 64 FFFFFFEF 65 FFFFFFF4 4E FFFFFFF5 6F FFFFFFFG 31 File name of ID file The file name of the ID file is created by changing the extension x30 of the absolute module file into id sample x30 gt sample id Directory for ID file generated The files are generated in the current directory Library File The 1b100 librarian generates one library file from the relocatable module files generated by as100 by integrating them as modules into a single file Format of library file The library file is based on the IEEE 695 format Precaution Since this file comes in a binary format it cannot be output to a screen or printer nor can it be edited If you open or edit this file with an editor file processing in the subsequent stages will not be performed normally File name of library file The library file is generated using the file name specified on the command line The extension is 38 lib A library file name cannot be omitted on the command line Directory for library file generated If a path is specified on the command line the library file is generated in that directory If no path is specified the library file is generated in the current directory Library List File The 1b100 librarian generates a li
93. de 102 WA A Whe be hte A GA aad ita dae ae eh a thas ate aa ee Rts 102 A ie Sedna te SMOG Slug Dee thE IA E E EAE OS 103 DA O 103 NR 103 A A A LD AA DAS ESTATE cates Sa ea SIDA 104 DA E A Ed AA A NS 104 Error Messages of Ib TOO 23 iii A aA ATENE TAENSA AN Nk A Nada 105 Warning Messages of 1D100 cccccessesesseeseeesseeseeeseeeseeeseesseeesseseeeeeeeeeeeeeeeesseeeseeeeeeeseseseeeeeeeeeees 106 Method for Operating abs100 oooooooonononnnnnonnnonnnnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnonnnonnnonnnos 107 Pr cautions sine absllMii a deakaeen Sead ong Miss eden Toa aaa a a dea gees oes ae i aieeaa 107 Command Parameters isidro a O VA dades ag PATENS VAA 107 Rules for Specifying Command Parameters 0ooocoonnonoooononononononon ono nono nnnno nono nnn non nono nono nro nn nn nn nn nr rnnnnnnoo 107 abs 100 Command Options ii ii iii iio 107 o A A e e tees 108 Di A A led o do a als 108 DA LO Mitel LD O Sa E A E heed theta tute Moti MG So te Oe 108 A A a a a aa E a AEE oa E 109 Error Messages of absl00 risponsi anisini aigo ran an Enana a EEEE AINE a Go indicios besan 110 Warning Messages of abs100 iio a i eer E E a E E aida des 110 Rules tor Writing Propia a tada 111 Precautions on Writing Program ooooocccccnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnononnnnnnnnnnnnn nono nnnnnnnnnnnnnnnnnnnnnnnnonnnos 111 Characterieyi ni A A ade 111 A 112 Na di 112 DO italian ideado raise 115 Line CONCALETI ati A ds 118
94. directive commands EQU and BTEQU Change the symbol name Symbol has already defined as the same type The symbol has already been defined as a bit symbol Bit symbols cannot be redefined Change the symbol name Symbol is missing Symbol is not entered Write a symbol name Symbol is multiple defined The symbol is defined twice or more The macro name and some other name are duplicates Change the name Symbol is undefined The symbol is not defined yet Undefined symbols cannot be used Forward referenced symbol names cannot be entered Check the symbol name Syntax error in expression The expression is written incorrectly Check the syntax for this expression and rewrite it correctly Temporary label is undefined The temporary label is not defined yet Define the temporary label The addressing which can t be modified is specified The addressing which can t be modified is specified Check the description rule of directive command INXxx The value is not constant The value is indeterminate when assembled Write an expression symbol name or label name that will have a determinate value when assembled Too many formal parameter There are too many formal parameters defined for the macro Make sure that the number of formal parameters defined for the macro is 80 or less 61 Too many nesting level of condition assemble Condition assembling is nested too man
95. dress range of output data Function e Specifies an address range for machine language data to be output to a file generated e You can use one of two ways given below to choose this option 1 You specify the starting address and the ending address of the output 2 You specify the starting address of the output only Description rules e Specify this option either in the form of A starting address ending address or A starting address Put at least one space between this option and the starting address Be sure to give an address in hexadecimal Specify this option ahead of specifying a file name With the starting address of the output only specified the maximum address of the data registered in the absolute module file becomes the ending address If the starting address exceeds the ending address an error occurs As for a specified address range in which no data are present the specified data will be output if the option F which is an option for setting data in a space area is chosen or nothing will be output if this option is not chosen e An error results if the start address value is greater than the maximum address for data that is registered in the absolute module file e An error results if the end address value is smaller than the minimum address for data that is registered in the absolute module file e An error results if the start address and the end address values are the same Description examples
96. e information in this document or Renesas products 7 With the exception of products specified by Renesas as suitable for automobile applications Renesas products are not designed manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems or equipment or systems for transportation and traffic healthcare combustion control aerospace and aeronautics nuclear power or undersea communication transmission If you are considering the use of our products for such purposes please contact a Renesas sales office beforehand Renesas shall have no liability for damages arising out of the uses set forth above 8 Notwithstanding the preceding paragraph you should not use Renesas products for the purposes listed below 1 artificial life support devices or systems 2 surgical implantations 3 healthcare intervention e g excision administration of medication etc 4 any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp its affiliated companies and their officers directors and employees against any and all damages arisi
97. e With no absolute path given to the file name 1 In an instance in which no directory is designated for the file name designated in the command line at the time of starting up AS100 AS100 generates the file specified by this command in the current directory 2 In an instance in which a directory is designated for a file name designated in the command line at the time of starting up AS100 AS100 generates the file with the directory of the file designated in the command line e lf FILE command is specified as a file name AS100 generates the file in same directory as the directory of the file designated in the command line at the time of starting up AS100 Description format ASSERT character string ASSERT character string gt file name ASSERT character string gt gt file name Rules for writing command Always be sure to insert space or tab between the directive command and the operand Always be sure to enclose the character string in the operand with double quotations If you want the character string to be output to a file specify the file name after gt or gt gt The symbol gt directs the assembler to create a new file and output a message to that file If there is an existing file of the same name that file is overwritten The symbol gt gt directs the message is added to the contents of the specified file If the specified file cannot be found the assembler creates a new file in that name e Space
98. e area 2 Specification of the data value that is to be set in a free area and the start address value of that area 3 Specification of the data value that is to be set in a free area and the start address and end address values of that area Description rules e This option must be specified in the form like F free area set data value F free area set data value start address value or F free area set data value start address value end address value Put at least one space between this option and the data Be sure to give an address in hexadecimal Specify this option before of specifying a file name An error results if the start address value is greater than the end address value When using this option in combination with the A option an error will result unless the output range of the free area set data is within the address range specified by the A option e It is only when the start address value is greater than the maximum address for data that is registered in the absolute module file and the start address and end address values both are specified that the free area set data is additionally output to the specified address range An error results if the start address value only is specified e Ifthe end address value is smaller than the minimum address for data that is registered in the absolute module file the free area set data is additionally output to the specified address range
99. e flag bit4 BTEQU one one flag Specifies global bit symbol Function e This command declares that the bit symbols specified with it are global symbols e f any bit symbols specified with this directive command are not defined within the file the assembler processes them assuming that they are defined in an external file e If the bit symbols specified with this directive command are defined in the file the assembler processes them to be referencible from an external file Description format BTGLB bit symbol name BTGLB bit symbol name bit symbol name Rules for writing command e Always be sure to insert space or tab between the directive command and the operand Write a bit symbol name in the operand that you want to be a global symbol Precaution No bit symbols can be specified for external reference that are defined by a symbol that is indeterminate when assembled When specifying multiple bit symbol names in the operand separate each symbol name with a comma as you write them Description example BTGLB flag1 flag2 flag3 BTGLB flag4 SECTION program BCLR flag1 Stores data in ROM in 1 byte length Function e This command stores 1 byte long fixed data in ROM e Label can be defined at the address where data is stored Description format BYTE numeric value name BYTE numeric value Rules for writing command e Write an integral value in the operand Always be sure to inser
100. e or tab between the directive command and the operand A symbol can be written in the operand An expression can be written in the operand When writing multiple operands separate them with a comma A character or a string of characters can be written in the operand after enclosing it with single quotations or double quotations In this case data is stored in ASCII code representing the characters Precaution The length of a character string you can write in the operand is less than three characters e When defining a label be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example SECTION value ROMDATA ADDR 1 ADDR dat a ADDR symbol ADDR symbol 1 ADDR 1 2 3 4 5 END Corrects odd addresses to even addresses Function e The address in which to store the code for the line that immediately follows this directive command is corrected to be 2 4 or 8 byte aligned e If the section type is CODE or ROMDATA the NOP code 9FH is written into an address that has been emptied as a result of address correction Ifthe section type is DATA the address value is incremented by n Option Specification Specification content of operation by SECTION command by ALIGN command None None Specify Warning message Section alignment is not corrected Specify Specify Address is corrected 4bites aligned ALIGN2 N
101. e section type and align or noalign For the section type write CODE ROMDATA or DATA If align is specified the address in which to store the code for the line that immediately follows this directive command is corrected to be 2 4 or 8 byte aligned Description example initsct bss_NE data align alignment initsct bss_NO data noalign snot alignment Defines the start of a Function in inspector function Function e Defines the start of a function Subroutine in inspector information e Defines the extent from the start of a function subroutine to the directive instruction EINSF as a single function subroutine Description format INSF Function subroutine start label storage class frame size Rules for writing command e Be sure to put a space or a tab between this directive instruction and the operand e Be sure to give a function subroutine start label a storage class and a frame size e Separate a storage class and a frame size by use of a comma e As for the storage class give either G global label or S local label e Use an integer to give a frame size Notes In using this directive instruction be sure to use the directive instruction EINSF This directive instruction is for exclusive use with the assembler language Using this directive instruction in the asm Function in NC100 results in an error This directive instruction turns effective when the command option finfo has be
102. e separated by the line feed character and an interval from a character immediately after a line feed character to the next line feed character is assumed to be one line Length of line Up to 512 characters can be written in one line The as100 assembler does not process the characters in any line exceeding this limit Precaution When writing lines of statements make sure that your description is entered within each line The following describes rules on each type of line you need to follow when writing statements Directive command line Function e Directive command of assembler can be written in this line Rules for writing Always be sure to insert a space or tab between the directive command and its operand When writing multiple operands always be sure to insert a comma between each operand A space or tab can be inserted between the operand and comma Some directive commands are not accompanied by an operand Directive commands can be written starting immediately from the top of a line A space or tab can be inserted at the beginning of a directive command When writing a comment in the directive command line insert a semicolon after the directive command and operand and write your comment in columns following the semicolon e Comments are output to an assembler list file Precaution The asi00 assembler processes anything written in columns after the semicolon as a comment Consequently the assembler does not gener
103. e sure that the operand is written within the range of one line This command can be written only once in one assembly source file This command can be written in any desired line providing that it is entered before directive command END Description example VER strings VER strings Stores data in ROM in 2 byte length Function e This command stores 2 byte long fixed data in ROM e Label can be defined at the address where data is stored Description format WORD numeric value name WORD numeric value Rules for writing command e Write an integral value in the operand Always be sure to insert space or tab between the directive command and the operand A symbol can be written in the operand An expression can be written in the operand When writing multiple operands separate them with a comma A character or a string of characters can be written in the operand after enclosing it with single quotations or double quotations In this case data is stored in ASCII code representing the characters Precaution The length of a character string you can write in the operand is less than two characters e When defining a label be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example SECTION value ROMDATA 1 WORD WORD da ta WORD symbol WORD symbol 1 WORD 1 2 3 4 5 END WORD 1 WOR
104. e to use hexadecimal notation when entering a numeric value e f the numeric value begins with an alphabet a to f always be sure to add O at the beginning of the value as you enter it e This option can be specified at any position on the command line Description example e The address value in global label num is specified for the entry address of sample1 x30 gt In100 sample1 sample2 E num e 0000 is specified for the entry address of sample1 x30 gt In100 sample1 sample2 E 0f0000 Outputs Source Debug Information Function e The software outputs information on C language or macro description source lines to an absolute module file e The absolute module files generated without specifying this option cannot be debugged at the source line level Precaution If the absolute module file is derived by linking the relocatable module files that were generated by specifying option N to disable line information output when executing as100 it cannot be debugged at the source line level even when you have specified this option G when executing In100 e Source debug information is output to an absolute module file Description rule e This option can be specified at any position on the command line Description example gt In100 G sample1 sample2 Optimizes the branch instruction referencing the global label Function e This option is used to optimize the branch instructions JMP amp JSR that are making refer
105. e written in a DATA type section Section types can be made the DATA type simply by writing DATA following the section name when you define a section Always be sure to insert space or tab between the directive command and the operand Write an integral value in the operand A symbol can be written in the operand An expression can be written in the operand The expression in the operand must have its values determined when assembling the source program e When defining a label name in the allocated area be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example symbol EQU 1 SECTION area DATA work1 BLKD 1 work2 BLKD symbol BLKD symbol 1 Allocates RAM area in units of 4 bytes Function e This command allocates a specified bytes of RAM area in units of 4 bytes e Label name can be defined at the allocated RAM address Description format BLKF numeric value name BLKF numeric value Rules for writing command e This directive command must always be written in a DATA type section Section types can be made the DATA type simply by writing DATA following the section name when you define a section Always be sure to insert space or tab between the directive command and the operand Write an integral value in the operand A symbol can be written in the operand An expression can be written in the operand The ex
106. ed address value of memory by a value that indicates the bit position e Bit symbols can be used in symbolic debug e Bit symbols can be specified as global Description format name BTEQU bit position address value Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e Separate between the bit position and the bit s memory address with a comma as you enter them e Always be sure to write the bit position first and then the address value e An integer in the range of 0 to 65535 can be written to indicate the bit position e Always make sure that the value you specify for the bit position is determined when assembling the source program e Asymbol can be written to specify the address value of an operand e A label or symbol that is indeterminate when assembled can be written to specify the address value of an operand Precaution No bit symbols can be externally referenced written in the operand of directive command BTGLB that are defined by a symbol that is indeterminate when assembled Abit symbol can be written in the operand Precaution However a bit symbol name in the operand cannot be forward referenced Also for the operand bit symbol be sure to write a bit symbol name whose value is fixed when assembled e Anexpression can be written in the operand Description example bitO BTEQU 0 0 bit1 BTEQU 1 flag bit2 BTEQU 2 flag 1 bit3 BTEQU on
107. ed in the variable page vector table any software interrupt not specified by this directive command a value for the free space is set in order of the priority given below 1 Value set by the link option VECT 2 Value of a global label __dummy_int 3 Value of a global label dummy_int Note that if any one of the values in 1 to 3 is not set no values are set in the free space e If this directive command is written 1 024 bytes of area is reserved for use as the section name vector e If a program is written in the vector section while this directive command is written this directive command results in an error Do not write a program in the vector section e The software interrupt numbers specified by this directive command cannot be specified in the link option VECTN Description format RVECTOR software interrupt No software interrupt name Rules for writing command e Be sure to describe the space or tab between the directive command and operand e Be sure to describe the comma between the software interrupt number and software interrupt name e For software interrupt No only the value defined in assembling can be described e Software interrupt No can be described in the range of 0 to 255 For the software interrupt name the symbol or label can be described Description example vector 12 timerAO Sets timerA0O to software interrupt No 12 Assigns temporary SB
108. efine 1t with directive commands MACRO and ENDM and call up the defined macro Repeat macro function To use a repeat macro function use directive commands MREPEAT and ENDR to define it Each macro function is described below Macro Function A macro function can be used by defining a macro name macro definition and calling up the macro macro call e A macro function cannot be made available for use by macro definition alone Macro definition and macro call have the following relationship Formal parameter Macro definition p1 and work correspond one for one 0 and p2 correspond one for one Macro call Real parameter In this example a warning message is output because there is no real argument corresponding to p3 Macro Definition e Macro definition means defining a collection of more than one line of instructions to a single macro name by using directive command MACRO e Macro names and macro arguments are case sensitive so that lowercase and uppercase letters are handled differently End of macro definition is indicated by directive command ENDM Lines enclosed with directive commands MACRO and ENDM are called the macro body Macro definition can have formal parameters defined Recursive definition is allowed for macro definition Macros can be nested in up to 65 535 levels including both macro definition and macro call Macros of the same name can be redefined Macro definitio
109. elocatable file name module is multiple specified Multiple modules of the same name module are specified Specify the module name correctly again module is not registered in filename The module module is not registered in the library file filename Specified processing to delete or update module cannot be performed Check the module name symbol is multiple defined at module1 and module2 in filename Externally defined symbols of the same name symbol are defined in two places of the library filename one in module1 and another in module2 Check the relocatable file name symbol is multiple defined in filename The symbol symbol is defined twice in the file filename If this error occurs please contact tool support personnel symbol is multiple defined in modulel and module2 Externally defined symbol symbol is defined in two places of the library filename one in modulel and another in module2 Check the relocatable file name xxx and xxx are used The option xxx and the option xxx are used simultaneously Options cannot be specified simultaneously Re input the command correctly Can t close file filename The file filename cannot be closed Check the directory information Can t close temporary file The temporary file cannot be closed Check the directory information Can t create file filename The
110. en chosen Description example glbfunc INSF glbfunc G O EINSF locfunc INSF locfunc S 0 EINSF Detects specified character string Function e This command indicates a position in the character string specified in the operand at which a search character string begins e A position can be specified at which you want the assembler to start searching a character string Precaution The value is rendered 0 if a search character string is longer than the character string itself The value is rendered O if a search character string is not included in the character string The value is rendered 0 if the search start position is assigned a value greater than the length of the character string Description format INSTR CS SC SP INSTR CS SC SP CS character string SC search character string SP search start position Rules for writing command e Always be sure to enclose the operand with e Always be sure to write the character string search character string and search start position e Separate the character string search character string and search start position with commas as you write them No space or tab can be inserted before and after the comma A symbol can be written in the search start position If you specify 1 for the search start position it means the beginning of the character string The 7 bit ASCII code characters including a space and tab can be used to write a char
111. ence to the global label Precautions e When this option is specified always specify the nc100 OGJ Oglb_ mp and as100 JOPT options e When this option was specified the branch information file extent jin is generated Do not edit the branch information file Also avoid using the extent jin e When the directive command OPTJ is being used simultaneously with this option this option becomes effective e When this option is specified execute nc100 as100 and In100 at the same directory Description rule e This option can be written at any desired position in a command line Description example gt In100 JOPT sample 69 Specifies Library File Name Function e Specify the library file name to be referenced when linking files e The In100 editor reads global symbol information from the specified library file as it links the necessary relocatable modules Description rule Input this option using a form like L library file name Always be sure to insert a space between this option and the file name This option can be specified at any position on the command line A path can be specified in the file name Multiple library files can be specified When specifying multiple library files separate each file name with the comma as you specify file names There must be no space or tab before or after the comma Description example gt In100 sample1 sample2 L lib1 The lib1 lib file in the cur
112. ent Make sure the DEFAULT statement is written within a SWITCH statement Different register of the bank exist g A register in a different bank is written Check the register bank Directive command RVECTOR can t be described The directive command RVECTOR cannot be written here If a variable vector table is to be automatically generated do not write a program in the vector section Division by zero A divide by 0 operation is attempted Rewrite the expression correctly ELSE not associates with IF 2 No corresponding IF is found for ELSE Check the source description ELIF not associates with IF No corresponding IF is found for ELIF Check the source description ENDIF not associates with IF No corresponding IF is found for ENDIF Check the source description ENDS not associates with SWITCH No corresponding SWITCH is found for ENDS Check the source description Error occurred in executing xxx An error occurred when executing xxx Rerun xxx Format specifier is not appropriate The format specifier is written incorrectly Make sure that the format specifier is written correctly Function information is not defined Function information which is inspector information has not been defined Define the function information as required Illegal directive command is used An illegal instruction is entered Rewrite the instruction correctly
113. erated Do not edit the branch information file Also avoid using the extent jin When the directive command OPTJ is being used simultaneously with this option this option becomes effective Description rule e This option can be written at any desired position in a command line Description example gt as100 JOPT sample 49 Generates Assembler List File Function e The software generates an assembler list file in addition to a relocatable module file e The generated list files are identified by the extension Ist e lf a directory is specified by command option O the assembler list file is generated in the specified directory Description rule e This option can be specified at any position on the command line This option allows you to specify the C D l and M file format specifiers No space or tab can be entered between the file format specifier and L Multiple file format specifiers can be specified simultaneously File format specifiers can be entered in any desired order Format Function specifier C Line concatenation is output directly as is to a list file D Information before DEFINE is replaced is output to a list file Even program sections in which condition assemble resulted in false conditions are output to the assembler list file M Even macro description expansion sections are output to the assembler list file Description example gt a
114. eries Destination address may be changed The jump address can be a position that differs from an anticipated destination When writing an address in a branch instruction operand using a location symbol for offset be sure to write the addressing mode jump distance and instruction format specifiers for all mnemonics at locations from that instruction to the jump address Fixed data in CODE section 2 Found directive command BYTE WORD ADDR LWORD in the section type is CODE Specify ROMDATA type the section written any directive command BYTE WORD ADDR LWORD Floating point value is out of range The floating point number is out of range Check whether the floating point number is written correctly Values out of range will be ignored Invalid FBSYM declaration it s declared by SBSYM The symbol is already declared in SBSYM The FBSYM declaration will be ignored Rewrite the symbol declaration correctly Invalid FBSYM declaration it s declared by SBSYM 16 The symbol is already declared in SBSYM16 The FBSYM declaration will be ignored Rewrite the symbol declaration correctly Invalid SBSYM declaration it s declared by FBSYM The symbol is already declared in FBSYM The SBSYM declaration will be ignored Rewrite the symbol declaration correctly Invalid SBSYM declaration it s declared by SBSYM16 The symbol is already declared in SBSYM16 The SBSYM de
115. error the following output will be obtained gt as100 sample sample a30 2 Error as100 Section type is not appropriate Specify alignment correction values Function e Specify alignment correction values for the assembler directives SECTION and ALIGN The alignment correction value consists of 2 bytes when ALIGN2 is specified or 8 bytes when ALIGN8 is specified e If this option is not specified the alignment correction value consists of 4 bytes Precaution If the option PSFP is specified this option has no effect Description rule e The option can be specified at any point in the command line e Always input this option in uppercase letters Description example gt as100 ALIGN8 sample Indicates Command Invocation Line Function e f this option is specified you can confirm the command options set when invoking macro processor programmable sound field processor and assembler processor from as100 as the software indicates them on the screen Description rule e This option can be specified at any position on the command line Description example gt as100 C N L T sample e This information is displayed beginning with the next line following All Rights Reserved that is output when AS100 starts up normally gt as100 C N L T sample sample a30 mac100 exe L T rREV F sample a30 macro processing now asp100 exe ALIGN4 L T sample a30 assembler processing
116. erved words Precaution The reserved words cannot be used in the names described later Types of Reserved Words Directive assemble commands All directives assemble commands explained in this manual and all character strings that begin with one period are the reserved words Mnemonic All assembly language mnemonic of R32C 100 Series are the reserved word Operators All operators explained in this manual are the reserved word System labels The system labels are generated by assembler AS100 handles all character strings that begin with two period as system labels Names Any desired names can be defined and used as such in your source program Names are classified into the following types each with a different range of descriptions that can be entered in the program Label This name has an address as its value Symbol This name has a constant as its value Bit symbol This name has a constant bit position and address as its values Location symbol This name has an address as its value These symbols are output by as100 Rules for Writing Names Length of name A character string can be entered as a name in up to 512 characters Determination of name Names are case sensitive so they are discriminated between uppercase and lowercase Therefore LAB and Lab are handled as different names Precaution You cannot use any name that is identical to one of AS100 s reserved words If this rule is not followed progra
117. escription rule e This option can be specified at any position on the command line Description example e The software generates a sample atg file if an error occurs gt as100 T sample 53 Indicates Version Number Function e When this option is specified the software indicates the version numbers of all programs included with AS100 and terminates processing Precaution All other parameters on the command line are ignored when this option is specified Description rule e Specify this option only and nothing else Description example gt as100 V 54 Error Messages of as100 is missing is not entered Write an immediate value in this operand is missing is not entered Write the right parenthesis corresponding to the is Ai 9 is not entered Insert a comma to separate between operands B or W is not specified Neither B nor W is specified Neither B nor W can be omitted Write B or W in mnemonic EINSF is missing for INSF EINSF used with INSF in a pair is missing Check where INSF is put ID is duplicated ID is specified more than once in the file ID can be written only once in a file Delete extra ID s IF is missing for ELIF IF for ELIF is not found Check the position where ELIF is written IF is missing for ELSE IF for ELSE is not found Check the position where ELSE is written IF
118. etes Modules from Library File Function e The software deletes a specified relocatable module from the library file e Once deleted the module is nonexistent anywhere Description rule e Input this option using a form like D library name relocatable module name Always be sure to insert a space between this option and the library file name and between the library file name and the relocatable module name e Multiple relocatable modules you want to be deleted can be specified In this case always be sure to insert a space between each module name Description example gt lb100 D new sample2 A relocatable module sample2 is deleted from the new lib library file Generates Library List File Function e The software generates a library list file that contains information on a specified library file The extension of generated library list file is IIs e A library list file can also be generated that contains information on only the necessary modules in the library file e Ifa library list file of the same name already exists this existing file is overwritten by a new library list file Description rule e Input this option using a form like L library file name relocatable module name e Always be sure to insert a space between this option and the library file name and between the library file name and the relocatable module file name e Multiple relocatable module names can be specified In this case alwa
119. f Function iia drid 9 COMO UMALIONS diia neee uE eE AEAEE EAEE EEn TEREE eE EEEE ETE NE AE AEO iia NE ends 9 PUC aa a a a a N 10 Qutline ot ast00 funca dd da 10 Outline GF liv 00 Tan acd 11 Outline ot lime 00 functions iia id E EE E EEEO SN 11 Outline of AAN A 11 Outline of abs 100 functions iceioiiaasccdicnninca scecadededeeseecascedsessavssoes9sa958seaseeosess5sadsdadeereassiseissnvaveaseds 11 AA A 12 Relocatable Assemble iaa aida pillada 12 Unit of Address Management Section nvidia cias add ies 12 Alignment of sections A A AAA A A 13 Rules on Section Managements iscrio o a a E E T A E a 14 Label and mba edad 15 Management of Label and Symbol Addresses cccccescesseeseeeeceeeeeeeeeeeceeeeeeeeeesceeeeeseseseeeeeeeseeeeeees 16 Library File Referencing Function ccccccccessesseeeeeeeeeeeseeeeeeeeeceseeeeeeseeesceeeeeeseeeeeeeeeeeseeeeeseeeeeeeees 17 Management of Include File cccccsseseseeesceeeseeeeeeseseseeeesseeeeseeeeeeeeeseeeeeeeeeseseeeeeseeeeeeeeeeeeeseeeees 18 Optimized Selection by AS100 oooonoonnooonnnnnonnnnnnnonnnonononnnononnnnnnnonnnnnnnnnnnnnnnnnnnnn nor i nei 18 Example of Optimization Selection by AS100 cccccccccccccesssseeesccccceeesssaeeescccceseeesacesceceseeensaneeeecees 20 SB Register Offset Description oocccccnnncnnncnnnononnnnnnnnnnnnnonnnnnnnnnnnnnnnn non nnnnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnninoss 20 Macro Func iia idtaia 21 Conditional Assemble Control
120. file filename cannot be created Check the directory name Can t create temporary file The temporary file cannot be created Check the directory information Can t open file filename The file filename cannot be opened Check the file name Can t open temporary file The temporary file cannot be opened Check the directory information Can t write in file filename Data cannot be written to the file filename Memory is insufficient Increase the memory capacity Command file is include in itself An attempt is made to include the command file in itself Check to see if the command file is written correctly Command file line characters exceed The number of characters per line in the command file exceeds the limit Check the contents of the command file Command line is too long The character string on the command line is excessively long Create a command file Ilegal file format filename The file format of filename is incorrect Check the file name Invalid option option is used An invalid option option is used Specify the option correctly again MCU informatino mismatch in file xx r30 The file information does not match the MCU information Specify a relocatable module file generated by as100 No public symbol is in filename There is no public symbol in the file filename Check the contents of the relocatable file Not enough memory Memory i
121. h an assembler function it will be alerted as an unused function by outputting a warning This applies when the assembler directive INSF and EINSF is written 5 The names listed below are outside the scope of search for unused functions Assembler function name start C language function name main Run time and standard library functions Description rule This command option can be specified at any position in the command line Description example gt In100 U sample Indicates Version Number Function e The software indicates the version number of In100 Precaution All other parameters on the command line are ignored when this option is specified Description rule e Specify this option only and nothing else Description example gt In100 V 81 Sets a value for the free area in generating the variable vector table Function e Set a value for the free area left after a variable vector table was automatically generated software interrupts not set by the assembler directive RVECTOR A value or a global label name can be specified for the value to be set for the free area Note that the set value 1s handled as 4 byte data Precautions e When this option is specified a variable vector table is automatically generated For details about automatic setting of a variable vector table refer to the assembler directive RVECTOR e Ifthe VECTN option is specified the VECTN option has
122. hod for specifying numeric value e Always be sure to use hexadecimal notation when entering a numeric value e f a numeric value begins with an alphabet always be sure to add 0 to the numeric value when you enter it Example 55 5A 0A5 Include File Search Directory Include files do not need to be specified from the command line If a path is described in the operand of the directive command INCLUDE the software searches that directory to find the include file If the directive command operand does not have a path specification the software searches the current directory In this case if the specified file cannot be found in the current directory and environment variable INC100 is set the software also searches the directory that is set in INC100 as100 Command Options The following pages describe rules you need to follow when specifying command options 44 Disables Message Output to Screen Function e The software does not output messages when as100 is processing This command option disables unnecessary messages such as copyright notes from being output to the screen when executing as100 in batch processing e Error messages warning messages and messages deriving from the directive command ASSERT are output however Description rule This command option can be specified at any position on the command line Description example gt as100 sample If processing of sample resulted in generating an
123. hyphen when entering a command option 42 This section explains the method for operating as100 to utilize its functions The basic function of as100 is to generate a relocatable module file from the assembly source file Command Parameters The table below lists the command parameters of as100 Parameter name Function Source file name Source file name to be processed by as100 Disables message output to a display screen ALIGN2 Specify alignment correction values ALIGN8 C Indicates contents of command lines when as100 has invoked macro processor programmable sound field processor and assemble processor D Sets constants to symbols finfo Generates inspector information F Fixes the file name of FILE expansion to the source file name H Header information is not output to an assembler list file l Specify an include file search directory JOPT Optimizes the branch instruction referencing the global label L Generates an assembler list file N Disables output of macro command line information O Specifies a directory to which the generated file is output PSFP Starts the programmable sound field processor S Specifies that local symbol information be output T Generates an assembler error tag file V Indicates the version of the assembler system program Rules for Specifying Command Parameters Follow the rules described bel
124. ifies the src value in data size of word to op2 INXRL src Modifies the src value in data size of long word to op2 INXBB src Modifies the src value in data size of byte to op1 and op2 INXBW src Modifies the src value in data size of word to op1 and op2 INXBL src Modifies the src value in data size of long word to op1 and op2 Definition of terms src src addressing specifiable in INDEX type instructions op1 The first operand irrespective of the number of operands that can be specified in an instruction op2 The last operand irrespective of the number of operands that can be specified in an instruction Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e For src write src of an INDEX type instruction Description example Output by compiler processed by assembler inxlw RO index1 w RO abs w 1122h abs w 1122h inxlw RO index1 w RO mov w 1122h 3344h inxrw RO mov w 1122h 3344h inxbw RO mov w 1122h 3344h mov w 1122h 3344h index2 w RO mov w 1122h 3344h indexb w RO mov w 1122h 3344h Assumes a LBBA register value Function e Assumes a LBBA register value e During assemble execution the LBBA register value is assumed to be the value defined by this directive command as the code for the subsequent lines are generated e The following instructions can be written in the lines that follow 1 ADA LDA MEAN and STA instructions
125. ike D symbol name value symbol name value and so on e No space or tab can be entered in front or after the colon Description example e This example sets 1 to symbol name gt as100 Dname 1 sample e This example sets 1 to symbols name and symbol gt as100 Dname 1 symbol 1 sample e This example defines a symbol named name for files sample1 and sample2 gt as100 Dname 1 sample1 sample2 Generates inspector information Function e Outputs either each item of information generated by the finfo option in NC100 or inspector information described in assembler directives to a relocatable module file Description rules e You can put this option anywhere in a command line e Use lowercase letters only since uppercase letters and lowercase letters are discriminated Description example gt as100 L S finfo sample 47 Controls FILE Expansion Function e This option fixes the file name to be expanded by the directive command FILE to the assembly source file name that is specified from the command line Description rule e This option can be specified at any position on the command line Description example gt as100 F sample The file name to be expanded by the directive command FILE described in the include inc file that is included by the sample a30 assembly source file is fixed to sample If this option 1s not specified the file name to be expanded by FILE becomes include Disab
126. ile is the same format as that of the assembler list file except that location information is converted into absolute address information File name of absolute list file The file name of the absolute list file is derived by changing the extension of the assembler list file lst to als sample lst gt sample als Directory for absolute list file generated If command option O is specified the absolute list file is generated in that directory Otherwise the file is generated in the current directory 40 This section explains the basic method for operating each program included with AS100 Precautions on Entering Commands e Use the MS DOS prompt to input a command e AS100 allows use of the period in only one place of a file name Structure of Command Line Input the following information on a command line Program Name This is the name of a program you want to use Command Parameter All information necessary to execute a program correctly is called command parameters For example command parameters include the file names to be processed by the program you are going to start up and the command options that indicate program functions using symbols Command parameters include the following information File name This means the name of a file to be processed by the program started up Command option Specify command options on the command line to use the functions of AS100 programs 41 Rules for Entering Co
127. in the library file with that of a relocatable module file with which you want to be updated Then if the date of the relocatable module file is newer than that of the module the software updates it Description rule e Input this option using a form like U library file name relocatable module file name e Always be sure to insert a space between this option and the library file name and between the library file name and the relocatable module file name e Multiple relocatable module names can be specified In this case always be sure to insert a space between each module name Description example gt lb100 U new sample1 Only when the created date of module samplel in the new lib file is older than that of the samplel r30 file of the same name the content of samplel is updated with the content of the sample1 r30 file Indicates Version Number Function e The software outputs the version number of Ib100 to the screen If this option is specified all other parameters on the command line are ignored Description rule e Specify this option only and nothing else Description example gt Ib100 V 103 Extracts Module Function e The software extracts a relocatable module from the library file as a relocatable module file The library file is not modified by this operation The created date of the relocatable module file thus extracted is the date when it was extracted from the library file e Ifa file of the
128. ion is executed by as100 Index instruction control directive commands These commands control code generation for the INDEX type instructions that modify the addressing modes of the next instructions Link control directive commands These commands allow you to define information necessary to control address relocation List control directive commands These commands allow you to control the format of list files generated by as100 Branch optimization control directive commands These commands allow you to specify that as100 selects the most suitable branch instruction Conditional assemble control directive commands These commands allow you to select blocks for which code is generated according to conditions set when assembling the source program Extended function directive commands These commands allow you to control the operations that are not listed above Directive commands output by R32C 100 series tool software These directive commands and operands all are output by the R32C 100 series tool software The directive commands output by the R32C 100 series tool software cannot be written in a source program by the user 124 List of Directive Commands The table below lists the directive commands available with AS100 The following pages explains rules for writing directive commands for each type of directive command Address control ORG Declares address BLKB Allocates RAM area in units of 1 bytes BLKW Allocates RAM area i
129. ip s ROM area depending of how files are linked When linking files be sure to check the addresses in the actual chip to ensure that sections are allocated correctly Unit of Address Management Section AS100 manages addresses in units of sections Separations of sections are defined as follows e An interval from the line in which directive command SECTION is written to a line preceding the line where the next SECTION is written e An interval from the line in which directive command SECTION is written to the line where directive command END is written Start and end of a section One section begins from a line where the section is defined and continues to the end of the source file the line where directive command END is written or a line where another section is defined SECTION ram DATA start of ram section work BLKB 10 end of ram section SECTION program CODE start of program section JSR sub1 end of program section SECTION subroutine start of subroutine section subi NOP MOV W work RTS end of subroutine section END End of Source 12 Type of Section You can set a type for a section in which units addresses are controlled by AS100 The instructions that can be written in a section vary with its type CODE program area e This area is where a program is written e All commands except directive commands to allocate a memory area can be written here e Specify that CODE type sections
130. is being processed by as100 i e assembly source file or include file Precautions The file name that can be read in by this directive command is a file name with its extension and path excluded If command option F is specified FILE is fixed to an assembly source file name that is specified in the command line If this option is not specified the command denotes the file name where FILE is written Description format FILE Rules for writing command This command can be written in the operands of directive commands ASSERT and INCLUDE Description example ASSERT sample gt FILE If the assembly source file name is sample a30 a message is output to the sample file INCLUDE FILEO inc If the assembly source file name is sample a30 the sample inc file is included INCLUDE sample gt FILE mes If the above line is written in incl inc that is included with the sample a30 file a character string normally is output to incl mes If command option F is specified a character string is output to the sample mes file 129 Indicates number of actual parameter of macro call Function e This command indicates the number of macro call actual parameters e This command can be written in the body of a macro definition defined by MACRO Precaution If this command is written outside the macro body defined by MACRO its value is made 0 Description format MACPARA Rules for writi
131. is referenced gt In100 sample1 LD work L lib lib1 71 Specify the assignment of section Function e Specifies the address in which the specified section is written e Value of symbols in specified section is generated from the address specified by directive command ORG or specified by command option ORDER e This option is for applications that run a program on the RAM e The information of specified section is outputted to mapfile generated by In100 as SECTION LOC or LOCR Precaution 1 It is possible that the program relocated by specification of ALIGN will not operate normally Therefor when using the LOC option relocate a section whose beginning address is even to an even address and one whose beginning address is odd to an odd address 2 The only function of the LOC option is to register the defined program to the specified address It does not send the program to the address area during execution of the application 3 This option cannot be specified in combination with the LOCR option Description rule This command option can be specified at any position in the command line A space is required between the option name and parameter No space is allowed before and after the The address cannot be omitted When writing multiple section names and location addresses separate each entry with a comma Description example This example shows a case where as depicted in the di
132. ited Note that if you open or edit this file with an editor file processing in the subsequent stages will not be performed normally 32 File name of absolute module file The file name of the absolute module file normally is created by changing the extension r30 of the relocatable module file that is entered first from the command line into x30 sample r30 gt sample x30 If you specify a file name using command option O the file is generated in specified name Directory for absolute module file generated The absolute module file normally is generated in the current directory If you specify a path in the file name of command option O the absolute module file is generated in the directory of that path Map File Only when you specify command option M MS or MSL 1n100 outputs link information on last allocated section address and symbol information to a map file Symbol information is output only when you specify command option MS or MSL Format of map file The information below is output to a map file sequentially in a list form The output format of a typical map file is shown in Example of Map File 1 Link information This information includes command lines relocatable module file names and the dates when the relocatable module files directive command ID and VER were created Section information This information includes the relocated section names attributes types store addresses
133. l operator in the conditional expression e The operators listed below can be used Relational operators Contents gt True if value on left side of operator is greater than value on right side lt True if value on right side of operator is greater than value on left side gt True if value on left side of operator is equal to or greater than value on right side lt True if value on right side of operator is equal to or greater than value on left side True if values on left and right sides of operator are equal l True if values on left and right sides of operator are not equal Arithmetic operation of a conditional expression is performed in signed 32 bits Precaution The assembler does not care whether the operation has resulted in overflow or underflow e Asymbol can be written in the left and right sides of the relational operator Precaution Symbols cannot be forward referenced only the symbols that are defined after this directive command are referenced Forward referenced symbols or undefined symbols written here are assumed to be 0 in value as the assembler resolves the conditional expression e An expression can be written on the left and right sides of the relational operator To write an expression follow the rules for writing expression in Section 1 Rules for Writing Program e A character string can be written on the left and right sides of the relational operator Always be sure to enclose the
134. le e Input this option using a form like O directory name e No space or tab can be entered between this option and the directory name Description example gt abs100 sample Oabslist The absolute list file is generated in the abslist directory under the current directory 108 Indicates Version Number Function e The software indicates the version number of the absolute lister Precaution If this option is specified all other parameters on the command line are ignored Description rule e Specify this option only and nothing else Description example gt abs100 V Error Messages of abs100 Can t create file filename The file filename cannot be created Check the directory information Can t open file filename The file filename cannot be opened Check the file name Can t write in file filename Data cannot be written to the file filename Check the permission of the file Command line is too long The command line contain too many characters Re input the command correctly Error information is in filename The file filename contains error information Regenerate the assembler list file Illegal file format filename The file format of filename is illegal Check the file name Input files number exceed 80 The number of input files exceeds 80 Re input the command Not enough disk space Disk capacity is insufficient Check the disk information
135. le header output to an assembler list file Function e Header information is not output to an assembler list file Precaution When generating an assembler list file to be processed by abs100 do not specify this option Description rule e This option can be written at any desired position in a command line e Specify this option simultaneously with the command option L Description example e Header information is not output to the sample st file gt as100 L H sample Specify an include file search directory Function e The include file specified by INCLUDE that is written in the source file is searched from a specified directory Description rules e This option can be written at any desired position in a command line e Specify a directory path immediately after l e No space or tab can be inserted between this option and a directory path name Description example e The include file written in the operand of a directive command INCLUDE is searched from the work include directory gt as100 l work include 48 Optimizes the branch instruction referencing the global label Function e This option is used to optimize the branch instructions JMP amp JSR that are making reference to the global label Precautions When this option is specified always specify the nc100 OGJ Oglb_ mp and In100 JOPT options When this option was specified the branch information file extent jin is gen
136. le mot Directory for Motorola S file generated The files are generated in the current directory Format of Motorola S Shown below is the Motorola S format E 2 al 4 5 6 1 Start mark This mark indicates the start of a record 2 Record type This indicates the type of record 0 Header record Data record When the load address is 0 to FFFF Data record When the load address is 10000 to FFFFFF Data record When the load address is 1000000 to FFFFFFFF End record for record type 3 End record for record type 2 End record for record type 1 3 Code count The code count is indicated as a two digit hexadecimal code This value is half of the total number of characters in 4 to 6 oontwnr 35 4 Load Address This indicates the address where the data is stored Depending on the record type digit number number of characters can be 4 6 or 8 The number of characters for each record type is shown below Record type number of characters 1 or 9 4 2 or 8 6 3 or 7 8 5 Data This indicates registered data One byte of data is indicated as a two digit hexadecimal code 6 Checksum This adds up everything from the code count to the data 3 to 5 as a hexadecimal number and indicates the eight low order bits of 1 s compliment of that value Intel HEX Format Only when you specify command option H Imc100 generates an Intel HEX format file that can be progr
137. list file R32C 100 SERIES ASSEMBLER SOURCE LIST Mon Mar 25 115 00 00 2005 PAGE 002 SEQ LOC OBJ OXMSDA SOURCE STATEMENT 7 8 e Address definition line Indicates the line in which location addresses are defined using the directive command ORG 11 SECTIONRAM DATA 12 00000400 ORG 000400h e Area definition line Indicates the line in which areas are defined using the directive commands BLKB BLKW BLKA BLKL BLKF and BLKD 55 SECTION ram1 data 56 00000000 00000001H work1 BLKB 1 57 00000001 00000001H work2 BLKB 1 58 00000002 00000002H work3 BLKW 1 59 00000004 00000002H work4 BLKW 1 e Comment line This line is where only comment are described 12 pose poss soe eer sssssressscsssecssss 13 Macro define e Symbol definition line Indicates the line in which symbols are defined using the directive command EQU Sere Tre a 65 00000001h sym1 EQU 1 66 00000002h sym2 EQU 2 67 00000003h sym3 EQU sym1 sym2 e Bit symbol definition line Indicates the line in which bit symbols are defined using the directive command BTEQU 62 1 00000000h flagi BTEQU 1 0 63 2 00000000h flag2 BTEQU 2 0 e Constant data definition line Indicates the line in which data are set in the ROM area using the directive commands BYTE WORD ADDR LWORD FLOAT and DOUBLE 175 0000003E 41 M BYTE A 176 0000003F 42 M BYTE B 177 00000040 43 M BYTE C 178 00000041 44 M BYTE D e Macro
138. lly is omitted e The as100 assembler performs optimum selection for mnemonics where instruction format specifiers are omitted e If instruction format specifiers are omitted as100 first determines the addressing mode 18 before it selects the instruction format When addressing mode specifier is omitted If addressing mode specifiers are omitted as100 selects the most suitable code in the following manner e In cases of addressing with displacement if the displacement value is determined when assembled the most suitable addressing mode is selected e f directive command SB is defined an 8 bit or a 16 bit SB relative addressing mode hereafter called SB relative is selected depending on condition f directive command FB is defined an 8 bit FB relative addressing mode hereafter called FB relative is selected depending on condition The next page shows the condition under which one of the two addressing modes above is selected Selection of SB relative SB relative is selected when the following conditions are met Precaution The SB register value must always be set using directive command SB before SB relative addressing can be used When an operand value is determined when assembling the source program and the determined value is in an addressing range in which SB relative can be selected The SB relative selectable address range is a range in the result added 0 to 255 or 0 to 65535 to value of the 16 bit regi
139. locatable module files can be specified In this case always be sure to insert a space between each file name e Adirectory path can be specified in the file name If no directory is specified the files residing in the current directory are processed 99 Command options e Command options are not case sensitive They can be entered in uppercase or lowercase e At least one of the command options A C D L R U or X must always be specified when executing the librarian If none of these options is specified on the command line or two or more of them are specified simultaneously lb100 outputs an error Command File e The librarian allows you to specify a command file name that contains description of input parameters e Refer to the Method for Operating In100 for details on how to specify a command file Ib100 Command Options The following pages describe rules you need to follow when specifying command options Disables Message Output to Screen Function e The software does not output messages when Ib100 is processing e Error messages are output to screen Description rule e This option alone can be specified in combination with some other options e This option and other options can be specified in any order Description example gt lb100 A new sample2 Adds Modules to Library File Function e The software adds a relocatable module to an existing library file e If the specifie
140. low lists the types of files input for AS100 and those output by AS100 Any desired file names can be assigned However if the extension of a file name is omitted AS100 adds the extension shown in _ in the table below by default as100 Input Files Output Files Source file a30 Include file inc Relocatable module file r30 Assembler list file Ist Assembler error tag file atg Branch Information file jin In100 Input Files Output Files Relocatable module file r30 Library file lib Branch Information file jin Absolute module file x30 Map file map Linkage error tag file ltg Imc100 Input Files Output Files Absolute module file x30 Motorola S format file mot Intel HEX format file hex ID file id lb100 Input Files Output Files Relocatable module file r30 Library file lib Relocatable module file r30 Library list file Ils abs100 Input Files Output Files Absolute module file x30 Assembler list file Ist Absolute list file als 27 Relocatable Module File A relocatable module file is one of the files generated by as100 This file is linked by 1n100 to generate an absolute module file Format of relocatable module file The relocatable module file generated by as100 is based on the IEEE 695 format Precaution Since this file comes in a binary format it
141. m operation cannot be guaranteed The following describes the types of names you can define in your program Label Function e This is a name assigned to a specific address in the range of addresses that can be accessed by the CPU Rules for writing e Alphabets numerals and the underline can be used for this name e Numerals cannot be used at the beginning of this name e When defining a name always be sure to add the colon at the end of the name Defining method e There are two methods to define a label 1 Allocate a memory area with a directive command Example flags BLKB 1 work BLKD 1 2 Write a name at the beginning of a source line Example namel _name sym_name Referencing method e Write a name in the operand of a mnemonic Example JMP sym_name Symbol Function e Thisisa name assigned to a constant Rules for writing e Numeric values must be a determined value when assembling the source program e Alphabets numerals and the underline can be used for this name e Numerals cannot be used at the beginning of this name e This name can be defined outside the range of sections Defining method e To define a symbol use a directive command that is used for defining numeric values Example value1 EQU 1 value2 EQU 2 Referencing method e Write a symbol in the operand of an instruction Example MOV W RO value1 value3 EQU value2 1 Bit symbol Function e This is a name a
142. mbol make sure that the value of the expression is a valid value when your program is assembled Description example JMP B 5 Precaution When writing an address in a branch instruction operand using a location symbol for offset be sure to write the addressing mode jump distance and instruction format specifiers for all mnemonics at locations from that instruction to the jump address Lines The as100 assembler processes the source program one line at a time Lines in the source program are classified into the following types depending on the contents in that line Directive command line e This line is where as100 s directive command is written e Only one directive command can be written in one line e Comments can be written in the directive command line Precaution You cannot write a directive command and a mnemonic in the same line Assembly source line e This line is where a mnemonic is written e Comments can be written in the assembly source line e A label name can be written at the beginning of the assembly source line Precautions You cannot write two or more mnemonics in one line You cannot write a directive command and a mnemonic in the same line Label definition line e This line is where only a label is written Comment line e This line is where only a comment is written Blank line This line contains only space tab or line feed code Rules for Writing Lines Separation of lines Lines ar
143. mmand Line When starting up each AS100 program observe the rules for entering a command line described below Number of Characters on Command Line e The number of characters that can be entered on a command line is 2048 characters bytes Precaution The number of characters may be limited below the above specification depending on the operating environment type of OS of AS100 Method for Entering Command Line e Always be sure to enter space between the startup program name and the file name e Always be sure to enter space between the file name and each command option File Name e The maximum length of a file name is 512 characters bytes including directory specification However the number of characters on a command line must not exceed the abovementioned size including the startup program name and all command options e Descriptions of file names are subject to the naming conventions of the PC and workstation OS in addition to the above rules Refer to the user s manual of your OS for details Precaution Although workstations permit you to use a file name that is separated by the period in two or more places this does not apply when using AS100 AS100 allows use of the period in only one place of a file name Furthermore some AS100 programs restrict file name extensions characters following the period also Refer to the method for starting up each AS100 program for details Command option e Always be sure to add a
144. module file e System label information can also be output a relocatable module file by adding M to this option e Absolute module files generated from the relocatable module file that was generated after specifying this option can be symbolic debugged even for local symbols Precaution The map file map output by In100 provides information on symbolic debuggable symbols and labels so you can confirm Description rule e f you want system label information and local label information to be output simultaneously be sure to input this option as SM e This option can be specified at any position on the command line Description example e Local symbol information in sample a30 is output to sample r30 gt as100 S sample e Local symbol information and system label information in sample a30 is output to sample r30 gt as100 SM sample Generates Assembler Error Tag File Function e The software generates an assembler error tag file when an assembler error is found The file is output in a format where you can use an editor s tag jump function e Even when you have specified this option no file will be generated if there is no error e The software does not generate a relocatable module file if an error is encountered However it does generate a relocatable module file in cases when only a warning has occurred The error tag file name is created from the assembly source file name by changing its extension to atg D
145. n MSL is specified The software generates a map file that contains address mapping information and symbol information The file name of the map file is created by changing the extension of the absolute module file to map Description rule e This option can be specified at any position on the command line Description example gt In100 sample1 sample2 MS A sample1 x30 and samplel map files are generated Set the data bus width when started in microprocessor mode Function e Set the data bus width when started in microprocessor mode The value is embedded in the 2 low order bits of the reset vector table e l a map file generation option is specified the data bus width is output to a map file Option Function The embedded value MPB8 Sets the data bus width when started in microprocessor mode 11 to BYTE 8 bits MPB16 Sets the data bus width when started in microprocessor mode 10 to BYTE 16 bits MPB32 Sets the data bus width when started in microprocessor mode 00 to BYTE 82 bits Precaution This option is used to specify the data bus width and not used to select processor mode The message shown below is output at completion of link The data bus width in microprocessor mode starting is XXXX e lf as a result to link the value in the 2 low order bits of the reset vector table is other than 00 this option is ignored and the message shown below is out
146. n Order Function e Specify the order in which you want sections to be allocated and the start address of sections Precaution If the start address is specified for an absolute section In100 outputs an error e lf you do not specify the start address In100 allocates addresses beginning from 0 e f sections of the same name exist in the specified relocatable files sections are allocated in the order the files are specified In this case if a section with absolute attribute is arranged after a section with relative attribute an error results When the name of the section not existing is specified the section name is disregarded Description rule e Input this option using a form like ORDER section name section name or ORDER section name start address e Always be sure to insert a space between this option and the section name Separate between two section names or between an address value and a section name with a comma as you specify them There must be no space or tab before or after the comma This option can be specified at any position on the command line Description example gt In100 sample1 sample2 ORDER main sub dat 1 gt In100 sample1 sample2 ORDER main 0f0000 sub dat 2 1 Sections are allocated in order of main sub and dat beginning from address 0H 2 Sections are allocated in order of main sub and dat beginning from address Of000H If the name of the section not existing noprog i
147. n be written in the operand e Macro definition and macro call can be written in the body e Directive command EXITM can be written in the body Description example rep MACRO num MREPEAT num AF num gt 49 EXITM ENDIF NOP ENDR ENDM rep 3 NOP NOP NOP Controls optimization Function e This command controls optimization of unconditional branch instructions e A jump distance can be specified for unconditional branch instructions or subroutine call instructions where the jump distance specifier is omitted and the operand is not subject to optimization processing e The specified contents become effective beginning with the line following one in which this directive command is written Optimization specification by this directive command can be entered for multiple instances in one assembly source file Precaution When the nc100 OGJ Oglb_jmp or as100 JOPT option was specified this directive command is disregarded Description format OPTJ OFF ON JMPW JMPA JSRW JSRA Rules for writing command e The following three parameters can be written in the operand of this directive command 1 Optimization control of branch instruction 2 Selection of unconditional branch instruction excluded from optimization processing 3 Selection of subroutine call instruction excluded from optimization processing The following contents can be written in each parameter 1 OFF Branch instru
148. n can be entered outside the range of a section Any instructions you can write in source programs can be written in the macro body Precaution Bit symbols cannot be written in the macro body Macro formal parameters up to 80 arguments can be written Macro local labels can be written for up to a total of 65 535 labels in one assembly source file 21 Macro Local Labels e The labels defined with directive command LOCAL are made macro local labels e Macro local labels can be used in only macro definition e The label names declared to be macro local labels are allowed to be written in places outside the macro with the same name e The labels you want to be used as macro local labels must first be declared to be a macro local label before you define the label Macro Call Macro call can be accomplished by writing a macro name that has been defined with directive command MACRO e Code for the macro body is generated by macro call Macro names cannot be forward referenced i e you cannot call a macro name that is defined somewhere after the line where macro call is written Always make sure that macro definition is written in places before the macro call line Macro names cannot be externally referenced i e you cannot call a macro name that is defined in some other file If you want to call the same macro from multiple files define the macro in an include file and include it in your source file The content of
149. n data size of word to op2 INXRL Modifies the src value in data size of long word to op2 INXBB Modifies the src value in data size of byte to op1 and op2 INXBW Modifies the src value in data size of word to op1 and op2 126 INXBL Modifies the src value in data size of long word to op1 and op2 Link control SECTION Defines section name GLB Specifies global label BTGLB Specifies global bit symbol VER Transfers specified information to map file List control LIST Controls outputting of line data to list file PAGE Breaks page at specified position of list file FORM Specifies number of columns and lines in 1 page of list file Branch instruction optimization control OPTJ Controls optimization of branch instruction and subroutine call instruction Conditional Assemble Control JF Indicates the beginning of a conditional assemble block Conditions are resolved LIF Resolves the second and the following conditions ELSE Indicates the beginning of a block to be assembled ENDIF Indicates the end of a conditional assemble block Extended Function Directive Commands ASSERT Outputs a character string written in the operand to a standard error output device or file Specifies defining and referencing a temporary label FILE Indicates the assembly source file name being processed by as100 Concatenates character strings entered before and after into a single character string 127
150. n on the results of source line processing performed by as100 Specifically this information contains the following 0 X M S D A Contents Indicates the include file s nest level Indicates that this line was not assembled in condition assemble Indicates that this is a macro expansion line Indicates that this is a macro definition line Indicates that jump distance specifier S was selected Indicates that jump distance spedifier B was selected Indicates that jump distance spedifier W was selected Indicates that jump distance spedifier A was selected Indicates that zero form Z was selected for the instruction format Indicates that short form S was selected for the instruction format O N NN gt lt u 0 Indicates that quick form Q was selected for the instruction format Indicates that 8 bit or 16 bit displacement SB relative addressing mode was selected Indicates that 8 bit or 16 bit displacement FB relative addressing mode was selected Indicates that an alternate instruction is selected for a conditional branch instruction 5 Source line information SOURCE STATEMENT Outputs the assembly source line 29 Information in assembler list file The following information is output to an assembler list file Header information The information listed below is output at the beginning of each page of the assembler
151. n the directive command and the operand e A label and symbol can be written in the operand e Always be sure to set the SB register value with directive command SB before you write this directive command e When specifying multiple names be sure to separate the names with a comma as you write them Description example Example1 SB 400H SBSYM sym MOV B 0 sym Example2 In the following case the 8 bit SB relative addressing mode is not selected for sym2 SB 400H SBSYM sym1 sym2 EQU sym1 1 MOV B 0 sym2 Selects 16 bit SB relative addressing mode Function e The assembler selects the 16 bit SB relative addressing mode for the name specified in the operand of this directive command e A 16 bit SB relative addressing mode is selected for the expression of a 24 bit address 0 relative addressing mode including the name specified in the operand of this directive command Precaution The 16 bit SB relative addressing mode is not selected for the symbols that are defined by using the label name specified by this directive command Description format SBSYM16 name SBSYM16 name name Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e A label and symbol can be written in the operand e Always be sure to set the SB register value with directive command SB before you write this directive command When specifying multiple names be sure to sep
152. n units of 2 bytes BLKA Allocates RAM area in units of 3 bytes BLKL Allocates RAM area in units of 4 bytes BLKF Allocates RAM area in units of 4 bytes BLKD Allocates RAM area in units of 8 bytes BYTE Stores data in ROM in 1 byte length WORD Stores data in ROM in 2 byte length ADDR Stores data in ROM in 3 byte length LWORD Stores data in ROM in 4 byte length FLOAT Stores data in ROM in 4 byte length DOUBLE Stores data in ROM in 8 byte length FIXED Stores a fixed point number data in ROM in 4 byte length ALIGN Corrects odd addresses to even addresses 125 Assemble control EQU Defines symbol BTEQU Defines bit symbol END Declares end of assemble source SB Assigns temporary SB register value SBSYM Selects SB relative displacement addressing mode SBSYM16 Selects 16 bit SB relative displacement addressing mode SBBIT Selects SB relative displacement addressing mode for bit symbol FB Assigns temporary FB register value FBSYM Selects FB relative displacement addressing mode INCLUDE Reads file into specified position LBBA Assigns temporary LBBA register value INDEX instruction control INXLB Modifies the src value in data size of byte to op1 INXLW Modifies the src value in data size of word to opl INXLL Modifies the src value in data size of long word to op1 INXRB Modifies the src value in data size of byte to 0p2 INXRW Modifies the src value i
153. ne is too long The command line contains too many characters Create a command file DEBUG information mismatch in file Some file whose format version of relocatable module file does not match that of other file is included Redo assembling using the latest assembler Error occured in executing xxx Error occurred in executing xxx Check the error message of xxx Illegal file extension xxx is used The file extension xxx is illegal Specify a correct file extension Illegal format file The format of the file file is illegal Check to see that the relocatable file is one that was created by as100 Illegal format file expression error occurred The format of the file file is illegal Check to see that the relocatable file is one that was created by as100 Illegal format file it s not jin file The format of the file file is illegal That is not a branch information file jin Check to see that the branch information file is one that was created by as100 Illegal format file it s not library file The format of the file file is illegal That is not a library file Check to see that the library file is one that was created by 1b100 86 Illegal format file it s not relocatable file The format of the file file is illegal That is not a relocatable file Check to see that the relocatable file is one that was created by as100 Interrupt number X is mul
154. nesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office eq
155. ng Operands Position to write an operand Always be sure to insert a space or tab between the operand and the instruction that has the operand The following describes rules on each type of operand you need to follow when writing an operand Numeric value A numeric value includes an integral and a floating point number Integer An integer can be written in decimal hexadecimal binary or octal notation The table below shows how to write each type of integer e Binary Write a number using numerals O to 1 and add B or b at the end of the number Example 10010001B 10010001b e Octal Write a number using numerals 0 to 7 and add O or o at the end of the number Example 607020 607020 e Decimal Write a number using numerals 0 to 9 Example 9423 e Hexadecimal Write a number using numerals 0 to 9 and alphabets A to F and add H or h at the end of the number However if the number begins with an alphabet be sure to add a zero 0 at the beginning of the number Example OA5FH 5FH Oadfh 5fh Floating point number The following range of values can be entered that are represented by a floating point number FLOAT 32 bits long 1 17549435 x 10 38 to 3 40282347 x 1038 DOUBLE 64 bits long 2 2250738585072014 x 10 308 to 1 7976931348623157 x 10308 Precaution Floating point numbers can only be entered for the operands of directive commands DOUBLE and FLOAT Example 3 4E35 3 410 3 4e 35 3 410 5E20 0 51
156. ng command This directive command can be written as a term of an expression Description example The assembler checks the number of macro actual parameters as it executes conditional assemble GLB mem name MACRO f1 f2 AF MACPARA 2 ADD W f1 f2 ELSE ADD W RO f1 ENDIF ENDM name mem ELSE ADD W RO mem ENDIF ENDM Indicates how many times repeat macro body is expanded Function e This command indicates how many times the repeat macro is expanded e This command can be written in the body of a macro definition defined by MREPEAT Precaution If this command is written outside the macro body its value is made 0 e This command can be written in the conditional assemble operand Description format MACREP Rules for writing command e This directive command can be written as a term of an expression Description example MREPEAT 3 MOV W RO MACREP ENDR MOV W RO 1 MOV W RO 2 MOV W RO 3 GLB mem melr MACRO value name MREPEAT value MOV W 0 name MACREP ENDR ENDM melr l 3 mem MREPEAT 3 MOV W 0 mem 1 MOV W 0 mem 2 MOV W 0 mem 3 ENDR ENDM Stores data in ROM in 3 byte length Function e This command stores 3 byte long fixed data in ROM e Label can be defined at the address where data is stored Description format ADDR numeric value name ADDR numeric value Rules for writing command e Write an integral value in the operand Always be sure to insert spac
157. ng out of such applications 9 You should use the products described herein within the range specified by Renesas especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges 10 Although Renesas endeavors to improve the quality and reliability of its products IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Please be sure to implement safety measures to guard against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other applicable measures Among others since the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you 11 In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed the risk of accident such as swallowing by infants and small children is very high You should implement safety measures
158. ngle library file Command Parameters The table below lists the command parameters available for 1b100 Parameter name Function File name Relocatable module file name to be processed by Ib100 Disable message output to screen A Adds module to library file C Creates new library file D Deletes modules from library file L Generates library list file R Replaces modules U Updates modules V Indicates version of librarian X Extracts modules O Specifies command file Rules for Specifying Command Parameters Follow the rules described below when you specify command parameters for 1b100 Order in which to specify command parameters Always specify the command parameters for 1b100 in the following order If the command parameters are specified in an incorrect order 1b100 cannot process files correctly 1 Command option 2 Library file name 3 Relocatable module file name 10100 command option library file name relocatable module file name Library file name essential Always be sure to specify the library name e Adirectory path can be specified in the file name The extension lib can be omitted on the command line Relocatable module file name relocatable module name e Always be sure to specify a relocatable module file name e The extension of a relocatable module file name is r30 The extension can be omitted on the command line e Multiple re
159. ning no absolute module file is generated O Specifies command file 65 Rules for Specifying Command Parameters Follow the rules described below when you specify command parameters for 1n100 Order in which to specify command parameters e Relocatable module file names and command options can be specified in any desired order gt In100 command options relocatable module file gt In100 relocatable module file command options Relocatable module file name essential e Always be sure to specify at least one relocatable module file name e Apath can be specified in the file name e When specifying multiple relocatable module files always be sure to insert a space or tab between each file name Absolute module file name e Normally In100 creates the file name of an absolute module file from the relocatable module file that is specified first as it generates the absolute module file e Use command option O to specify an absolute module file name Library file name e Use command option L to specify the library file to be referenced A path can be specified in the file name e Library files are searched from the directory that is set in environment variable LIB100 If the relevant file cannot be found In100 searches the current directory Or if a directory is specified by command option LD In100 searches it and if no relevant file is found in this directory In100 searches the current directory Command
160. o definitions 65535 Character Set You can use the following characters when writing an assembly program to be assembled by AS100 Uppercase alphabets ABCDEFGHIJKLMNOPQRSTUVWXYZ Lowercase alphabets absdefghijklmnopqrstuvwxyz Numerals 0123456789 Special characters EE WE O GINA _ gt Blank Space Tab New paragraph or line Carriage return Line feed Precaution Always be sure to use en size characters when writing instructions and operands You cannot use multi byte characters e g kanji unless you are writing comments Assembler for R32C 100 Series abbreviated as AS100 is a software system that assists you at the assembly language level in developing control programs for the R32C 100 series of single chip microcomputers It converts source programs written in assembly language into files of source level debuggable format AS100 also includes a program that converts source programs into files of R32C 100 series ROM programmable format Furthermore AS100 can be used in combination with the C complier NC100 Configuration AS100 consists of the following programs Assembler driver as100 This program starts up macro processor and assembler processor in succession The assembler driver can process multiple assembly source files Macro processor This program processes macro directive commands in the assembly source and performs preprocessing for the assembler processor to generate an assembly so
161. ogram Pay attention to the following when writing a program to be assembled by AS100 e Do not use the reserved words of AS100 for names in your source program e The character strings consisting of AS100 directive commands which have had the periods removed can be used for names without causing an error However avoid using these character strings because some of them affect processing performed by AS100 e System labels the character strings that begin with written in your source program may not result in generating an error However avoid using system labels because some of them may be used for AS100 extension in the future Character Set You can use the following characters when writing an assembly program to be assembled by AS100 Uppercase alphabets ABCDEFGHIJKLMNOPQRSTUVWXYZ Lowercase alphabets abcdefghijklmnopqrstuvwxyz Numerals 0123456789 Special characters G S amp 4 5 4_ Blank Space Tab New paragraph or line Carriage retrn Line feed Precaution Always be sure to use en size characters when writing instructions and operands cannot use multi byte characters e g Kanji unless you are writing comments You Reserved Words AS100 handles the same character strings as directive assemble commands and mnemonics as reserved words These reserved words are not case sensitive so they are not discriminated between uppercase and lowercase Consequently ABS and abs are the same res
162. on LM when the assembler asi00 processed the source file that contains macro directive command e It is needed that header lines are output to assembler list file Operate asi00 without command option H Command Parameters The table below lists the command parameters available for abs100 Parameter name Function File name Assembler list or absolute module file name to be processed by abs100 Disables message output to screen D Specifies directory in which to search files O Specifies directory in which to output files V Indicates version of absolute lister Rules for Specifying Command Parameters Follow the rules described below when specifying command parameters Order in which to specify command parameters e Always be sure to specify command parameters in the order given below 1 Command option 2 Absolute module file name 3 Assembler list file name gt abs100 command option absolute module file name assembler list file name File name of absolute module file essential e Always be sure to specify the absolute module file name e Apath can be specified in the absolute module file name e The extension x30 can be omitted File name of assembler list file Multiple assembler list files can be specified by separating them with a space or tab A path can be specified in the assembler list file name The file attribute can be omitted e e e e The assembler list file name can
163. one Specify Warning message Section alignment is not corrected Specify Specify Address is corrected 2bites aligned ALIGN8 None Specify Warning message Section alignment is not corrected Specify Specify Address is corrected 8bites aligned Description format ALIGN Rules for writing command This directive command can be written in a section that falls under the conditions below 1 A relative attribute section in which address correction is directed when defining the section SECTION program CODE ALIGN 2 An absolute attribute section SECTION program CODE ORG OfffOO000H e f this command is written in a section those location attribute is relative and for which ALIGN is not specified in the SECTION directive command line the assembler displays a warning message Description example SECTION program CODE ALIGN MOV W 0 RO ALIGN END SECTION program CODE ORG OfffO0O000H MOV W 0 RO ALIGN END Source SECTION count ROMDATA ALIGN Address 00000000 Code 010000 00000004 Output a character string written in the operand Function e This command outputs a character string written in the operand to a standard error output device when assembling the source program e fa file name is specified the character string written in the operand is output to the file e With an absolute path given to the file name AS100 generates the file in the given directory
164. option symbol type of floating point is not supported Floating point representation of the symbol type is not supported If this error occurs please contact tool support personnel Wrong value is specified by option loc There is a wrong in the address which was specified by loc Confirm the precaution of loc Zero division exists in the expression Expression for relocation data calculations contain a divide by 0 operation Rewrite the expression correctly Warning Messages of In100 e option parameter symbol is undefined The symbol symbol specified with e is not defined yet Define symbol in the source program The program will be processed assuming values 0 CODE section section 1 is overlapped on the section 2 The CODE section section 1 overlaps section 2 The sections have been allocated overlapping each other Check to see if these sections are allowed to overlap 87 DATA section section 1 is overlapped on the section 2 2 The DATA sections section 1 and section 2 are overlapping Sections are located overlapping each other Check to see if the sections can be located at overlapping addresses ROMDATA section section 1 is overlapped on the section 2 The ROMDATA section section 1 overlaps section 2 _ The sections have been allocated overlapping each other Check to see if these sections are allowed to overlap label value exceed OFFFFFFFF
165. or is assumed If the start address of a section is specified to be located at the end of a specific section the start address of the section and that of its relocated destination are not checked for a match even or odd In this case if the section is specified with ALIGN its start address is corrected for alignment 3 The only function of the LOCR option is to register the defined program to the specified address It does not send the program to the address area during execution of the application 4 This option cannot be specified in combination with the LOC option 5 This option cannot be specified two times or more in the same file Description rule Make sure this option is entered in the form like LOCR section name section name or LOCR section name relocation address A space is required between the option name and parameter No space is allowed before and after the eo When writing multiple section names and location addresses separate each entry with a comma e This command option can be specified at any position in the command line Description example The specification method 1 LOCR prog1 0FFE00000 prog2 0FFE10000 The section prog is relocated beginning with the address FFE00000h The section prog is relocated beginning with the address FFE10000h The specification method 2 LOCR prog1 0FFE00000 prog2 prog3 The section prog is relocated beginning with the address FFE00000h
166. ow to specify the command parameters of as100 Order in which to specify command parameter e Command parameters can be specified in any desired order as100 assembly source file command option Assembly source file name essential e Always be sure to specify one or more assembly source file names e Apath can be specified for the assembly source file name e Up to 80 assembly source file names can be specified Precaution If any of the multiple assembly source files thus specified contains an error that file is not processed in the subsequent processing stages e Assembly source files with extension a30 can have their extensions omitted when you specify them 43 Command options e Command options can be omitted e Multiple command options can be specified e Some command options allow you to specify a character string or a numeric value Precaution Do not enter a space or tab between the command option and the character string or numeric value e If you want a subsequent command option to be nullified add two consecutive hyphens when entering that command option Precaution Command options can only be nullified in as100 Therefore this function cannot be used when starting up any other program Example e Option L only is valid as100 sample L e Option S only is valid as100 sample S e OptionS only are valid as100 sample L S L e OptionsL only are valid as100 sample S L S Met
167. pression in the operand must have its values determined when assembling the source program e When defining a label name in the allocated area be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example symbol EQU 1 SECTION area DATA work1 BLKF 1 work2 BLKF symbol BLKF symbol 1 Allocates RAM area in units of 4 bytes Function e This command allocates a specified bytes of RAM area in units of 4 bytes e Label name can be defined at the allocated RAM address Description format BLKL numeric value name BLKL numeric value Rules for writing command e This directive command must always be written in a DATA type section Section types can be made the DATA type simply by writing DATA following the section name when you define a section Always be sure to insert space or tab between the directive command and the operand Write an integral value in the operand A symbol can be written in the operand An expression can be written in the operand The expression in the operand must have its values determined when assembling the source program e When defining a label name in the allocated area be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example symbol EQU 1 SECTION area DATA work1 BLKL 1 work2 BLKL symbol BLKL symbol 1
168. priate The size specifier or format specifier is written incorrectly Rewrite the size specifier or format specifier correctly Size specifier is missing No size specifier is entered Write a size specifier 60 Source files number exceed 80 The number of source files exceeds 80 Execute assembling separately in two or more operations Source line is too long The source line is excessively long Check the contents written in the source line and correct it as necessary Special page number was already defined Special page number was already defined Change the special page number Statement not preceded by CASE or DEFAULT CASE or DEFAULT is preceded by a command line in the SWITCH statement Always be sure to write a command line after the CASE or DEFAULT statement String value exist in expression A character string is entered in the expression Rewrite the expression correctly Symbol defined by external reference data is defined as global symbol The global symbol used here is a symbol that is defined by external reference data Check symbol definition and symbol name Symbol definition is not appropriate The symbol is defined incorrectly Check the method for defining this symbol and rewrite it correctly Symbol has already defined as another type The symbol has already been defined in a different directive command with the same name You cannot define the same symbol name in
169. priority Description rule e Input this option using a form like VECT numeric value or label name Always be sure to insert a space between this option and the numeric value or label name Always be sure to use hexadecimal notation when entering a numeric value If the numeric value begins with an alphabet a to f always be sure to add O at the beginning of the value as you enter it Specify this option only and nothing else Description example gt In100 VECT stop sample1 sample2 1 gt In100 sample1 sample2 2 1 Sets the address of stop for the free area in generating the variable vector table 2 Sets the address of __ dummy_int for the free area in generating the variable vector table 82 Set the address value of a specified software interrupt number Function Set the address value of a specified software interrupt number Precautions When this option is specified a variable vector table is automatically generated For details about automatic setting of a variable vector table refer to the assembler directive RVECTOR If the software interrupt number specified in the assembler directive RVECTOR is specified in this option an error is assumed This option has priority over the VECT option Description rule Make sure this option is entered in the form like VECTN value or symbol name software interrupt number To specify multiple software interrupt numbers
170. ption Illegal format A StartAddr EndAddr The start and end addresses are not correctly set Check the start and end addresses e option is too long The array of e option parameters is excessively long Check the syntax for this option and rewrite it correctly F Option Illegal format F Data StartAddr EndAddr The start and end addresses are not correctly set Check the start and end addresses xxx option multiple specified The option xxx is specified twice or more Check the syntax for this option and rewrite it correctly Address specified by A option exceed output address The specified address is outside the range of data addresses registered in the absolute module file Make sure the address you specify is within the range of data addresses registered in the absolute module file Address specified by e option exceed OFFFFFFFFH The address specified with e option exceeds OFFFFFFFFh Rewrite the address value correctly Address specified by F option exceed output address The specified address is outside the range of data addresses registered in the absolute module file Make sure the address you specify is within the range of data addresses registered in the absolute module file Can t close file filename The file filename cannot be closed Check the directory information Can t create file filename The file filename cannot be created Check the directo
171. put The width of the bus of the microprocessor mode is invalid Description rule e This option can be specified at any position on the command line Description example gt In100 sample1 sample2 MPB16 76 Outputs All Errors Function e The software outputs all encountered link errors to the screen e If this operation is not specified the software outputs up to 20 errors to the screen Description rule e This option can be specified at any position on the command line Description example gt In100 sample1 sample2 NOSTOP Specifies Absolute Module File Name Function e This option allows you to specify any desired name for the absolute module file generated by In100 e f you do not specify an absolute module file name using this option the file name of absolute module file is created by changing to x30 the extension of the relocatable module file name that is specified first on the command line Description rule e Input this option using a form like O file name e Always be sure to insert a space between this option and the file name e The extension of a file name can be omitted If omitted the extension is x30 e Apath can be specified in the file name Description example e A abssmp x30 file is generated gt In100 sample1 sample2 O abssmp e A abssmp x30 file is generated in the work absfile directory gt In100 O work absfile abssmp sample1 sample2 Specifies Section Address and Relocatio
172. r value e When assembling the source program the assembler assumes that the FB register value is one that is defined by this directive command as it generates code for the subsequent source lines FB relative addressing mode can be specified in the subsequent lines e The assembler generates code in FB relative addressing mode for the mnemonics that use labels defined by directive command FBSYM Description format FB numeric value Rules for writing command e Always be sure to insert space or tab between the directive command and the operand e Always make sure that this command is written in the assembly source file Always be sure to write this command before you use the FB relative addressing mode e An integer in the range of 0 to OFFFFFFFFH can be written in the operand Precaution This directive command only directs the assembler to take on a provisional FB register value and cannot be used to set a value to the actual FB register To set an FB register value actually write the following instruction immediately before or after this directive command Example LDC 80H FB e Asymbol can be written in the operand Description example FB 80H LDC 80H FB Selects FB relative displacement addressing mode Function The assembler selects the FB relative addressing mode for the name specified in the operand of this directive command The assembler selects the FB relative addressing mode for the operand in absolute
173. rameters you write are corresponded one for one to the formal parameters when the macro is called e When using a special character to write a actual parameter be sure to enclose the character with double quotations as you write it e Labels global labels and symbols can be used to write actual parameters e Anexpression can be entered in a actual parameter Expanding actual parameter Formal parameters are replaced with actual parameters sequentially from left to right in the order they are written If no actual parameter is written in macro call that corresponds to a defined formal parameter the assembler does not generate code for this formal parameter part If there are more formal arguments than the actual arguments and some formal arguments do not have the corresponding actual arguments the assembler does not generate code for this formal argument part If a formal parameter written in the body is enclosed with single quotations the assembler encloses the corresponding actual parameter with single quotations as it is output If one actual parameter contains a comma while at the same time the argument is enclosed with parentheses the assembler converts the argument along with its parentheses e f there are more actual parameters than the formal parameters the assembler does not process the actual parameters that do not have the corresponding formal parameters Precaution If the number of actual parameters doe
174. referencible from an external file Description format GLB name GLB name name Rules for writing command Always be sure to insert space or tab between the directive command and the operand Write a label name in the operand that you want to be a global label Write a symbol name in the operand that you want to be a global symbol When specifying multiple symbol names in the operand separate each symbol name with a comma as you write them Description example GLB name1 name2 name3 GLB name4 SECTION program MOV W 0 name1 Set ID code for ID check Function Function e The specified ID code is stored as 8 bit data in ID store addresses e The specified value is output the map file and ID file e The value set to ID code is output also to the absolute module file x30 Precaution For details on the ID code check see the hardware manual of the microcomputer Description format ID ID code character string ID ID code numeric value Rules for writing command Always be sure to insert space or tab between the directive command and the operand The specified ID code is stored as an ASCII code Specify ID code character string within 7 letters Specify after the ID code value adds to the head ID code value is stored as the numerical value Specify ID code value by the integer value within 14 digits e This directive command can be described in the assembly sauce file only in
175. rent directory or the directory specified in environment variable LIB100 is referenced as necessary gt In100 sample1 sample2 L work lib1 The lib1 lib file in the work directory that resides below the current directory gt In100 sample1 sample2 L lib1 lib2 The lib1 l11b and lib2 lib files in the current directory or the directory specified in environment variable LIB100 are referenced as necessary 70 Specifies Library File Directory Function e Specify the directory name in which you want a library file to be referenced e Even when you specify this option you need to specify the library file name e The directory name specified by this option remains valid until another directory is specified by this option next time e f you have specified a path in the library file name the directory in which library files are referenced by In100 is one that is located by linking the library file path to the directory specified by this option Description rule e Input this option using a form like LD directory name Always be sure to insert a space between this option and the directory name e This option can be specified at any position on the command line Description example The work lib lib1 file is referenced gt In100 sample1 sample2 LD work lib L lib1 The work lib lib1 and work tmp lib2 files are referenced gt In100 sample1 sample2 LD work lib L lib1 LD work tmp L lib2 The work lib lio1 file
176. resses to be allocated by an area allocating directive command that is written in the lines immediately following this directive command are determined SECTION program i SECTION ram DATA ORG ORG 800H edo 8000H _ eae EE main work BLKB 3 3 byte area is allocated beginning with address 800H ROM RAM 8000 800 ae 801 a EEN 802 Description format ORG numeric value Rules for writing command e This directive command must always be written immediately after a section directive command Precaution If directive command ORG is not found in the line immediately following description of SECTION the section is assigned relative attribute e This directive command cannot be written in relative attribute sections e Always be sure to insert space or tab between the directive command and the operand e The values that can be written in the operand are a numeric value in the range of O to OFFFFFFFFH e An expression can be written in the operand However this expression must have its values determined when assembling the source program e A symbol can be written in the operand However this symbol must have its values determined when assembling the source program Precaution This directive command can not be written in relative attribute sections are specified by ALIGN specifying with SECTION directive command This directive command can be written for multiple instances within an absolute
177. rmined when assembled Value determined when assembled symbol 19 Example of Optimization Selection by as100 The examples below show the addressing modes optimum selected by as100 and how they are written in the source file Address register relative with 8 bit displacement Example sym1 EQU 11H ABS B sym1 1 A0 SB relative Example 1 sym2 EQU 2 sym3 EQU 3 SB 0 SBSYM sym3 MOV B ROL sym3 sym2 Example 2 SB 100H sym4 EQU 108H MOV B ROL sym4 SB Register Offset Description Programming with AS100 allows you to enter a description to specify an offset address from the SB register value Function Operation is performed on the address value specified by the directive command SB plus a specified offset value e Code is generated in SB relative addressing mode Rules for writing command This description can be entered for an operand where the SB relative addressing mode can be written e A label symbol or numeric value can be used to write the offset Description example sym1 EQU 1200H SECTIONP SB 1000H MOV B 0 sym1 SB MOV B 0 sym1 SB END SB register value 1000H AAA sym1 SB add 1000H to 200H II Ly sym1 SBregister value 1200H 1000H sym1 SB add 1200H to 1000 es 20 Macro Function This section describes the macro functions that can be used with AS100 The following lists the macro functions available for AS100 Macro function To use a macro function d
178. rt space or tab between the directive command and the operand e This directive command can be written for multiple instances in one conditional assemble block Description example AF TYPE 0 byte Proto Type Mode ELIF TYPE gt 0 byte Mass Production Mode ELSE byte Debug Mode ENDIF Indicates the beginning of a block to be assembled Function e When all conditions are false this command indicates the beginning of the lines to be assembled e In this case lines are assembled up to and not including the line where directive command ENDIF is written Description format AF conditional expression body ELSE conditional expression body ENDIF AF conditional expression body ELIF conditional expression body ELSE body ENDIF Rules for writing command e This directive command can be written less than once in a conditional assemble block e This directive command does not have an operand Description example AF TYPE 0 byte Proto Type Mode ELIF TYPE gt 0 byte Mass Production Mode ELSE byte Debug Mode ENDIF Declares end of assemble source Function e This command declares the end of the source program e The assembler only outputs the contents written in the subsequent lines after this directive command to a list file and does not perform code generation and other processing Description format END Rules for writing command e There must always be at least one
179. ry information Can t open file filename The file filename cannot be opened Check the file name Command line is too long The character string on the command line is excessively long Re input the command correctly Illegal file format filename is used The file format of filename is incorrect Check the filename Regenerate the file Invalid option option is used An invalid option option is specified Specify the option correctly again MCU information mismatch in file xx x30 The file information does not match the MCU information Specify an absolute module file generated by as100 or In100 Not enough memory Memory is insufficient Increase the memory capacity Option option is not appropriate The option is used incorrectly Check the syntax for this option and rewrite it correctly Unknown file extension xxx is specified The specified file extension xxx is incorrect Check the file name 97 Warning Messages of Imc100 filename does not contain object data The specified file does not contain object data Check the file name Address exceed OFFFFFFFFH The address exceeded OFFFFFFFFh Check the written contents of the source program Check to see how sections are located 98 This section explains the method for operating 1b100 to utilize its functions The primary function of 1b100 is to manage multiple relocatable module files as a si
180. s insufficient Increase the memory capacity Symbol name characters exceed 500 The symbol name consists of more than 500 characters Divide the library file Too many modules There are too many registered modules Divide the library file into two or more files Unknown file extension xxx is used The file extension xxx is incorrect Check the file name Warning Messages of Ib100 module is not registered in library The module module is not registered in the library Therefore no modules of the specified name were extracted Check the module name module is not registered in library can t output list file The module module is not registered in the library Information on this module was not output to a list file Check the module name module was created in the current directory The module module was created in the current directory Check the directory name you have specified Can t replace module is older than module in library The module module is older than the module in the library Therefore the library module was not replaced with it Check the created date of the relocatable file Precautions using abs100 e lf two or more same section declarations exist and the section is not output to the assembler list file by the directive command LSIT OFF in one assembly sourcefile a correct actual address might not be generated e Specify command opti
181. s not match that of formal parameters the as100 assembler outputs a warning message Example of actual parameter expansion Example of macro definition name MACRO string BYTE string ENDM Example of macro call 1 name name address E BYTE name address Example of macro call 2 name name address BYTE name address Description example mac MACRO p1 p2 p3 IF MACPARA 3 ale p1 byte MOV B p2 p3 ELSE MOV W p2 p3 ENDIF ELIF MACPARA IF p1 byte MOV B p2 ROL ELSE MOV W p2 RO ENDIF ELSE MOV W RO R1 ENDIF ENDM mac word 10 RO AF 353 ELSE MOV W H0 RO ENDIF ENDIF ENDM Indicates beginning of repeat macro body Function e This command indicates the beginning of a repeat macro e The macro body is expanded repeatedly a specified number of times e The maximum number of repetitions that can be specified is 65 535 e Repeat macros can be nested in up to 65 535 levels e The macro body is expanded into the line in which this directive command is written Description format label MREPEAT numeric value body ENDR Rules for writing command e Always be sure to write the operand e Always be sure to insert space or tab between this directive command and the operand e A label can be written at the beginning of this directive command e Asymbol can be written in the operand Precaution Forward referenced symbols cannot be used here e Anexpression ca
182. s products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics ENESAS C 7 D me 7 lt D D R32C 100 Series C Compiler Package V 1 01 Assembler User s Manual Renesas Electronics Rev 1 00 2007 08 www renesas com Notes regarding these materials 1 This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document 2 Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document including but not limited to product data diagrams charts programs algorithms and application circuit examples 3 You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other
183. s reserved Printed in Japan R32C 100 Series C Compiler Package V 1 01 Assembler User s Manual ENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J1636 0100
184. s specified gt In100 sample1 sample2 ORDER main 0f000 noprog dat gt In100 sample1 sample2 ORDER main 0f000 noprog 0f2000 dat gt In100 sample1 sample2 ORDER main 0f000 noprog 0f2000 dat 0f3000 5 RG 3 Sections are allocated in order of main dat beginning from address Of000H 4 main section is allocated from address Of000H dat section is allocated from address 0f2000H 5 main section is allocated from address Of000H dat section is allocated from address 0f3000H 78 Generate a map file for the programmable sound field processor Function e Generate a map file for the programmable sound field processor e The display size is changed for 1Lword 4 bytes 1 address including map file display Precaution e When this option is specified no absolute module files are generated e Only the relocatable module file can be linked that has the assembler option PSFP specified in it e Address alignment is corrected for alignment on even addresses regardless of whether the assembler option ALIGN2 or ALIGN8 is specified e Ifa relocatable module file is linked that does not have the assembler option PSFP specified in it MCU information mismatch in file xxx r30 is output Description rule e This option can be specified at any position on the command line Description example gt In100 sample1 sample2 PSFP 79 Generates Link Error Tag File Function e
185. s100 LIM sample gt as100 LCDIM sample Disables Line Information Output Function The software does not output C language source line information to a relocatable module file e The size of the relocatable module file can be reduced Precaution Absolute module files generated from the relocatable module file that was generated after specifying this option cannot be debugged at the source line level Description rule This option can be specified at any position on the command line Description example gt as100 N sample 50 Specifies Generated File Output Directory Function e This option specifies the directory to which the relocatable module file assembler list file and assembler error tag file that are generated by the assembler are output e The directory name can be specified including a drive name It can also be specified by a relative path Description rule e Write this option in the form of O directory name e No space or tab can be entered between this option and the directory name Description example e The relocatable module file is generated in the work asmout directory on drive c gt as100 Oc work asmout sample The relocatable module file is generated in the tmp directory that is the parent directory of the current directory gt as100 sample O tmp The relocatable module file assembler error tag file and assembler list file are generated in the work asmout directory on drive c gt
186. same name as the extracted relocatable module file already exists the existing file is overwritten Description rule e Always be sure to insert a space between this option and the library file name Description example gt lb100 X new sample3 Module sample3 is extracted from the new lib library file to generate a relocatable module file named sample3 r30 Specifies Command File Function e The software uses the contents of a specified file as command parameters as it invokes lb100 Description rule Input this option using a form like file name e No space or tab can be entered between this option and the file name No other parameters can be entered on the command line Description example gt lb100 cmdfile Error Messages of Ib100 filename is not library file The file filename is not a library file Check the filename Check to see that the file is one that was generated by 1b100 filename is not relocatable file The file filename is not a relocatable file Check the filename Check to see that the file is one that was generated by as100 module already registered in filename The module module has already been registered in the library filename Check the library file name and the relocatable file name module does not match with filename The module name module and the relocatable file name filename do not match The module name has been modified Check the r
187. seeseeeeeeeeseeeeeeeseeeeeeeeeseeeeeeeseeeseeeeeees 90 metoo Command Options cc Td etic as see Sa was as Nea Piss tt deca ad sav Pa a des 90 NS AE ASES A RA AA AS OEE 91 SAO A A E A A A on et ens ER 91 A A A E AA Dl a dnd Ri RSS 92 PA A A AL A a A EE 93 A a ia ote o ES 94 ED itsivaese cialadedswsidecelstadd savigecedelalassiaseesaiatids dawiaetecsaialgespaeevaceedasacedaesyaneesaasgctaanevecdalalposhsasgusmbeeesdelelsiase 94 Ma ale tenable the where tle A AS add sb thane Mes Rout ees ld te Sanit Lect are dd 95 Oe TOES LOE UD tO LIT aD RE 95 A IL 96 Error Messages O mcl100 oococoncccnnnnnnnonononononononononononnnnnnnn nono non EAE E EAEE a A 97 Warning Messages of lmc100O cccccsceessseseseeseeseeeeeeeeeseseseeeseeseseeeseseseeeseseeeeeseeeseeeseeeeeeeeeeeseeeeeees 98 Method for Operating Ib100 oooononncnoononononononononnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nn nn nro nn non nn non non nn TIAA 99 Command Par Meyer tas 99 Rules for Specifying Command Parameters ccccccesessssesseesseeseeeeeeeeseeseeeseceeceseeeseeeseeeseeeeeeeeeees 99 16100 Command Options cccccccccccccesssccceccccceeeeseseeeecceeceeeseeeeeeeeeeseeeeseeeeeeseeeseeeaaaaeeeeseeeseeenanaeeeeseeees 100 datar pas dietevseadnedanbesteuacaanlsidebteebesecadectes 101 O O Siege coat ad donee nated tine rae tistics E Ge NE RS 101 a Ee TE O o DON YRS do A Ree E tesa acl 101 Di tise secs bev coed A vista A eit E suet Peadaas tls A tade
188. single quotations as you write it Note that if you enclose a character string with double quotations the character string itself is expanded Description example name MACRO data MREPEAT LEN data BYTE SUBSTR data MACREP 1 ENDR ENDM name ABCD BYTE A BYTE B BYTE Cc BYTE D e The length of the character string that is given as actual parameter of the macro is given to the operand of MREPEAT e MACREP is incremented 1 gt 2 gt 3 gt 4 each time the BYTE line is executed Consequently the character string that is given as actual parameter of the macro is given successively to the operand of BYTE one character at a time beginning with the first character in that character string Transfers specified information to map file Function e This command outputs the specified character string to a relocatable module file so it will be output to a map file when it is generated by In100 e All of the specified character strings are output to a map file e The user specified information can be output to a map file for each relocatable module file Description format VER character string VER character string Rules for writing command Always be sure to insert space or tab between the directive command and the operand Write the character string in the operand that you want to be output to a map file after enclosing it with single quotations or double quotations Mak
189. ssigned to a specific bit position in specific memory e lfthis name is assigned to each individual bit in 8 bit long memory one byte memory can have 8 pieces of information e The bit position thus specified is offset from the least significant bit of memory specified in the address part by a value specified in the bit number part Rules for writing e Numeric values must be a determined value when assembling the source program e Alphabets and the underline can be used for this name e Numerals cannot be used at the beginning of this name e This name can be defined outside the range of sections Defining method e To define a bit symbol use a directive command that is used for defining bit symbols Example flagi BTEQU 1 flags flag2 BTEQU 2 flags flag3 BTEQU 20 flags Referencing method Abit symbol can be written in the operand of a 1 bit operation instruction Example BCLR flag1 BCLR flag2 BCLR flag3 flag2 flag1 Small address Large address Location symbol Function e This symbol indicates the address of a line you wrote e By writing the dollar mark in the operand you can indicate the address of the first byte of op code in the line you wrote Rules for writing e Write this symbol in the operand of a mnemonic e The dollar mark cannot be written at the beginning of a name or reserved word e A location symbol can be written in a term of an expression Precaution When writing a location sy
190. st file indicating library files and the relocatable modules entered in each library file Format of library list file This file is output in a text format that can be output to a screen and printer By referencing this file it is possible to get approximate information about the relocatable modules entered in the library file The format of a typical library list file is shown in Example of Library List File The following shows the information output to a library list file 1 Library file information This information is output one for each library file The library file information contains the following e Library file name Library file name Indicates the library file name File update date and time Last update time Indicates the date and time the library file was updated last e Number of modules Number of module s Indicates the total number of modules entered in the library file e Number of global symbols Number of global symbol s Indicates the total number of global labels and global symbols entered in the library file 2 Module information This information is output one for each module entered in the library file The module information contains the following e Module name Module name Indicates the module names entered in the library file Version information Ver Indicates a character string that is specified by the directive command VER Entered date and time Date Indicates the date and
191. ster SB e If the mnemonic does not have 8 bit SB relative addressing mode 16 bit SB relative addressing mode is selected Precaution Optimization is not performed unless the SB register value is defined by an expression in which it will be determined when assembling the source program e When the symbol declared by directive command SBSYM or SBSYM16 is written in the op code When the following expression that includes a symbol defined by directive command SBSYM or SBSYM16 is written in the op code symbol value determined when assembled symbol value determined when assembled Value determined when assembled symbol For 1 bit operation instructions the addressing mode is selected in the following manner When the mnemonic has a short format in its instruction format Short format SB relative is selected When the mnemonic does not have a short format in its instruction format A 16 bit SB relative addressing mode is selected Selection of FB relative FB relative is selected when the following conditions are met Precaution The FB register value must always be set using directive command FB before FB relative addressing can be used e When the symbol declared by directive command FBSYM is written in the op code When the following expression that includes a symbol defined by directive command FBSYM is written in the op code symbol value determined when assembled symbol value dete
192. store data in memory or you write a mnemonic always use this directive command to define a section Write the section type and ALIGN after the section name When specifying a section type and ALIGN separate them with a comma as you write Section type and ALIGN can be specified in any desired order Section type can be selected from CODE ROMDATA and DATA The section type can be omitted In this case as100 assumes section type CODE as it processes assembling Description example SECTION program CODE NOP SECTION ram DATA BLKB 10 SECTION tbl1 ROMDATA BYTE abcd SECTION tbl2 ROMDATA ALIGN 8 LWORD 11111111H 22222222H END Defines a stack in inspector information Function e Defines a stack in inspector information Description format STK stack size Description rules e Be sure to put a space or a tab between this directive instruction and the operand e Be sure to give a stack size e Use an integer to give a stack size Notes Use this directive instruction within a range from the start of a Function in inspector information to its end This directive instruction turns effective when the command option finfo has been chosen Description example INSF glbfunc G O STK 2 2 byte push jsr glbsub STK 2 2 byte pop EINSF Extracts specified number of characters Function e This command extracts a specified number of characters from the specified position of a character string Preca
193. t sample atg Directory for assembler error tag file generated If you specified the directory with command option O the assembler error tag file is generated in that directory If no directory is specified the assembler error tag file is generated in the directory where the assembly source file resides Branch Information File The as100 generates a branch information file required to optimize the external branch for the a30 file in which the branch instruction referencing the global label exists when JOPT option was specified Format of branch information file The branch information file is only for internal processing of as100 and 1n100 Precaution Do not edit this file It should be noted that if it is edited no subsequent processing is carried out normally File name of branch information file The file name of the branch information file is created by changing the extension of the assembly source file a30 by default to jin sample a30 gt sample jin Directory for branch information file generated The branch information file is generated in the same directory as the relocatable module file Absolute Module File The In100 editor generates one absolute module file from multiple relocatable module files Format of absolute module file This file is output in the format based on IEEE 695 Precaution Since this file comes in a binary format it cannot be output to a screen or printer nor can it be ed
194. t of concatenation e Ifan error occurs in a line where is written the error is output in the last line concatenated Precautions The upper limit for the maximum number of characters in all lines that are concatenated is 512 characters However this limit does not include the spaces and tabs at the beginning of concatenated lines If a Y is written immediately after a 2 byte code character it may be mistaken for So be careful e Description examples for line concatenation and concatenation results are shown below Example 1 BYTE N 2 3 4 Concatenation result BYTE 1 2 3 4 Example 2 BYTE IN comment 2 comment 3 comment Concatenation result BYTE ias comment 3 comment Example 3 BYTE IN 2M 3 4 Concatenation result BYTE 1 2 3 4 Operands Operands can be written in a mnemonic or directive command to indicate the object to be operated on by that instruction There are following types of operands Precaution Some instructions do not have an operand If you want to know whether or not the instruction has an operand please refer to the rules for writing each command Numeric value A numeric value includes an integral and a floating point number Name A label name and symbol name can be used Expression An expression with its terms containing a numeric value and a name can be entered Character string Characters or a character string can be handled as ASCII code Rules for Writi
195. t space or tab between the directive command and the operand A symbol can be written in the operand An expression can be written in the operand When writing multiple operands separate them with a comma A character or a string of characters can be written in the operand after enclosing it with single quotations or double quotations In this case data is stored in ASCII code representing the characters e When defining a label be sure to write the label name before the directive command e Always be sure to insert a colon after the label name Description example SECTION value ROMDATA BYTE 1 BYTE data BYTE symbol BYTE symbol 1 BYTE 1 2 3 4 5 END BYTE 1 BYTE data Defines where to call a Function in inspector information Function e Defines where to call a function subroutine in inspector information Format CALL called function subroutine name storage class Description rules e Be sure to put a space or a tab between this directive instruction and the operand e Be sure to give a called function subroutine name and a storage class e Separate a storage class by use of a comma e As for the storage class give either G global label or S local label Notes e Give this directive instruction within a range from the start of a function in inspector information to its end e This directive instruction turns effective when the command option finfo has been chosen Des
196. te code for the mnemonics or directive commands written in columns after the semicolon Therefore be careful with the position where you enter the semicolon If a semicolon is enclosed with double quotations or single quotation AS100 does not assume it to be the first character of a comment A space or tab can be inserted between a label and a comment Description example start label BLKB 1 main nop loop Comment Comment line Function e Any desired character string can be written in this line Rules for writing Always be sure to insert a semicolon at the beginning of a comment e A space or tab can be inserted at the beginning of a comment e Any desired characters can be written in a comment Description example Comment line MOV W 0 A0 Comment can be written in other lines too Blank line Function e Nothing apparently is written in this line Rules for writing Lines can be entered that do not contain any meaningful characters as may be necessary to improve the legibility of your source program No characters other than the space tab return and line feed characters can be written in a blank line Description example loop JMP loop JSR sub1 Line concatenation e Ifa line is ended with the next line is concatenated to the position where the is written 118 e A comment can be written in a line where is written However no comment is output in the resul
197. ted in the address exceeding the range of 8 388 608 to 8 388 607 Overflow is discarded Check whether the value is all right 24 bits unsigned value is out of range 0 16777215 address address Relocation data calculation resulted in the address exceeding the range of 0 to 16 777 215 Overflow is discarded Check whether the value is all right 24 bits value is out of range 8388608 16777215 address address Relocation data calculation resulted in the address exceeding the range of 8 388 608 to 16 777 215 Overflow is discarded Check whether the value is all right 4 bits signed value is out of range 8 7 address address Relocation data calculation resulted in the address exceeding the range of 8 to 7 Overflow is discarded Check whether the value is all right 8 bits signed value is out of range 128 127 address address Relocation data calculation resulted in the address exceeding the range of 128 to 127 Overflow is discarded Check whether the value is all right 8 bits unsigned value is out of range 0 255 address address Relocation data calculation resulted in the address exceeding the range of 0 to 255 Overflow is discarded Check whether the value is all right 8 bits value is out of range 128 255 address address Relocation data calculation resulted in the address exceeding the range of 128 to 255 Overflow is discarded Check whether the value is all right 88
198. th a semicolon as you write them SET INC100 C COMMON C PROJECT Output messages The programs are included this products output information of process to screen Error Messages This chapter describes the error messages output by each AS100 program Types of Errors There are following two types of error messages Error message This refers to an error encountered during program execution that renders the program unable to perform its basic function 25 Warning message This refers to an error encountered during program execution that presents some problem even though it is possible to perform the basic function of the program Precaution Please try to solve all problems that have caused generation of a warning message Some warnings may result in a fault when operating your system on the actual chip although no problem might have been encountered during debugging Return Values for Errors When terminating execution each AS100 program returns a numeric value to the OS indicating its status at termination The table below lists the values that are returned when an error is encountered Return value Content 0 Program terminated normally 1 Program was forcibly terminated by input of control C 2 Error relating to the OS s file system or memory system occurred 3 Error attributable to the file being processed occurred 4 Error in input form the command line occurred 26 The table be
199. time when each module is entered in the library file e Module size Size Indicates the code and data sizes of the modules entered in the library file These sizes differ from the file sizes of the relocatable module files Global symbol name Global symbol s Indicates the global symbol and global label names defined in the modules e External reference symbol name Indicates the global symbol and global label names externally referenced by the module Example of Library List file Librarian lb100 for R32C 100 Series Version 1 00 00 000 Library file name libsmp lib Last update time 2005 Jul 7 15 44 Number of module s 1 Number of global symbol s 12 Module name sample Ver VER sample program file Date 2005 Jul 7 15 43 Size 00894H 39 Global symbol s btsym5 btsym6 btsym7 btsym8 btsym9 subi sub2 sym5 sym6 sym7 sym8 sym9 File name of library list file The library file is generated using the file name specified on the command line The extension is Ils A library file name cannot be omitted on the command line Directory for library list file generated If a path is specified on the command line the library file is generated in that directory If no path is specified the library file is generated in the current directory Absolute List File The absolute list files generated by abs100 are output in a format that can be output to a screen or printer Format of absolute list file The absolute list f
200. tional assemble is executed after selecting from three messages Here the assembly source file name is sample a30 Conditional assemble execution examples are shown below Assebly Source File SECTION outdata ZROMDATA ALIGN IF TYPE 0 BYTE PROTO TYPE ELIF TYPE gt 0 BYTE MASS PRODUCTION TYPE ELSE BYTE DEBUG MODE ENDIF END Command Input 1 gt as100 sample Dtype 0 Assembled Result 1 SECTION outdata ZROMDATA ALIGN BYTE PROTO TYPE END Command Input 2 gt as100 sample Dtype 1 23 Assembled Result 2 SECTION outdata ZROMDATA ALIGN BYTE MASS PRODUCTION TYPE END Command Input 3 gt as100 sample Dtype 1 Assembled Result 3 SECTION outdata ROMDATA ALIGN BYTE DEBUG MODE END Next the following shows an example of how to set a value to TYPE in the assembly source file TYPE EQU 0 SECTION outdata ZROMDATA ALIGN IF TYPE 0 BYTE PROTO TYPE ELIF TYPE gt 0 BYTE MASS PRODUCTION TYPE ELSE BYTE DEBUG MODE ENDIF END Source Line Information Output The as100 assembler outputs to a relocatable module file the information that is necessary to implement source debugging of NC100 and Macro description of AS100 Symbol Definition The as100 assembler allows you to define symbols by entering command option D when starting up the program This function can be used in combination with a condition assemble function etc 24 Environment Variables of as100 The
201. tiple defined The software interrupt number X is multiple defined Check the software interrupt number Interrupt number X is multiple defined by VECTN and rvector The software interrupt number X is multiple defined by VECTN and rvector Check the software interrupt number Invalid option option is used An invalid option option is used Specify a correct option MCU information mismatch in file file The MCU information in the file file does not match the actual chip Check to see that the relocatable file is one that was created by as100 MCU information mismatch in file xx r30 The MCU information in the file file does not match the actual chip Reassemble the file with as100 before linking No input files specified No input file is specified Specify a file name Not enough memory Memory capacity is insufficient Increase the memory capacity Option option is not appropriate The option option is used incorrectly Check the syntax for this option and rewrite it correctly Seren parameter address exceed OFFFFFFFFH The address specified with an option exceeds OFFFFFFFFh Re input the command correctly Special page number X is multiple defined Special page number X is multiple defined Check the special page number Specified an option that can t be used with option The option that cannot be used with option at the same time is specified Check the
202. ts data in a space area H Converts file into Intel HEX format ID Set ID code for ID check function L Selects maximum length of data record area O Specifies output file name V Indicates version of load module converter Rules for Specifying Command Parameters Follow the rules described below when you specify the command parameters for lmc100 Order in which to specify command parameters Always be sure to specify command parameters in the following order 1 Command option 2 Absolute module file name essential gt Imc100 command option absolute module file name Absolute module file name essential e Specify the absolute module file generated by In100 e Specify only one absolute module file name e The file extension x30 can be omitted e No file names can be specified unless their extension is x30 Command options e Specify command options as necessary e Multiple command options can be specified e When specifying multiple command options the command options can be entered in any order Imc100 Command Options The following pages describe rules you need to follow when specifying command options 90 Disables Message Output to Screen Function e The software does not output messages when Imc100 is processing Error messages are output to screen Description rule e Always be sure to specify this option before the file name Description example gt Imc100 debug Specifies an ad
203. ue ALIGN with not ALIGN specified relocatable section Directive command ALIGN is written in a section that does not have an ALIGN specification Check the position where directive command ALIGN is written Write an ALIGN specification in the section definition line of a section in which directive command ALIGN is written CASE definition is after DEFAULT CASE is preceded by a DEFAULT description Make sure all DEFAULT commands are written after the CASE statement CASE not exist in SWITCH statement No CASE description is found in the SWITCH statement Make sure the SWITCH statement contains at least one CASE statement END statement is in include file The include file contains an END statement END cannot be written in include files Delete this statement The software will ignore END as it executes 62 Actual macro parameters are not enough The number of actual macro parameters is smaller than that of formal macro parameters The formal macro parameters that do not have corresponding actual macro parameters are ignored Addressing is described by the numerical value Addressing is specified with a numeric value Be sure to write in numeric values Control register differ size The control register is a different size than that of the R32C 100 Series and other MCU s of the M16C 60 Family Match the data size of the operand to the control register size of the R32C 100 S
204. uipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under cert
205. um MREPEAT num IF num gt 49 EXITM ENDIF nop ENDR ENDM rep 3 nop nop nop Defines symbol Function e This command defines a value in the range of signed 32 bit integers 2147483648 to 2147483647 to a symbol e Symbolic debug function is made available for use by defining symbols with this directive command Description format name EQU numeric value Rules for writing command e The value that can be defined to a symbol must be determined when assembling the source program e Always be sure to insert space or tab between the directive command and the operand e Asymbol can be written in a symbol defined operand Precaution However symbol names cannot be entered that are forward referenced e Anexpression can be written in a symbol defined operand e Symbols can be specified as global Description example symbol EQU 1 symbol1 EQU symbol symbol symbol2 EQU 2 Stop expansion of macro body Function e This command stops expanding the macro body and transfers control to the nearest ENDM Description format macro name MACRO body EXITM body ENDM Rules for writing command e Make sure that the command is written within the body of a macro definition Description example data1 MACRO value IF value EXITM ELSE BLKB value ENDIF ENDM data1 0 AF 0 EXITM ENDIF ENDM Assigns temporary FB register value Function e This command assigns a provisional FB registe
206. urce file Precaution The assembly source files generated by macro processor are erased after assembler processor finishes its processing This does not modify the assembly source files written by the user Assembler processor This program converts the assembly source file preprocessed by the macro processor into a relocatable module file Programmable sound field processor This program converts the assembly source file for the programmable sound field processor preprocessed by the macro processor into a relocatable module file Linkage editor In100 This program links the relocatable module files generated by the assembler processor to generate an absolute module file Precaution If the relocatable module files generated by the programmable sound field processor are linked no absolute module files are generated Librarian Ib100 This program reads in a relocatable module file and generates a library file and manages it Load module converter Imc100 This program converts the absolute module file generated by the linkage editor into a machine language file that can be programmed into ROM Absolute lister abs100 This program generates an absolute list file that can be output to a printer This file is generated based on the address information in the absolute module file Functions Relocatable programming function This function allows you to write a program separately in multiple files A separately written program
207. ution The value is rendered 0 if the extract start position is assigned a value greater than the length of the character string itself The value is rendered O if the number of characters to be extracted is greater than the length of the character string itself The value is rendered 0 if you specify 0 for the number of characters to be extracted Description format SUBSTR CS ES NC SUBSTR CS ES NC CS character string ES extract start position NC number of characters to be extract Rules for writing command e Always be sure to enclose the operand with e Always be sure to write the character string extract start position and the number of characters to be extracted e Separate the character string extract start position and the number of characters to be extracted with commas as you write them e A symbol can be written in the extract start position and the number of characters to be extracted e f you specify 1 for the extract start position it means the beginning of the character string e The 7 bit ASCII code characters including a space and tab can be used to write a character string Precaution Kanji and other 8 bit code are not processed correctly However the as100 assembler does not output errors Always be sure to enclose the character string with quotations as you write it Precaution If you want a macro argument to be expanded as a character string enclose the parameter name with
208. value Binary operators Operator Function Adds values on left and right sides of operand together Subtracts value on right side of operand from value on left side i Multiples values on left and right sides of operand together Divides value on left side of operand by value on right side Handles remainder derived by dividing value on left side of operand by value on right side gt gt Bit shifts value on left side operand to right as many times as the value on right side lt lt Bit shifts value on left side operand to left as many times as the value on right side amp Logically OR s values on left and right side of operand for each bit Logically AND s values on left and right sides of operand for each bit Exclusive OR s values on left and right sides of operand for each bit 121 Relational operators Operator Function gt Evaluates that value on left side of operator is greater than value on right side This operator can only be written in operand of directive commands IF and ELIF lt Evaluates that value on right side of operator is greater than value left side This operator can only be written in operand of directive commands IF and ELIF gt Evaluates that value no left side of operator is equal to or greater than value on right side This operator can only be written in operand of directive commands IF and ELIF lt Evaluates
209. y levels Check the syntax for this condition assemble statement and rewrite 1t correctly Too many macro local label definition Too many macro local labels are defined Make sure that the number of macro local labels defined in one file are 65 535 or less Too many macro nesting The macro is nested too many levels Make sure that the macro is nested no more than 65 535 levels Check the syntax for this source statement and rewrite it correctly Too many operand There are extra operands Check the syntax for these operands and rewrite them correctly Too many operand data There are too many operand data The data entered in the operand exceeds the size that can be written in one line Divide the instruction Too many temporary label There are too many temporary labels Replace the temporary labels with label names Undefined symbol exist An undefined symbol is used Define the symbol Value is out of range The value is out of range Write a value that matches the register bit length WHILE not associates with DO No corresponding DO is found for WHILE Check the source description Warning Messages of as100 JOPT and OPTJ are specified JOPT option and the directive command OPTJ are specified The directive command OPTJ is ignored ALIGN size is different The size of alignment correction values is different Check the size of alignment correction val
210. you specify command option MS MSL 2 33 Example of Map file FORRADO RERAIIAIEARIAA 1 LINK INFORMATION HEARERS IOAIEARIAA In100 ms smp LINK FILE INFORMATION smp smp r30 Jun 27 14 58 58 2005 EEE EE AAAHHH AHAAA A AAAH HHRHHH 2 SECTION INFORMATION HIMNO HAHAA AHHH HH SECTION ATR TYPE START LENGTH ALIGN MODULENAME ram REL DATA 00000000 0000014 smp program REL CODE 00000014 0000003 smp Total DATA 000001 4 00000020 Byte s ROMDATA 0000000 00000000 Byte s CODE 0000003 00000003 Byte s FBR 3 GLOBAL LABEL INFORMATION FBR EE work 00000000 FBR 4 GLOBAL EQU SYMBOL INFORMATION FBR sym2 00000000 FBR 5 GLOBAL EQU BIT SYMBOL INFORMATION FBR sym1 1 000001 FHA 6 LOCAL LABEL INFORMATION HRB smp smp r30 main 000014 tmp 00000a FBR 7 LOCAL EQU SYMBOL INFORMATION FBR EE smp smp r30 sym3 00000003 FBR 8 LOCAL EQU BIT SYMBOL INFORMATION FBR smp smp r30 sym4 1 000000 File name of map file The file name of the map file is created by changing the extension x30 of the absolute module file into map sample x30 gt sample map Directory for map file generated The map file is generated in the directory where the absolute module file resides Link Error Tag File Only when you specify command option T In100 outputs link error information to a file In
211. ys be sure to insert a space between each module name Description example gt lb100 L new Information on all modules entered in a library file named new lib are output to a library list file named new lls gt lb100 L new sample1 Information on module samplel entered in the new lib library file is output to a new lls list file gt lb100 L new lib sample1 sample3 Information on modules samplel and sample3 entered in the new lib library file are output to a new lls list file Replaces Modules Function e The software updates a relocatable module in the library file by replacing it with the content of a specified relocatable module file The module that is updated in this way is one that has the same name as the specified relocatable module file name Description rule e Input this option using a form like R library file name relocatable module file name e Always be sure to insert a space between this option and the library file name and between the library file name and the relocatable module file name e Multiple relocatable module file names can be specified In this case always be sure to insert a space between each module file name Description example gt lb100 R new sample1 The content of module samplel in the new lib library file is replaced with the content of the sample1 r30 file of the same name Updates Modules Function e The software compares the created date of a relocatable module
212. yte length Function e This command stores 4 byte long fixed data in ROM e Label can be defined at the address where data is stored Description format LWORD numeric value name LWORD numeric value Rules for writing command e Write an integral value in the operand Always be sure to insert space or tab between the directive command and the operand A symbol can be written in the operand An expression can be written in the operand When writing multiple operands separate them with a comma A character or a string of characters can be written in the operand after enclosing it with single quotations or double quotations In this case data is stored in ASCII code representing the characters The length of a character string you can write in the operand is less than four characters e When defining a label be sure to write the label name before the directive command Always be sure to insert a colon after the label name Description example SECTION value ROMDATA LWORD 1 LWORD data LWORD symbol LWORD symbol 1 LWORD 1 2 3 4 5 END ES Defines macro name and beginning of macro body Function e This command defines a macro name e This command indicates the beginning of macro definition Description format Macro definition macro name MACRO formal parameter formal parameter body ENDM e Macro call macro name actual parameter actual parameter

Download Pdf Manuals

image

Related Search

Related Contents

Epson TM-C3400  Operating Instructions Easyloc RxTx  Ferro a vapor  Publicação - Câmara dos Deputados  Samsung Samsung E1110 User Manual  トイレリフト  Peter Pan au pays de l`entrepreneuriat  Coby CVE196 headphone  Thecus N5500 Bedienungsanleitung  

Copyright © All rights reserved.
Failed to retrieve file