Renesas V850 Series Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Netzteile und Wechselrichter Renesas V850 Series herunter. V850 IAR Assembler Reference Guide Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 125
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen

Inhaltsverzeichnis

Seite 1 - IAR Assembler

AV850-4IAR AssemblerReference Guidefor RenesasV850 Microcontroller FamilyAV850-4

Seite 2 - EDITION NOTICE

AV850-410Other documentationIAR AssemblerReference Guide for V850summary of the assembler options, and contains detailed reference information about e

Seite 3 - Contents

AV850-4100Call frame information directivesIAR AssemblerReference Guide for V850SYNTAXThe syntax definitions below show the syntax of each directive.

Seite 4

AV850-4Assembler directives101CFI STACKFRAME cfa resource type [, cfa resource type] …CFI STATICOVERLAYFRAME cfa segment [, cfa segment] …CFI BASEADDR

Seite 5

AV850-4102Call frame information directivesIAR AssemblerReference Guide for V850CFI resource { resource | FRAME(cfa, offset) }CFI resource cfiexprPARA

Seite 6

AV850-4Assembler directives103DESCRIPTIONSThe call frame information directives (CFI directives) are an extension to the debugging format of the IAR C

Seite 7 - Ta b l e s

AV850-4104Call frame information directivesIAR AssemblerReference Guide for V850Inside a names block, four different kinds of declarations can appear:

Seite 8

AV850-4Assembler directives105such as routines for handling, entering, and leaving C or C++ functions; these routines manipulate the caller’s frame. E

Seite 9 - What this guide contains

AV850-4106Call frame information directivesIAR AssemblerReference Guide for V850Extend an existing common block with the directive:CFI COMMON name EXT

Seite 10 - Document conventions

AV850-4Assembler directives107You can use these simple rules both in common blocks to describe the initial information for resources and CFAs, and ins

Seite 11 - NAMING CONVENTIONS

AV850-4108Call frame information directivesIAR AssemblerReference Guide for V850parts RETLO and RETHI. To declare that the value of RET can be found b

Seite 12

AV850-4Assembler directives109In the operand descriptions, cfiexpr denotes one of these:● A CFI operator with operands● A numeric constant● A CFA name

Seite 13 - Assembler for V850

AV850-4Preface11TYPOGRAPHIC CONVENTIONSThis guide uses the following typographic conventions:NAMING CONVENTIONSThe following naming conventions are us

Seite 14 - Modular programming

AV850-4110Call frame information directivesIAR AssemblerReference Guide for V850NE cfiexpr,cfiexpr Not equalOR cfiexpr,cfiexpr Bitwise ORRSHIFTA cf

Seite 15 - External interface details

AV850-4Assembler directives111Ternary operatorsOverall syntax: OPERATOR(operand1,operand2,operand3)EXAMPLEThe following is a generic example and not a

Seite 16 - ERROR RETURN CODES

AV850-4112Call frame information directivesIAR AssemblerReference Guide for V850grows from high addresses toward zero. The CFA denotes the top of the

Seite 17 - Assembler instructions

AV850-4Assembler directives113CFI RET FRAME(CFA,-2) ; Offset -2 from top of frameCFI ENDCOMMON trivialCommonNote: SP cannot be changed using a CFI di

Seite 18 - INTEGER CONSTANTS

AV850-4114Call frame information directivesIAR AssemblerReference Guide for V850

Seite 19 - FLOATING-POINT CONSTANTS

AV850-4115Assembler diagnosticsThis chapter describes the format of the diagnostic messages and explains how diagnostic messages are divided into diff

Seite 20 - TRUE AND FALSE

AV850-4116Severity levelsIAR AssemblerReference Guide for V850ASSEMBLY ERROR MESSAGESAssembly error messages are produced when the assembler finds a c

Seite 21 - PREDEFINED SYMBOLS

AV850-4Index117Aabsolute expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23absolute segments . . . . . . . . . . . . . . . . .

Seite 22 - Table 9: Predefined symbols

AV850-4118IAR AssemblerReference Guide for V850assembler optionspassing to assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . 15command l

Seite 23

AV850-4Index119constantsdefault base of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97integer . . . . . . . . . . . . . . . . . .

Seite 24 - Absolute

AV850-412Document conventionsIAR AssemblerReference Guide for V850IAR Assembler™ for V850 the assemblerIAR XLINK™ Linker XLINK, the linkerIAR XAR Libr

Seite 25 - List file format

AV850-4120IAR AssemblerReference Guide for V850FF: (operand modifier) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71-f (assembler option

Seite 26 - Programming hints

AV850-4Index121labels. See assembler labelsLE (CFI operator). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109less than or equal (assem

Seite 27 - Assembler options

AV850-4122IAR AssemblerReference Guide for V850naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11NE (CFI operator). .

Seite 28 - Summary of assembler options

AV850-4Index123segment begin (assembler operator) . . . . . . . . . . . . . . . . . . 51segment control directives. . . . . . . . . . . . . . . . . .

Seite 29 - ● The arguments to the macro

AV850-4124IAR AssemblerReference Guide for V850W-w (assembler option) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37warnings . . . . . .

Seite 30

AV850-4Index125% (assembler operator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50+ (assembler operator) . . . . . . . . . . . . . . .

Seite 31 - Parameter Description

AV850-413Introduction to the IAR Assembler for V850This chapter contains these sections:● Introduction to assembler programming● Modular programming●

Seite 32

AV850-414Modular programmingIAR AssemblerReference Guide for V850● In the IAR Embedded Workbench IDE, you can base a new project on a template for an

Seite 33

AV850-4Introduction to the IAR Assembler for V85015● In each module, divide your assembler source code into small subroutines (corresponding to functi

Seite 34

AV850-416External interface detailsIAR AssemblerReference Guide for V850● Via environment variablesThe assembler automatically appends the value of th

Seite 35

AV850-4Introduction to the IAR Assembler for V85017Source formatThe format of an assembler source line is as follows:[label [:]] [operation] [operands

Seite 36

AV850-418Expressions, operands, and operatorsIAR AssemblerReference Guide for V850SYNTAX DEVIATIONSInstructions with a condition code as operandAssemb

Seite 37

AV850-4Introduction to the IAR Assembler for V85019Constants are written as a sequence of digits with an optional - (minus) sign in front to indicate

Seite 38

AV850-4COPYRIGHT NOTICECopyright © 1998–2010 IAR Systems AB.No part of this document may be reproduced without the prior written consent of IAR System

Seite 39 - -x2 Dual line spacing

AV850-420Expressions, operands, and operatorsIAR AssemblerReference Guide for V850Floating-point numbers can be written in the format:[+|-][digits].[d

Seite 40

AV850-4Introduction to the IAR Assembler for V85021Note that symbols and labels are byte addresses. For additional information, see Generating a looku

Seite 41 - Assembler operators

AV850-422Expressions, operands, and operatorsIAR AssemblerReference Guide for V850in preprocessor directives or include them in the assembled code. Th

Seite 42 - AND OPERATORS – 5

AV850-4Introduction to the IAR Assembler for V85023For example, to include the time of assembly as a string for the program to display:timdat db

Seite 43 - Description of operators

AV850-424Expressions, operands, and operatorsIAR AssemblerReference Guide for V850 extern second extern third rseg

Seite 44

AV850-4Introduction to the IAR Assembler for V85025List file formatThe format of an assembler list file is as follows:HEADERThe header section contain

Seite 45

AV850-426Programming hintsIAR AssemblerReference Guide for V850Programming hintsThis section gives hints on how to write efficient code for the IAR As

Seite 46

AV850-427Assembler optionsThis chapter first explains how to set the options from the command line, and gives an alphabetical summary of the assembler

Seite 47

AV850-428Summary of assembler optionsIAR AssemblerReference Guide for V850By default, extended command line files have the extension xcl, and can be s

Seite 48

AV850-4Assembler options29Description of assembler optionsThe following sections give detailed reference information about each assembler option.Note

Seite 49

AV850-43ContentsTables ... 7Pref

Seite 50 - 0xFFFF89AB

AV850-430Description of assembler optionsIAR AssemblerReference Guide for V850This table shows the available parameters:To set related options, select

Seite 51 - SFB(segment [{+

AV850-4Assembler options31-E -Enumber This option specifies the maximum number of errors that the assembler reports.By default, the maximum number is

Seite 52 - Description

AV850-432Description of assembler optionsIAR AssemblerReference Guide for V850When -G is used, you cannot specify a source filename.This option is not

Seite 53

AV850-4Assembler options33To simply generate a listing, use the -L option without a path. The listing is sent to the file with the same name as the so

Seite 54

AV850-434Description of assembler optionsIAR AssemblerReference Guide for V850in the source you would write, for example:print [>]to call a macro p

Seite 55 - Assembler directives

AV850-4Assembler options35ExampleTo send the object code to the file obj\prog.r85 rather than to the default file prog.r85:av850 prog -Oobj\ Project&g

Seite 56

AV850-436Description of assembler optionsIAR AssemblerReference Guide for V850By default, the assembler sends various insignificant messages via the s

Seite 57 - Directive Description Section

AV850-4Assembler options37ExampleTo use the name of the predefined symbol __TIME__ for your own purposes, you could undefine it with:av850 prog -U__TI

Seite 58

AV850-438Description of assembler optionsIAR AssemblerReference Guide for V850Use this option to disable warnings. The -w option without a range disab

Seite 59 - Module control directives

AV850-4Assembler options39These parameters are available:Project>Options>Assembler>List>Include cross referenceCommand line option Descrip

Seite 60

AV850-44IAR AssemblerReference Guide for V850Absolute and relocatable expressions ... 23Expression restr

Seite 61 - Assembling multi-module files

AV850-440Description of assembler optionsIAR AssemblerReference Guide for V850

Seite 62 - Symbol control directives

AV850-441Assembler operatorsThis chapter first describes the precedence of the assembler operators, and then summarizes the operators, classified acco

Seite 63 - Importing symbols

AV850-442Summary of assembler operatorsIAR AssemblerReference Guide for V850MULTIPLICATIVE ARITHMETIC OPERATORS – 2ADDITIVE ARITHMETIC OPERATORS – 3SH

Seite 64 - EXAMPLES

AV850-4Assembler operators43OR OPERATORS – 6COMPARISON OPERATORS – 7Description of operatorsThe following sections give detailed descriptions of each

Seite 65 - Segment control directives

AV850-444Description of operatorsIAR AssemblerReference Guide for V850Example+3 → 33*+2 → 6+Addition (3).The + addition operator produces the sum of t

Seite 66

AV850-4Assembler operators45Example9/2 → 4-12/3 → -49/2*6 → 24AND (&&)Logical AND (5).Use && to perform logical AND between its two in

Seite 67

AV850-446Description of operatorsIAR AssemblerReference Guide for V850B’1010 | B’0000 → B’1010BINXOR (^)Bitwise exclusive OR (6).Use ^ to perform bitw

Seite 68 - Beginning an absolute segment

AV850-4Assembler operators47ExampleBYTE4 0x12345678 → 0x12DATECurrent time/date (1).Use the DATE operator to specify when the current assembly began.T

Seite 69 - Beginning a common segment

AV850-448Description of operatorsIAR AssemblerReference Guide for V8501 >= 1 → 1GT, >Greater than (7).> evaluates to 1 (true) if the left ope

Seite 70 - Value assignment directives

AV850-4Assembler operators49To load a value from memory:MOVHI HI1(x), R0, R1LD.H LW1(x)[R1], R5HWRDHigh half word (1).HWRD takes a single operand, wh

Seite 71 - Defining a temporary value

AV850-4Contents5Symbol control directives ... 62Syntax ...

Seite 72 - Redefining a symbol

AV850-450Description of operatorsIAR AssemblerReference Guide for V850LW1Low half word with sign extension (1).LW1 takes a single operand, which is in

Seite 73 - It generates this code:

AV850-4Assembler operators51Example1 <> 2 → 12 <> 2 → 0'A' <> 'B' → 1NOT (!)Logical NOT (1).Use ! to negate a lo

Seite 74 - Using the LIMIT directive

AV850-452Description of operatorsIAR AssemblerReference Guide for V850Example name segmentBegin rseg MYCODE:CODE ; Forwar

Seite 75

AV850-4Assembler operators53SHL (<<)Logical shift left (4).Use << to shift the left operand, which is always treated as unsigned, to the l

Seite 76

AV850-454Description of operatorsIAR AssemblerReference Guide for V850Example module table rseg MYCODE:CODE ; Forward decla

Seite 77 - Macro processing directives

AV850-455Assembler directivesThis chapter gives an alphabetical summary of the assembler directives and provides detailed reference information for ea

Seite 78 - Defining a macro

AV850-456Summary of assembler directivesIAR AssemblerReference Guide for V850#ifndef Assembles instructions if a symbol is undefined. C-style preproc

Seite 79 - Passing special characters

AV850-4Assembler directives57DEFINE Defines a file-wide value. Value assignmentDH Generates 16-bit half word constants. Data definition or allocationD

Seite 80 - How macros are processed

AV850-458Summary of assembler directivesIAR AssemblerReference Guide for V850LSTCND Controls conditional assembler listing. Listing controlLSTCOD Co

Seite 81 - Coding inline for efficiency

AV850-4Assembler directives59Module control directivesModule control directives are used for marking the beginning and end of source program modules,

Seite 82

AV850-46IAR AssemblerReference Guide for V850Descriptions ... 90Ex

Seite 83 - Using REPTC and REPTI

AV850-460Module control directivesIAR AssemblerReference Guide for V850PARAMETERSDESCRIPTIONSBeginning a program moduleUse NAME or PROGRAM to begin a

Seite 84 - This produces this code:

AV850-4Assembler directives61Assembling multi-module filesProgram entries must be either relocatable or absolute, and will show up in XLINK load maps,

Seite 85 - Listing control directives

AV850-462Symbol control directivesIAR AssemblerReference Guide for V850 module mod_1 rtmodel "CAN", "ISO11519&q

Seite 86

AV850-4Assembler directives63PARAMETERSDESCRIPTIONSExporting symbols to other modulesUse PUBLIC to make one or more symbols available to other modules

Seite 87 - Turning the listing on or off

AV850-464Symbol control directivesIAR AssemblerReference Guide for V850The REQUIRE directive marks a symbol as referenced. This is useful if the segme

Seite 88

AV850-4Assembler directives65Segment control directivesThe segment directives control how code and data are located. See Expression restrictions, page

Seite 89

AV850-466Segment control directivesIAR AssemblerReference Guide for V850STACK segment [:type] [(align)]PARAMETERSaddressAddress where this segment par

Seite 90

AV850-4Assembler directives67DESCRIPTIONSBeginning an absolute segmentUse ASEG to set the absolute mode of assembly, which is the default at the begin

Seite 91 - Displaying errors

AV850-468Segment control directivesIAR AssemblerReference Guide for V850must be absolute. However, when ORG is used in a relative segment (RSEG), the

Seite 92 - Ignoring #pragma

AV850-4Assembler directives69 org 0hreset jr main org 2080hmain mov 1,R6 ; Start of cod

Seite 93 - Including a source file

AV850-47Ta b l e s1: Typographic conventions used in this guide ... 112: Naming conventions u

Seite 94

AV850-470Value assignment directivesIAR AssemblerReference Guide for V850down ds 1 endBecause the common segments have the same

Seite 95 - Reserving space

AV850-4Assembler directives71label SET exprlabel VAR exprPARAMETERSOPERAND MODIFIERSThese prefixes can be used for modifying operands:ExampleThe opera

Seite 96 - Assembler control directives

AV850-472Value assignment directivesIAR AssemblerReference Guide for V850Defining a permanent local valueUse EQU or = to create a local symbol that de

Seite 97 - Defining comments

AV850-4Assembler directives73 rseg CODE:CODEtable cr_tabl 4 endIt generates this code: 1 00000000

Seite 98 - Function directives

AV850-474Value assignment directivesIAR AssemblerReference Guide for V850Using local and global symbolsIn the following example the symbol value defin

Seite 99

AV850-4Assembler directives75changed at compile time, but values outside a defined range would cause undesirable behavior. module setLim

Seite 100 - Names block directives

AV850-476Conditional assembly directivesIAR AssemblerReference Guide for V850DESCRIPTIONSUse the IF, ELSE, and ENDIF directives to control the assembl

Seite 101 - Data block directives

AV850-4Assembler directives77Macro processing directivesThese directives allow user macros to be defined. See Expression restrictions, page 24, for a

Seite 102 - PARAMETERS

AV850-478Macro processing directivesIAR AssemblerReference Guide for V850DESCRIPTIONSA macro is a user-defined symbol that represents a block of one o

Seite 103 - Backtrace rows and columns

AV850-4Assembler directives79The previous example could therefore be written as follows:errmac macro jarl abort,R7 db

Seite 104 - Extending a names block

AV850-48IAR AssemblerReference Guide for V85032: Binary operators in CFI expressions ...

Seite 105 - Extending a common block

AV850-480Macro processing directivesIAR AssemblerReference Guide for V850 dc8 \1 endif endm module fi

Seite 106 - SIMPLE RULES

AV850-4Assembler directives81The macro expander has no knowledge of assembler symbols since it only deals with text substitutions at source level. Bef

Seite 107 - Simple rules for resources

AV850-482Macro processing directivesIAR AssemblerReference Guide for V850 add R9,R6 cmp R10,R6 bne loop

Seite 108 - CFI EXPRESSIONS

AV850-4Assembler directives83Using REPTC and REPTIThis example assembles a series of calls to a subroutine plot to plot each character in a string:

Seite 109 - Binary operators

AV850-484Macro processing directivesIAR AssemblerReference Guide for V850 10 00000054 11 00000054 ENDThis example

Seite 110 - Reference Guide for V850

AV850-4Assembler directives85Listing control directivesThese directives provide control over the assembler list file. SYNTAXCOL columnsLSTCND{+|-}LST

Seite 111 - Ternary operators

AV850-486Listing control directivesIAR AssemblerReference Guide for V850DESCRIPTIONSTurning the listing on or offUse LSTOUT- to disable all list outpu

Seite 112 - Defining the common block

AV850-4Assembler directives87Use PAGSIZ to set the number of printed lines per page of the assembler list. The default number of lines per page is 44.

Seite 113 - Defining the data block

AV850-488Listing control directivesIAR AssemblerReference Guide for V850 7 00000000 jarl print,R10 8 00000000

Seite 114

AV850-4Assembler directives89This produces the following output: 1 00000000 store MACRO reg,pos 2 00000000 S

Seite 115 - Assembler diagnostics

AV850-49PrefaceWelcome to the IAR Assembler Reference Guide for V850. The purpose of this guide is to provide you with detailed reference information

Seite 116 - ASSEMBLY FATAL ERROR MESSAGES

AV850-490C-style preprocessor directivesIAR AssemblerReference Guide for V850#else#endif#error "message"#if condition#ifdef symbol#ifndef sy

Seite 117

AV850-4Assembler directives91Defining and undefining preprocessor symbolsUse #define to define a value of a preprocessor symbol.#define symbol valueUs

Seite 118

AV850-492C-style preprocessor directivesIAR AssemblerReference Guide for V850Ignoring #pragmaA #pragma line is ignored by the assembler, making it eas

Seite 119

AV850-4Assembler directives93EXAMPLESUsing conditional preprocessor directivesThis example defines a label adjust, and then uses the conditional direc

Seite 120

AV850-494Data definition or allocation directivesIAR AssemblerReference Guide for V850Data definition or allocation directivesThese directives define

Seite 121

AV850-4Assembler directives95Use DS, DS8, DS16, or DS32 to reserve a number of uninitialized bytes.EXAMPLESGenerating a lookup tableThis example gener

Seite 122

AV850-496Assembler control directivesIAR AssemblerReference Guide for V850Assembler control directivesThese directives provide control over the operat

Seite 123

AV850-4Assembler directives97Use RADIX to set the default base for constants. The default base is 10.Controlling case sensitivityUse CASEON or CASEOFF

Seite 124

AV850-498Function directivesIAR AssemblerReference Guide for V850Changing the baseTo set the default base to 16: radix 16D mov

Seite 125

AV850-4Assembler directives99DESCRIPTIONSFUNCTION declares the label name to be a function. value encodes extra information about the function.FUNCALL

Kommentare zu diesen Handbüchern

Keine Kommentare