softune assembler source convert guide - fujitsu · ii preface ♦ manual purpose and intended...

106
F 2 MC Family 16-bit/8-bit Micro-Controller SOFTUNE Assembler Source Convert Guide

Upload: others

Post on 24-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

F2MC Family16-bit/8-bit Micro-Controller

SOFTUNE AssemblerSource Convert Guide

Page 2: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

ii

Preface

♦ Manual purpose and intended users

This manual describes the usage and operations of the SOFTUNE Assembler Source

Convert Guide that runs under Windows 95 and Windows NT.

This manual is intended for programmers who plan to port their software assets in

conventional assemblers to the SOFTUNE assembler using the SOFTUNE Assembler

Source Convert Guide.

♦ Trademarks

Microsoft and Windows are registered trademarks of Microsoft Corporation, USA,

within the USA and other countries.

UNIX is a registered trademark licensed by X/Open Company Limited, within the

USA and other countries.

All other system and product names appeared in this manual are trademarks or

registered trademarks of their respective companies or organizations. This

manual does not use trademark or registered trademark symbols.

Page 3: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

iii

All Right Reserved.

1. Circuit diagrams utilizing Fujitsu products are included as a mean of illustrating

typical semiconductor applications. Complete information sufficient for

construction proposes is not necessarily given.

2. The information contained in this document has been carefully checked and is

believed to be reliable. However, Fujitsu assumes no responsibility for

inaccuracies.

3. The information contained in this document does not convey any license under

the copy right, patent right to trademarks claimed and owned by Fujitsu.

4. Fujitsu reserved the right to change products or specifications without notice.

5. No part of this publication may be copied or reproduced in any form or by any

means, or transferred to any third party without prior written consent of Fujitsu.

6. The products described in this document are not intended for use in equipment

requiring requiring high reliability, such as marine relays and medical life-support

systems. For such applications, contact your Fujitsu sales representative.

©1997 FUJITSU LIMITED Printed in Japan

Page 4: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

iv

About product names

♦ Manual Purpose and Readers

This manual is intended for engineers who will actually evaluate and debug

programs using this simulator debugger. It deals with the simulator debugger

functions, operations, and commands.

♦ This manual uses the following abbreviated product names.

ASCG for SOFTUNE Assembler Source Convert Guide.

Windows 95 for Microsoft Windows 95 operating system.

Windows NT for Microsoft Windows NT Server network operating system Version

3.51, Microsoft Windows NT Workstation operating system Version 3.51, Microsoft

Windows NT Server network operating system Version 4.0, and Microsoft

Windows NT Workstation operating system Version 4.0.

♦ Notation Used in This Manual

The following notation is used in this manual:

Symbol Description

[ ] Part of the format enclosed in brackets may be omitted.

{|} One of the format items enclosed in braces and delimited by I must be selected.…

The preceeding part of the format may be repeated any number of times.

%environm

ental

variable

name%

Refer environmental variable value.

Page 5: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

v

Contents

CHAPTER 1 OUTLINE OF ASSEMBLER SOURCE CONVERT GUIDE..................1

1.1 Outline of Operations ................................................................................................. 2

CHAPTER 2 ENVIRONMENT VARIABLES ..........................................................3

2.1 FELANG........................................................................................................................ 4

CHAPTER 3 START-UP AND BASIC OPERATIONS .............................................5

3.1 Starting ASCG............................................................................................................ 6

3.2 Defining Input/Output Files....................................................................................... 7

3.3 Conversion Process ..................................................................................................... 8

3.4 Operation Messages.................................................................................................... 9

3.5 End Code .................................................................................................................. 10

CHAPTER 4 START-UP OPTIONS ..................................................................... 11

4.1 Format for defining options...................................................................................... 12

4.2 List of Options .......................................................................................................... 13

4.2.1 -o .................................................................................................................................14

4.2.2 -f .................................................................................................................................15

4.2.3 -V, -XV........................................................................................................................16

4.2.4 -help ............................................................................................................................17

4.2.5 -cmsg, -Xcmsg ..........................................................................................................18

4.2.6 -cwno, -Xcwno ..........................................................................................................19

4.2.7 -BC, -XBC ...................................................................................................................20

4.2.8 -w, -Xw ........................................................................................................................21

4.2.9 -asm, -Xasm...............................................................................................................22

4.2.10 -SJIS ............................................................................................................................23

CHAPTER 5 HAND-OPERATED CONVERSION SUPPORT FUNCTION ....................... 25

5.1 &SET Macro (Common to F2MC-16 family and F2MC-8L family) ............................. 26

5.2 Macro Instructions (Common to F2MC-16 family and F 2MC-8L family) .................. 28

5.3 Character Constants (Common to F2MC-16 family and F 2MC-8L family) ............... 30

5.4 Segment Name and Symbol Name Space (Common to F 2MC-16 family and F 2MC-8L family)

.................................................................................................................................. 33

5.5 Absolute Allocation Attribute Section (F2MC-16 family).......................................... 34

5.6 ORG Instruction within Include/Macro (F2MC-16 family)......................................... 36

5.7 Boundary Aligning (F2MC-16 Family)...................................................................... 37

5.8 Precision in Arithmetic Operations (F2MC-16 family) ............................................. 38

5.9 LIST STR/NOSTR Instruction (F2MC-16 family) ..................................................... 39

5.10 &INCLUDE Instruction (F2MC-16 family).................................................................. 41

Page 6: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

vi

5.11 Bit Position Operation (F2MC-16 family) ................................................................. 42

5.12 Defining Assembler Control Commands (F2MC-8L family) ..................................... 43

5.13 LIST STR/NSTR (F2MC-8L family) .......................................................................... 46

5.14 &INCLUDE Instruction (F2MC-8L family).................................................................. 48

5.15 Bit Position Operation (F2MC-8L family) ................................................................. 49

5.16 IOSEG Embedded Declaration Symbol (F2MC-16 Family) ....................................... 50

CHAPTER 6 CONVERTING OPERATORS AND OPERANDS .............................. 51

6.1 Describing Integer Constants................................................................................... 52

6.2 Constants and Strings.............................................................................................. 53

6.3 Floating-point Numbers (F2MC-16 family Only) ...................................................... 54

6.4 Operator Priority ...................................................................................................... 55

6.5 Other Operand Description ...................................................................................... 56

CHAPTER 7 CONVERTING PSEUDO INSTRUCTIONS ...................................... 57

7.1 Correspondence of Pseudo Instructions between Conventional Assembler and SOFTUNE

Assembler ................................................................................................................. 58

7.2 NAME, END Pseudo Instructions .............................................................................. 59

7.3 EXTRN/EXTERN, PUBLIC Pseudo instructions........................................................ 60

7.4 CSEG Pseudo Instruction .......................................................................................... 62

7.5 DIRSEG Pseudo Instruction (F2MC-8L family Only) ............................................... 64

7.6 IOSEG Pseudo Instruction (F2MC-16 family Only) ................................................... 65

7.7 DSEG Pseudo Instruction .......................................................................................... 66

7.8 SSEG Pseudo Instruction .......................................................................................... 67

7.9 ENDS Pseudo Instruction .......................................................................................... 68

7.10 DBIT, DB, DW, DSL, DL, DFS, DFD Pseudo Instructions ................................ 69

7.11 RBIT, RB, RW, RSL, RL, RFS, RFD Pseudo Instructions ................................ 71

7.12 STRUC to ENDS Pseudo Instructions ......................................................................... 72

7.13 EQU and SET Pseudo Instructions .......................................................................... 73

7.14 REG Pseudo Instruction, PUSHW POPW Instruction (F2MC-16 family Only) ............ 74

7.15 EVEN, ORG Pseudo Instructions .............................................................................. 75

7.16 LIST, LISTON, LISTOFF Pseudo Instructions ..................................................... 76

7.17 PAGE Pseudo Instruction .......................................................................................... 78

7.18 TITLE and SUBTTL Pseudo Instructions................................................................ 79

CHAPTER 8 CONVERTING MACRO INSTRUCTIONS ....................................... 81

8.1 Correspondence of Macro Instructions between SOFTUNE Assembler and Conventional

Assemblers................................................................................................................ 82

CHAPTER 9 CONVERTING STRUCTURED CONTROL INSTRUCTIONS ............ 83

9.1 Correspondence of Structured Control Instructions between Conventional Assemblers and

SOFTUNE Assembler .................................................................................................. 84

Page 7: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

vii

9.2 Processing Other Structured Control Instructions .................................................. 87

CHAPTER 10 CONVERTING #PRAGMA PART FOR CC907 ............................................... 89

10.1 Converting #pragma asm Part ................................................................................ 90

10.2 Converting #pragma Section Part........................................................................ 91

APPENDIX ..................................................................................................... 93

A Error Messages ............................................................................................................. 94

Page 8: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

viii

Figures

Figure 1.1.a Outline of Operations of Assembler Source Convert Guide ................................. 2

Tables

Table 4-1 Options ............................................................................................................... 13

Table 5-1 List of Options Corresponding to Control Commands........................................ 44

Table 5-2 List of .LIST Instructions Corresponding to Control Commands ..................... 45

Table 6-1 Operator Priority ................................................................................................ 55

Table 7-1 Correspondence of Pseudo Instructions between Conventional Assembler and SOFTUNE

Assembler ........................................................................................................... 58

Table 7-2 Conditions for Converting LIST Pseudo Instruction (F 2MC-16) ........................ 76

Table 7-3 Conditions for Converting LIST Pseudo Instruction (F 2MC-8L) ........................ 77

Table 8-1 Correspondence of Macro Instructions between SOFTUNE Assembler and Conventional

Assemblers.......................................................................................................... 82

Table 9-1 Structured Control Instructions......................................................................... 84

Table 9-2 Structured Operation Expression....................................................................... 84

Table 9-3 Conditions........................................................................................................... 85

Table 9-4 List of Corresponding Comparison Conditional Expressions............................. 85

Table 10-1 List of Corresponding Default Section Names ................................................... 91

Table 10-2 Attributes Conversion Table .............................................................................. 91

Page 9: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

1

Chapter 1 Outline of Assembler Source Convert

GuideThis chapter outlines the Assembler Source Convert Guide.

1.1 Outline of Operations

Page 10: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

2

1.1 Outline of OperationsThis Assembler Source Convert Guide (hereafuter: ASCG) can be used to convert source files forconventional assemblers and C compilers into source files for the SOFTUNE assembler and Ccompiler.

♦ Outline of ASCG operations

The ASCG converts the input files defined at start-up, into a general-format file ingeneral for “fsam896s/fsam907s” or “fcc896s/fcc907s”. In case of nointend result for automatically convert, The ASCG is output warning message,and support that user must convert part. The converted file is stored in the sub-directory under the file name defined at start-up. When stored in the samedirectory, the input file and the converted file cannot share the same file name.

Figure 1.1.a shows an outline of operations of the Assembler Source ConvertGuide.

xxx.asm Assembler Source other\xxx.asm

Convert Guide

SOFTUNE Converts descriptions

C Checker

yyy.c tuned_yyy.c other\tuned_yyy.c

Figure 1.1.a Outline of Operations of Assembler Source Convert Guide<Note>

This is not a tool to convert source files generated for F2MC-8L into files for F2MC-16 or viceversa.

The input files must be files that can run without an error with conventional tools.

In converting C source files, only the #pragma asm and #pragma section part inthe cc907 specifications are conversion targets. Use the SOFTUNE C Checker'stransition mode to correct parts other than those described above, or source filesgenerated by other tools. However, asm statements in source files for other toolscan be converted by correcting them to #pragma asm format. For the #pragmaasm format, refer to the SOFTUNE C Compiler Manual. For further details on#pragma conversion specifications, see Chapter 9 of this manual.

[Source files for conventional tools] [Source files for SOFTUNE tools]

Page 11: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

3

Chapter 2 Environment VariablesThis chapter describes the environment variables used in this ASCG.

2.1 FELANG

Page 12: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

4

2.1 FELANG

Define message output format.This environment variable can be omitted.

♦ FELANG<Syntax>

SET FELANG={ASCII|SJIS}

<Description>

Defines message output format

Help and error messages are controlled by this variable.

• When ASCII defined, and when environment variable undefined:

Message output in ASCII codeThe message language is English.

Use this setup on non-Japanese environments.

• When SJIS defined:

Message output in SJIS code The message language is Japanese.

<Example>

SET FELANG=ASCII

Page 13: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

5

Chapter 3 Start-up and Basic OperationsThis chapter describes the start-up and basic operations of the ASCG.

3.1 Starting ASCG

3.2 Defining Input/Output Files

3.3 Conversion Process

3.4 Operation Messages

3.5 End Code

3.6 Conversion Limitations

Page 14: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

6

3.1 Starting ASCGThis section describes how to start the ASCG.

♦ Starting ASCG

The ASCG has following start-up formats as shown below:<Syntax>

For F2MC-16 family:

fscv907s [Option | Source file Name] …

For F2MC-8L family:

fscv896s [Option | Source file Name] …

<Note>

The start-up name “fscv907s ” is used below for explanation purposes.

<Description>

Two types of data should be defined as tool parameters.

• Defining options

Process strings starting with “- ” as an option.

• Defining input file names

Recognize any description other than options and option parameters as inputfile names.

When multiple input files are defined, the process is performed in the order ofthe file name appearance.The options defined at start-up are applied to all files. The location whereoptions are described has no meaning.

Page 15: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

7

3.2 Defining Input/Output FilesThe ASCG allows the operator to define multiple input files. To specify output files, use the “-o”option.

♦ Defining multiple input files

This ASCG allows the operator to define multiple files, with single entry at start-up. Two types of definitions are available as follows:

• Define all required file names

At tool start-up, define all necessary file names as the argument.<Example>

fscv907s -o other File1.asm File2.c File3.asm

• Define file names using wildcards

<Example>

fscv907s -o other *.asm *.c

In this case, the wildcard expansion rules depend on the OS wildcard rules.<Note>

When several files are defined at one time, all files can be target files as long as they are inputfiles. However, if any conflicting options are defined, or if data overwriting is defined, the last-described definition becomes valid.

♦ Output file name

The ASCG determines the output file destination based on the rules as follows:

(1) Assign the same file name with the file name in the input directory as theoutput file name, when a directory name is defined using the “-o” o ptionat ASCG start-up.

(2) Assign the defined file name as the output file name when a file name isdefined using the “-o ” option at ASCG start-up.

(3) When no definition made at start-up, the following output file name isassigned automatically.

Current directory \ input file name

If the above determination process gives the same file name for input and output files, the

ASCG displays an error and aborts the process.

Page 16: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

8

3.3 Conversion ProcessThis section describes the conversion process.

♦ Conversion process

The ASCG adds the following strings to the lead line of the converted file.<For F2MC-16 family>

/* fscv907s VxxLxx Conversion date */

<For F2MC-8L family >

/* fscv896s VxxLxx Conversion date */

Page 17: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

9

3.4 Operation MessagesThis section describes the messages displayed while the ASCG is operating. For further detailsabout each message, see Appendix A.

♦ Messages displayed during operation

The error detected during conversion is displayed in the following format:*** Conv-Name (Line-Num) Err-Num : Inf-Mes

Conv-Name : Indicates output file name

Line-Num : Indicates file line number

Err-Num : Indicates error type and error numberInf-Mes : Indicates error description

♦ Meaning of error number

E 0001 V

1 2 3

1: Error Level: This indicates the type of detected error.

W: The description on the error line may have not been converted completely.E: The error line could not be converted.

F: The error is outside the ASCG limits or there is a system fault.

2: Error Number: The error number is displayed as a 4-digit decimal.3: Tool Identifier: “V” is displayed to represent this ASCG.

Page 18: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

10

3.5 End CodeWhen the ASCG ends, it returns an end code before returning control to the OS.

♦ End code

When conversion is finished, before returning control to the OS, the ASCG returnsan end code indicating the tool's status. By using the value of this returned code,the operator can determine the approximate status of the conversion process.

l Ended normally : 0l Warning detected : 0 (1, if -cwno specified)

l Error detected : 2

l Ended abnormally : 3

Page 19: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

11

Chapter 4 Start-up OptionsThis chapter describes the available options when starting the ASCG.

4.1 Format for defining options

4.2 List of Options

Page 20: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

12

4.1 Format for defining optionsThe options defined at start-up consists of “-” followed by strings. To delimit option andparameters, use one or more blank characters.

♦ Format for defining options

In this tool, the options defined at start-up consists of strings described following“-”. To delimit option and parameters, use one or more blank characters.< Example >

fscv907s -o output.asm -V Input.asm

<Note>

The option description defined last becomes valid in the following cases:

When an identical option is defined more than once.When conflicting options are defined.

Case sensitive:

The option description is case sensitive.

Page 21: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

13

4.2 List of OptionsThis section describes available options and their details.

♦ List of options

Table 4-1 lists the options available in this tool.

Table 4-1 Options

Format Function Summary Initial Value

-o filename

or

-o pathname

Define output file name

Specify directory location to

store output file

Same file name with input

file at current directory

-f filename Define option file name No initial value

-V

-XV

Version information display

control

-V (displayed)

-help Output simple help Not displayed

-cmsg

-Xcmsg

Ending message output control -Xmsg (Not displayed)

-cwno

-Xcwno

Change ending code at warning

output

-Xcwno (0)

-BC

-XBC

Convert symbols to upper case -XBC (No conversion)

-w

-Xw [num,...]

Output warning messages -w (Displayed)

-asm

-Xasm

Handling of file extensions -asm (All .asm files)

-SJIS SJIS Character code assumed No initial value

Page 22: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

14

4.2.1 -o

The “-o” option is used to define the directory for output files or output file name.

♦ -o<Syntax>

-o Output directory name

-o Output file name

<Description>

Defines name of converted output file or directory where output files storedWhen multiple files are specified for simultaneous conversion and output filenames are described, the ASCG disregards this description and outputs awarning. If the option is described more than once, the option described lastbecomes valid. If the option is not defined, the ASCG creates a file under thesame name as the input file name in the current directory. However, if theinput file is in the current directory, an error occurs.

<Example>

fscv907s -o other *.asm

fscv907s -o a.asm b.asm

In terms of evaluation of whether the described characters represent a filename or a directory, the program assumes that they are a directory name if thecharacters match a directory name. If not, it assumes that they are a file name.For further details, see the section 3.2 of this manual.

Page 23: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

15

4.2.2 -f

The “-f” option reads the file described after “-f” as an option file.

♦ -f

<Syntax>

-f Option file name

<Description>

Reads described option fileThe option file is the file being read at start-up, and options are described withinthe file.By defining the option file description (“-f”), the ASCG reads the describedoption file. If the file extension is dropped, the ASCG adds “.opt” to process.

<Description Format of option file>

l The content of the descriptions in the option file is in accordance with theoption description defined at start-up. The operator can add line feedsand comments if necessary.

l Comments can be described in the option file. Use the followingdescription to specify comments.

− In-between /* */

− From // to line feed

− From ; to line feed

− From # to line feed

<Example>

foo.opt

-o sample # Output directry

-cmsg

<Restrictions>

l A single line in the option file can be up to 4095-characters long. Anycharacters exceeding this limit are disregarded.

l Files can be nested up to 8 levels within an option file by using multiple“-f” options.

Page 24: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

16

4.2.3 -V, -XVThe “-v” option displays the version information and copyright message displayed at tool start-up.(default)

The “-xv” option cancels the “-v” description.

♦ -V

<Syntax>

-V

<Description>

Displays version information and copyright message displayed at tool start-up<Example>

fscv907s -V

♦ -XV

<Syntax>

-XV

<Description>

Cancels -v description

<Example>

fscv907s -V -XV

Page 25: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

17

4.2.4 -help

The “-help” option displays simple help.

♦ -help

<Syntax>

-help

<Description>

Displays simple helpWhen this option is described, conversion cannot be made.

<Example>

fscv907s -help

<Result>

FFMC-16 Family Softune Assembler Source ASCG VxxLxx

ALL RIGHTS RESERVED, COPYRIGHT(c) FUJITSU LIMITED 19XX

LICENSED MATERIAL - PROGRAM PROPERTY OF FUJITSU LIMITED

USEAGE: FSCV907S [-Option,...] Input-Filename

-o Output File Name : Specification of OutputSource File Name

-o Directrry Path : Specification of Data outputdirectry.

-f Option File name : Specification of Option FileName

:

Page 26: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

18

4.2.5 -cmsg, -Xcmsg

The “-cmsg” option displays the end message, indicating the ASCG termination status.

The “Xcmsg” option cancels the “-cmsg” description (Default).

♦ -cmsg

<Syntax>

-cmsg

<Description>

Displays end message indicating ASCG termination statusWhen multiple files are processed in a single session, the following message isdisplayed at completion of the processing of each file.

When no error detected:

FSCV907S COMPLETED, FOUND NO ERROR : Input file Name

When error detected:

FSCV907S COMPLETED, FOUND ERRORS : Input file Name

<Example>

fscv907s -cmsg -o other *.asm

♦ -Xcmsg<Syntax>

-Xcmsg

<Description>

Cancels -cmsg description

<Example>

fscv907s -cmsg -o other *.asm -Xcmsg

Page 27: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

19

4.2.6 -cwno, -Xcwno

The “-cwno” option changes the end code to 1, when a warning is output during processing.

The “-Xcwno” option cancels the “-cwno” description.

♦ -cwno

<Syntax>

-cwno

<Description>

Changes end code to 1 when warning output during processing<Example>

fscv907s -cwno -o other *.asm

♦ -Xcwno

<Syntax>

-Xcwno

<Description>

Cancels -cwno option description<Example>

fscv907s -cwno -o other *.asm -Xcwno

Page 28: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

20

4.2.7 -BC, -XBC

The “-BC” option changes symbols into upper-case letters at conversion.

The “-XBC” option cancels the “-BC” description.

♦ -BC

<Syntax>

-BC

<Description>

Changes symbols into upper-case letters at conversionThe SOFTUNE assembler is always case-sensitive. If the conventional assemblerin use is not case-sensitive, specify this option.

<Example>

fscv907s -BC -o other *.asm

♦ -XBC

<Syntax>

-XBC

<Description>

Cancels -BC option description

<Example>

fscv907s -BC -o other *.asm -XBC

Page 29: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

21

4.2.8 -w, -Xw

The “-w” option outputs warning messages during conversion (default).

The “-Xw” option cancels “-w” description. Each warning message can be held from outputseparately by specifying a numeric value right after this option.

♦ -w

<Syntax>

-w

<Description>

Outputs warning messages output during conversion<Example>

fscv907s -w -o other *.asm

♦ -Xw

<Syntax>

-Xw [num,...]

<Description>

Cancels -w description, if ‘num’ not described.When ‘num’ is described, the warning messages corresponding to the specifiednumbers are held from output.See Appendix A for further details about warning messages and their numbers.

<Note>

When the operator wants to describe an input file name immediately to the right of this option,it is necessary to input a minus symbol with a blank space on both sides ‘-’ between the inputfile name and option. Otherwise, an error occurs.

<Example> fscv907s -o bar.asm -Xw 1001 - foo.asm

<Example>

fscv907s -w -o other *.asm -Xw

fscv907s -o bar.asm foo.asm -Xw 1001,1002

Page 30: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

22

4.2.9 -asm, -Xasm

The “-asm” option handles all input file as assembler source files (default).

The “-Xasm” option handles files other than .asm files as C source files.

♦ -asm

<Syntax>

-asm

<Description>

ASCG handles all input files as assembler source files.<Example>

fscv907s -asm -o other *.abc

<Note>

The “-asm” option handles files with the .c and .h extension as assembler source files.

♦ -Xasm

<Syntax>

-Xasm

<Description>

Cancels -asm option description so ASCG handles files other than .asm files asC source files.

<Example>

fscv907s -asm -o other *.abc -Xasm

Page 31: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

23

4.2.10 -SJIS

The “-SJIS” option assumes that the character code is set to Shift JIS when analyzing the source.

♦ -help

<Syntax>

-SJIS

<Description>

Assumes that character code of input source set to Shift JIS when analyzingsource.

<Example>

fscv907s -SJIS -o output.asm input.asm

Page 32: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

24

MEMO

Page 33: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

25

Chapter 5 Hand-operated Conversion Support

FunctionThis section describes the hand-operated conversion support function.

♦ Hand-operated conversion support function

In following case, the ASCG detect no intend result for automatically convert, andoutput warning message. At this message, the ASCG support that user mustconvert part.

• Incompletely-converted items common to source files for F2MC-16 family and F 2MC-8L

5.1 &SET macro

5.2 Macro instructions

5.3 Character constant

5.4 Segment name and symbol name

• Incompletely-converted items in source files for F2MC-16 family

5.5 Absolute allocation attribute section

5.6 ORG command within include/macro

5.7 Boundary aligning

5.8 Precision in arithmetic operations

5.9 LIST STR/NOSTR instruction

5.10 &INCLUDE instruction

5.11 Bit position operation

5.16 IOSEG embedded declaration symbol

• Incompletely-converted items in source files for F2MC-8L family

5.12 Specifying assembler control commands

5.13 LIST STR/NSTR instruction

5.14 &INCLUDE instruction

5.15 Bit position operation

Page 34: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

26

5.1 &SET Macro (Common to F2MC-16 family and F2MC-8L

family)

The &SET macro is converted to #set. However, the result may defer, because the symbol valuedefined by &SET is expanded only when the macro argument refers to the symbol value. However,with #set, every defined symbol value is an expansion target.

♦ &SET macro

• Specifications of conventional assembler

The symbol value defined by &SET is expanded only when the macro argumentrefers to the symbol value.

<Source>

&SET SYM 5

&IF SYM EQ 5

MOV A, SYM

&ENDIF

<Image after expansion>

MOV A, SYM ; Refer to the data at the address of label namedSYM.

• Specification of SOFTUNE assembles.

Every symbol value defined with #set is expanded.<Source>

#set SYM 5

#if SYM == 5

MOV A, SYM

#endif

<Image after expansion>

MOV A, 5 ; Refer to the data at address 5.

• ASCG process

&SET is converted to #set. The warning message “W 1 001V: Used &SETmacro. ” is output at the line.

• Problem

Although the symbol value defined by &SET is expanded only when the macroargument refers to the symbol value, #set expands every defined symbolvalue. Consequently, the result may be different.

Page 35: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

27

• Solution

The operator must change the name of the symbol defined by #set to adifferent name. In addition, the symbol on the referred side also must bechanged accordingly.

<Solution>

#set MACSYM 5

#if MACSYM == 5

MOV A, SYM

#endif

Page 36: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

28

5.2 Macro Instructions (Common to F2MC-16 family and

F2MC-8L family)

Since the actual argument is unknown at processing of the dummy argument, the ASCG cannotrecognize the actual argument properly if the ASCG selects a conversion type according to theactual argument. This may result in incorrect conversion.

♦ Macro Instructions

• ASCG process

A primary rule of conversion is that it is executed in line units, regardless of whether ornot the processed line is a macro instruction. The “W1002: Check using of macroparameter. ” warning message is output at converted-file &MACRO lines.

• Problem

Since the actual argument is unknown at processing the dummy argument,the ASCG is unable to recognize the actual argument properly if the ASCGselects a conversion type depending on the actual argument. This may resultin incorrect conversion.

<Example> Common to F2MC-16 family and F2MC-8L family

Before conversion:&MACRO MAC para

DB \para

&ENDM

MAC ”string”

After conversion:

#macro MAC para

.DATA.B \para ; Unable to convert into .SDATAB.#endm

MAC ‘string’ ; The restrictions described in the section 5.3.

<Example 2> F2MC-16 family only

Due to the difference in the priority of operators, the interpretation could bedifferent before and after conversion.

Before conversion:&MACRO MAC para

MOV A, \para SHL 1

&ENDM

MAC 1 + 3 ; Interpreted as MOV A, 1 + (3 SHL 1)

After conversion:#macro MAC para

Page 37: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

29

MOV A, \para << 1

#endm

MAC 1 + 3 ; Interpreted as MOV A, (1 + 3) << 1

• Solution

As shown in Example 1, when the actual argument of the entire macro affectsthe selection of conversion type, the operator can correct the description asshown in the correction example in section 5.3.On the other hand, as shown in Example 2, when the target of conversion typeselection is only part of the description, the operator must rewrite the sourcedescriptions (Expand the macro manually, or rewrite the macro definitionitself, etc.).

Page 38: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

30

5.3 Character Constants (Common to F2MC-16 family and

F2MC-8L family)

In other assemblers, “ ” (double quotes) are used to define character constants; in the SOFTUNE

assembler ‘ ’ (single quotes) are used with operands, exceptfor .SDATAB, .PROGRAM, .TITLE, .HEADING, and #include instructions.

If double quotes are used with operands for macro instructions, the ASCG cannot distinguish theabove differences, resulting in an error.

♦ Character Constants

• Specifications of conventional assemblers

With conventional assemblers, descriptions of character constants usingdouble quotes are allowed.

<Example>

MOV A, #“123” ; No error

• Specifications of SOFTUNE assembler

With the SOFTUNE assembler, descriptions of character constants using doublequotes are not allowed.

<Example>

MOV A, #“123” ; Error

• ASCG process

With respect to operands excluding operands for DB, NAME, TITLE, SUBTTL,#INCLUDE instructions in conventional assemblers, double quotes enclosingcharacter constants are converted to single quotes, and the warning message“W1003V: Change double quoted constant.” is output at the line (Doublequotes (Single quotes)) of the converted file.

• Problem

When double quotes are used with macro-instruction operands, the ASCG isunable to distinguish the above-mentioned excluded instructions from othersand replaces double quotes with single quotes. For this reason, descriptionswhere macro arguments are used with the above-mentioned excludedinstructions, cause an error at assembling.

<Note>

When the string length is a maximum of 4 letters in the above example, the source file for theF2MC-16 family can be assembled without an error.However, the operator must realize that the value is allocated to memory in reverse order (‘str’has the same effect as “rts ”) because the endian is little.

Page 39: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

31

• Solution

The user must reconvert such single quotes back to double quotes.<Correction Example>

#macro MAC param

.SDATAB \param ; Converted to .DATA.B; must be changed backto .SDTAB.

#endm

.DATA.B “DB string ”

MAC “string ” ; Single quotes must be changed back to double quotes.

Page 40: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

32

MEMO

Page 41: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

33

5.4 Segment Name and Symbol Name Space (Common to

F2MC-16 family and F2MC-8L family)

In the SOFTUNE assembler, the segment name and symbol name cannot be the same.

♦ Segment name and symbol name

• Specifications of conventional assembler

A conventional assembler allows the operator to use the same name for thesegment name and symbol name.

<Example>

sym EQU 1

sym DSEG ; OK

...

sym ENDS ; OK

• Specifications of SOFTUNE assembler

With SOFTUNE assembler, the same segment name and symbol name isprohibited.

<Example>

sym .EQU 1

.SECTION sym, DATA, ALIGN=2 ; Error

• ASCG process

Conversion is performed “as is”. The ASCG does not issue a warningmessage.

• Problems

If the file is assembled without correction, an error occurs as a result of theduplication.

• Solution

The operator must change either the section name or symbol name toeliminate the duplication. Furthermore, the operator must locate referencesto the changed section or symbol and make the necessary corrections.

<Correction Example>

sym .EQU 1

.SECTION sec_sym, DATA, ALIGN=2 ; When changing sectionname is selected.

Page 42: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

34

5.5 Absolute Allocation Attribute Section (F2MC-16 family)

In the SOFTUNE assembler, the address in the .SECTION pseudo instruction is the starting address.If a smaller address value is defined later, it causes an error at assembling.

♦ Absolute allocation attribute section

• Specifications of conventional assemblers

In conventional assemblers for the F2MC-16 family, the starting address of theabsolute allocation attribute section is set to the smallest value of the locationcounters as shown below.

<Example>

CSEG1 CSEG ABS=H ’FF:H ’200 ; Set to H’FF0200

... ORG H ’100 ; Reset to H’FF0100

... ORG H ’50 ; Re-reset to H’FF0050

In this case, the starting address of CSEG1 is H’FF0050.

• Specifications of SOFTUNE assembler

In the SOFTUNE assembler, the address written in the .SECTION pseudoinstruction is the starting address. If a smaller address value is defined later,it causes an error at assembling.

<Example>

.SECTION CSEG1, CODE, LOCATE=H ’FF0200

...

.ORG H ’FF0100 ; Error

...

.ORG H ’FF0050 ; Error

• ASCG process

The ASCG performs conversion of the absolute allocation section with thefollowing rules. The warning message “W1004V: Check section startaddress. ” is output at the line of the converted file.

< When only upper 8-bit part of address defined in ABS description format >

l Comment-only and blank-only lines are skipped starting from the linenext to the section-start instruction of the section specified by thisdescription.

l If the first line is the ORG instruction, the lower 16-bit address is set to theoperand value of the ORG instruction.

l If the first line is not the ORG instruction, the lower 16-bit address is set to0.

<Example>

Before conversion

Page 43: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

35

CSEG1 CSEG ABS=H ’FF

; comment or blank lines

ORG H ’100

After conversion .SECTION CSEG1, CODE, LOCATE=(H’FF <<16)+H ’100 ; comment or blank lines

.ORG (H ’FF << 16)+H ’100

<When lower 16-bit part of address also defined in ABS description format>

l The lower 16-bit value is set to the value written in the section-startinstruction of the section specified by this description.

l The ASCG will not read the value even if the next line contains the ORGinstruction.

<Example>

Before conversion CSEG1 CSEG ABS=H ’FF:H ’200

; comment or blank lines

ORG H ’100

After conversion .SECTION CSEG1, CODE, LOCATE=(H’FF << 16)+H’200

; comment or blank lines

.ORG (H ’FF << 16)+H ’100

• Problems

The ASCG recognizes the lower 16-bit value found first as the starting address,without trying to find the lowest value in the specified section. Therefore, ifan address location with a lower value is specified later, the ASCG cannotachieve the expected conversion results, causing an error at assembling.

• Solution

The operator must change the starting address of the specified section to thelowest address value.

<Example of change>

.SECTION CSEG1, CODE, LOCATE=H ’FF0050 Changed

.ORG H ’FF0200 ; Added

...

.ORG (H ’FF << 16) + H ’100

...

.ORG (H ’FF << 16) + H ’50

Page 44: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

36

5.6 ORG Instruction within Include/Macro (F2MC-16 family)

When a description is made to define the ORG instruction using the file acquired through macroexpansion or the INCLUDE instruction, the ASCG performs conversion based on the location of thisdescription.

♦ ORG instruction within INCLUDE/macro

• Specifications of conventional assemblers

With conventional assemblers, the ORG instruction specifies the address valuewith lower 16-bit, both in absolute locating section and relative locatingsection.

<Example in absolute locating section>

CSEG1 CSEG ABS=H ’FF ; Absolute locating ...

ORG H ’100 ; Allocated at H’FF0100 actually

• Specifications of SOFTUNE assembler

With the SOFTUNE assembler, the ORG instruction specifies the address valuewith lower 16-bit in relative locating section, but requires a 24-bit value inabsolute locating section.

<Example of definition in absolute locating section>

.SECTION CSEG1, CODE, LOCATE=H ’’FF0000

...

.ORG H ’FF0100

• ASCG process

Based on the description location, the ASCG converts the operand value of theORG instruction within the absolute locating section to a 24-bit value. Thewarning message “W1005V: Used ORG instruction.” is output at all linesof the converted file containing the ORG instruction.

• Problems

When a description is made to define the ORG instruction using the fileacquired through macro expansion and the &INCLUDE instruction, the ASCGcannot recognize that the operand value is for the ORG instruction, andperforms conversion with the value

• Solution

The operator must change the operand value of the ORG instruction to a 24-bitvalue.

Page 45: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

37

5.7 Boundary Aligning (F2MC-16 Family)

When a 256-byte boundary alignment is defined using the Page pseudo instruction within a segmentwith a BYTE/WORD attribute, and that 2-byte boundary alignment is defined by an EVEN pseudoinstruction within a segment having BYTE attribute, an error occurs at assembling because thesefunctions are not supported by the SOFTUNE assembler.

♦ Boundary aligning

Specifications of conventional assemblers

With conventional assemblers, 256-byte boundary alignment is definable withina segment having a BYTE/WORD attribute by using the Page pseudo instruction.

In addition, 2-byte boundary alignment within a segment having a BYTEattribute is definable by using the EVEN pseudo instruction.

• Specifications of SOFTUNE assembler

With the SOFTUNE assembler, an error occurs at assembling if the definedvalue is larger than the boundary alignment value defined in the section.

• ASCG process

The PAGE instruction is converted to .ALIGN256, and the EVEN instruction isconverted to .ALIGN2. The ASCG does not output a warning message.

• Problems

A program that specifies a larger value than the boundary alignment valuedescribed at the section lead, may be logically incorrect.

• Solution

The operator must review the program because assembling the converted file“as is” could cause an error.

If the value is erroneous, correct the boundary alignment value described inthe section to the largest value. If the value is not faulty, the operator canachieve the same result by rewriting the PAGE instruction with the followingdescription.

.ORG $ + (256 - $ % 256) % 256

The operator can achieve the same result by rewriting the EVEN instructionwith the following description.

.ORG $ + $ % 2

Page 46: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

38

5.8 Precision in Arithmetic Operations (F2MC-16 family)

There are differences in the operational precision between conventional assemblers for the F2MC-16family, and the SOFTUNE assembler.

♦ Precision in arithmetic operations

• Specifications of conventional assemblers

In conventional assemblers, the precision of arithmetic operations is 33 bitssigned.

• Specifications of SOFTUNE assembler

With the SOFTUNE assembler, the precision in arithmetic operations is 32 bits.Signed or unsigned is distinguished automatically. signed and unsigned

• ASCG process

No special attention is paid to the difference in operational precision atconversion. When SHL and SHR operators are used in a source file, a warningmessage “W1007V: Possible differ operation result.” is output at theline of the converted file

• Problems

The operation result differs where bit 33 is in use (SHL and SHR operators fall inthis group).

<Example>

SOFTUNE assembler: (H’FFFFFFFF << 1) / 2 Result: H’7FFFFFFFConventional assembler for F2MC-16 family: (H’FFFFFFFF SHL 1) / 2 Result:H’FFFFFFFF

• Solution

Check the result, and modify the operational expression as required.

Page 47: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

39

5.9 LIST STR/NOSTR Instruction (F2MC-16 family)

The LIST STR instruction and LIST NOSTR instruction are not supported, but in the SOFTUNE

assembler, the EXP/NOEXP instructions support these functions.

♦ LIST STR/NOSTR Instruction

• Specifications of conventional assemblers

With conventional assemblers, on/off list output of macro-expanded sourcelines can be defined using “LIST EXP/NOEXP”.

On/Off list output of the source lines generated by structured controlinstructions with “LIST STR/NOSTR”.

• Specifications of SOFTUNE assembler

With the SOFTUNE assembler, on/off list output of macro-expanded source lines,including structured control instructions, is definable using “LISTEXP/NOEXP”.

• ASCG process

“LIST STR/NOSTR” is converted to “LIST EXP/NOEXP”. The warningmessage “W1008V: Change LIST parameter.” is output at the line in theconverted file.

• Problems

In a conventional assembler, two instructions (LIST STR, LIST NOSTR) areused when specifying list output, but with the SOFTUNE assembler, a singleinstruction (EXP/NOEXP) is used. For this reason, list output specified by twoinstructions, when converted to single-instruction list output, may have adifferent list output range than the intended range.

<Example>

Before conversion LIST EXP

...

LIST STR

...

LIST NOEXP

...

LIST NOSTR

Page 48: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

40

After conversion .LIST EXP

...

.LIST EXP

...

.LIST NOEXP ; No list output from here ...

.LIST NOEXP

• Solution

Check the list output range, and then locate “LIST NOEXP” to delete.

Page 49: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

41

5.10 &INCLUDE Instruction (F2MC-16 family)

There are differences in searching the specified file between a conventional assembler for theF2MC-16 family and the SOFTUNE assembler.

♦ &INCLUDE Instruction

• Specifications of conventional assembler

The &INCLUDE instruction searches the include file in the following order.

(a) Search the directory specified using the INCLUDE control instruction ofoptions at start-up, excluding the directory path from the file namedescribed using the &INCLUDE instruction.

(b) Search the file name described using the &INCLUDE Instruction.(c) Search the directory set-up by the ‘INC907’ or ‘INC902’ environment

variable.

• Specifications of SOFTUNE assembler

When the specified file name does not include a path, the #include instructionsearches the include file in the following order:

(a) Search the current directory.(b) Search the directory specified by the ‘-I’ option at start-up.

(c) Search the directory set-up by the ‘INC907’ environment variable.

(d) Search %FETOOL%\LIB\907\INCLUDE in the ‘FETOOL’ environmentvariable.

• ASCG process

&INCLUDE instructions converted to #include instruction. The warningmessage “W1009V: Used &INCLUDE instruction.” is output at the line ofthe converted file.

• Problems

An unintended file may be read if there are files with the same name in morethan one directory due to the different search order in locating the include file.

• Solution

To have SOFTUNE assembler perform the same operation as a conventionalassembler, the ‘-I’ option must be used. If there is any matching file in thecurrent directory, it must be moved to another directory.

Page 50: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

42

5.11 Bit Position Operation (F2MC-16 family)

There are differences in interpretation of bit positioning between the SOFTUNE assembler and aconventional assembler for the F2MC-16 family.

♦ Bit position operation

The following examples show the differences in interpretation of bit positioningbetween the SOFTUNE assembler and a conventional assembler for F2MC-16 family.<Source Example>

SETB _a:2:3

<Interpretation (Conventional assembler)>

SETB _a:3 ; The value described last is valid.<Interpretation (SOFTUNE assembler)>

; Syntax error

<Source Example>

BIT EQU _a:2

SETB BIT:3

<Interpretation (Conventional assembler)>

SETB _a:3 ; SETB _a:5. Could be as well<Interpretation (SOFTUNE assembler)>

SETB _a:5<Source Example> EXTBIT EQU _a:2 Defined in separate module

.IMPORT EXTBIT

SETB EXTBIT:3

<Interpretation (Conventional assembler)>

SETB _a:3

<Interpretation (SOFTUNE assembler)>

SETB _a:5

• Solution

The ASCG outputs a warning message, “W1010V: Used bit symbol inEQU.”, at the line after converting “EQU bit symbol”. The operator mustmake a correction, using ‘BITADR’ operator or etc., by manually locating theplace where the symbol is used. In the first example shown above, theoperator can perform search and correction by inspecting the assembler erroroutput.

Page 51: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

43

5.12 Defining Assembler Control Commands (F2MC-8L

family)

Assembler control commands defined at the lead part of source descriptions are not supported bythe SOFTUNE assembler. For this reason, such parts are left but are handled as comments inconverted files.

♦ Defining assembler control commands

• Specifications of conventional assembler

In conventional assemblers, definition of assembler control commands insource description is allowed.

• Specifications of the SOFTUNE assembler

Definition of assembler control commands in source description is not allowedwith the SOFTUNE assembler.

• ASCG process

The line is left as a comment in the converted file. The warning message,“W1011V: Used assembler control command.”, is output at the linechanged to a comment.

<Example>

Before conversion $CP

$NL

After conversion ;$CP

;$NL

• Problems

An unintended result may occur because the definition is invalid.

Page 52: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

44

• Solution

If the operator wants to keep the definition valid, assembler controlcommands must be redefined as options at start-up of the SOFTUNE assembleraccording to the list shown in Table 5-1. List control commands can bereplaced with .LIST instructions according to Table 5-2. Furthermore, NCPfunctions remain valid by defining ‘-BC’ using the ASCG option. For CPfunctions, the SOFTUNE assembler performs assembling as if CP/. wasoriginally defined.

Other items (/) are not supported.

Table 5-1 List of Options Corresponding to Control Commands

Control Command Corresponding

Option

Control Command Corresponding

Option

O(filename) -o filename CL (LIST)

NO -Xo NCL (LIST)

DBG/DEB -g EXP -lexp ON

LO NEXP -lexp OFF

HL STR (LIST)

NDB -Xg NSTR (LIST)

L/L

(filename)

-l/-lf

filename

EP

NL -Xl NEP

XR -lcros ON ICL -linc ON

PL(num) -pl num NICL -linc OFF

PW(num) -pw num IL(dirname) -I dirname

CD (LIST) CP

NCD (LIST) NCP

DEF (LIST) CY

NDEF (LIST)

Note:

A diagonal line in the Corresponding Option column indicates that there is no option corresponding to a control

command. (LIST) notation can be corresponded according to the Table 5-2.

Page 53: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

45

Table 5-2 List of .LIST Instructions Corresponding to Control Commands

Control

Command

Corresponding Option Control

Command

Corresponding Option

CD .LIST COND CL .LIST CALL

NCD .LIST NOCOND NCL .LIST NOCALL

DEF .LIST DEF STR .LIST EXP

NDEF .LIST NODEF NSTR .LIST NOEXP

Page 54: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

46

5.13 LIST STR/NSTR (F2MC-8L family)

The LIST STR instruction and LIST NSTR instruction are not supported. However, in SOFTUNE

assembler, the EXP/NOEXP instructions support identical functions.

♦ LIST STR/NSTR

• Specifications of conventional assembler

A conventional assembler allows the operator to specify On/Off list output ofmacro-expanded source lines using “LIST EXP/NEXP”.

Also, it allows the operator to specify On/Off list output of source linesgenerated by structured control instructions using “LIST STR/NSTR”.

• Specifications of SOFTUNE assembler

SOFTUNE assembler allows the operator to specify On/Off list output of sourcelines expanded with a macro including structured control instructions using“LIST EXP/NOEXP” .

• ASCG process

“LIST STR/NSTR” is converted to “LIST EXP/NOEXP”. The warning message,“W1008V: Change LIST parameter.”, is output at the line of the convertedfile.

• Problems

Two instructions, LIST STR; LIST NSTR, are used by a conventionalassembler to specify list output. However, in SOFTUNE assembler, a singleinstruction, EXP/NOEXP, is used. For this reason, when list output setupusing two instructions in a conventional assembler is converted to single-instruction setup in SOFTUNE assembler, the list output range can be differentfrom that intended originally.

<Example>

Before conversion LIST EXP

...

LIST STR

...

LIST NEXP

...

LIST NSTR

Page 55: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

47

After conversion .LIST EXP

...

.LIST EXP

...

.LIST NOEXP ; No list output from here ...

.LIST NOEXP

• Solution

The operator must delete “LIST NOEXP”, and check the list output range.

Page 56: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

48

5.14 &INCLUDE Instruction (F2MC-8L family)

There are differences in searching a specified file between the SOFTUNE assembler and aconventional assembler for the F2MC-8L family.

♦ &INCLUDE instruction

• Conventional assembler for F2MC-8L family

The &INCLUDE instruction searches for an include file in the following order.

(a) Search the directory described by INCLUDE control commands in optionsat start-up.

(b) Search the current directory.

(c) Search the directory where the source file is located.(d) Search directory set up with the ‘INC96’ environment variable.

• SOFTUNE assembler

When no path included in the specified file name, the #include instructionsearches for an include file in the following order.

(a) Search the current directory.(b) Search the directory defined by ‘-I’ option at start-up.

(c) Search the directory set up with the ‘INC896’ environment variable

(d) Search %FETOOL%\LIB\896\INCLUDE of the ‘FETOOL’ environmentvariable.

• ASCG process

&INCLUDE is converted to #include. The warning message, “W1009V: Used&INCLUDE instruction.”, is output at the line of the converted file.

• Problems

Due to the difference in search order for an include file, an unintended filemight be read if there are files with the same name in two or more differentdirectories.

• Solution

To have this assembler perform the same operation as a conventionalassembler, the operator must use the ‘-I’ option.

If there are any matching files in the current directory, the operator mustmove one file to another directory.

Page 57: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

49

5.15 Bit Position Operation (F2MC-8L family)

There are differences in interpretation of the bit positioning of external reference symbols betweenthe SOFTUNE assembler and a conventional assembler for the F2MC-8L family.

♦ Bit Position Operation

The following examples show the differences in interpretation of bit positioningbetween the SOFTUNE assembler and conventional assembler for the F2MC-8Lfamily.<Source Example>

SETB _a:2:3

<Interpretation (Conventional assembler)>

SETB _a:5 ; The value interpreted as added together.<Interpretation (SOFTUNE assembler)>

; Syntax error

<Source Example>

POS EQU 2:1 SETB _a:POS

<Interpretation (Conventional assembler)>

SETB _a:3 ; The value interpreted as added together.<Interpretation (SOFTUNE assembler)>

Syntax error

• Solution

The ASCG outputs a warning message, “W1010V: Used bit symbol inEQU.”, at the line after converting “EQU bit symbol”. The operator mustmake a correction by manually locating the place where the symbol causing anerror is used. The operator can make the necessary search and correction byinspecting the assembler error output.

Page 58: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

50

5.16 IOSEG Embedded Declaration Symbol (F2MC-16 Family)

You must always specify the IO prefix symbol _I:_ when you are using the symbols declared by theEXTERN/EXTRN in the IOSEG area when using the SOFTUNE Assembler.

♦ IOSEG embedded declaration symbols

The handling of the symbols declared at the EXTERN or the EXTRN in the IOSEGarea differs in the following ways for the current F2MC-16 Family Assembler andthe SOFTUNE Assembler.<Source Example>

IOSEG IOSEG EXTERN IO_A

IOSEG ENDS

… MOV A, IO_A ; IO addressing<Converted Source Example>

.SECTION IOSEG, IO, ALIGN=1

.IMPORT IO_A

… MOV A, IO_A ; ea addressing

• Problems

Mechanical instructions for differing operations will exist after the conversion because ASCGis converted without regard for whether the symbol declared by the EXTERN/EXTRN wasdeclared in the IOSEG area.

• Solution

The ASCG outputs the warning message “_W1012V: Check using position ofdeclared symbol in IOSEG area. ” for the IOSEG line so it is necessary for theoperator to manually search for the area where the symbol declared by the EXTERN/EXTRNis used in the IOSEG area and write _I:_ before the symbol as shown below.

<Changed Source Example>

.SECTION IOSEG, IO, ALIGN=1

.IMPORT IO_A

… MOV A, I:IO_A ; Area that was changed.

Page 59: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

51

Chapter 6 Converting Operators and OperandsThis chapter describes conversion of operators and operands.

6.1 Describing Integer Constants

6.2 Character Constants and Strings

6.3 Floating-point Numbers (F2MC-16 family Only)

6.4 Operator Priority

6.5 Other Operand Description

Page 60: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

52

6.1 Describing Integer ConstantsSince there is no difference in description of integer constants between the SOFTUNE assembler andconventional assemblers, the ASCG makes an “as is” copy of the description.

♦ Describing Integer Constants

Describe numerical values in the following formats.l Binary number: Add prefix (B’ or Ob), or suffix (B).

l Octal number: Add prefix (Q’ or O), or suffix (Q).

l Decimal number: Add prefix (D’), or suffix (D).

l Hexadecimal number: Add prefix (H’ or Ox), or suffix (H).

Page 61: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

53

6.2 Constants and StringsAs conventional assemblers can handle up to 4-letter-long string constants as a character constant,string constant written in operand is converted to character constant.

♦ Character Constants

Single quotes in character constant definitions are converted to \’, and \ isconverted to \\.

♦ String

Two double quotes in succession in a string definition are converted to \”, and \ isconverted to \\. As shown in the following example, the data definition is dividedin the description of the DB pseudo instruction statement.<Example>

DB “1234”,h’0d,h’0a à .SDATA “1234”

à .DATA.B h’0d,h’0a

Page 62: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

54

6.3 Floating-point Numbers (F2MC-16 family Only)The ASCG replaces floating-point numbers (F2MC-16 family only) with numbers in a correspondingdescription format.

♦ Floating-point Numbers (F2MC-16 family Only)

d represents a decimal numerical value, h represents a hexadecimal value, andothers represent strings.

• Descriptions in conventional assemblers for 16 family

<Syntax 1>

F’[+|-]{.d|d[.[d]]} [S|D[[+|-]d]]

With S|D, switch single precision or double precision

<Syntax 2>

H’h

When h does not fill the specified data width, 0s are padded at lower blank digits.When h is longer than the specified data width, lower digits are deleted to fit.

• Descriptions in SOFTUNE assembler

<Syntax 1>

[0r|F’][+|-]{.d|d[.[d]]}[e[[+|-]d]]

The precision depends on the pseudo instruction

<Syntax 2>

H’h

Describing h in full data length required

<Syntax 3>

0xh

Describing h in full data length required

Page 63: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

55

6.4 Operator PriorityTable 6-1 lists the priority assigned to operators in each assembler. As shown, some operatorshave different priority, so the ASCG absorbs such difference by using parentheses.

♦ Operator priority

Table 6-1 Operator PriorityOperators in

SOFTUNEPriority Operators in

conventional F2MC-Priority Operators in

conventionalPriority

( ) 1 ( ) 1 ( ) 1

– NOT 2 NOT 6

!

Unary + Unary + Unary +

Unary – Unary – Unary –

2

BITADR %

BITPOS !

2

% 2

PAGE $

BNKSEC ?

BNKSYM !

No particular priority

SIZEOF

2

SEGSIZE No particular priority SEGSIZE 2

* * *

/ / /

%

3

MOD

3

MOD

3

+ + +

4

4

4

<< SHL SHL

>>

5

SHR

5

SHR

3

< LT LT

<= LE LE

> GT GT

>=

6

GE

6

GE

== EQ EQ

!=

7

NE

7

NE

5

& 8 AND 8 AND 7

^ 9 XOR 9 XOR

| 10 OR 10 OR

8

&& 11

|| 12

Page 64: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

56

6.5 Other Operand DescriptionThis section describes prefixes to determine addressing (F2MC-16 family only), suffixes to determinedisplacement (F2MC-16 family only), and the location counter.

♦ Prefixes to determine addressing

A conventional assembler for F2MC-16 has prefixes to determine three types (I: , S:,and D:) of addressing modes. These specifications are the same in the SOFTUNE

assembler, so an “as is” copy is made.

♦ Prefix to determine displacement

The suffixes corresponding to \8 and \16 of a conventional assembler for F2MC-16are identical in the SOFTUNE assembler, so an “as is” copy is made.

♦ The location counter

The location counter symbol differs as follows, so the symbol is converted to thecorresponding one.l SOFTUNE assembler : $l Conventional assembler : *

Page 65: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

57

Chapter 7 Converting Pseudo InstructionsThis chapter describes conversion of pseudo instructions.

7.1 Correspondence of Pseudo Instructions between Conventional Assembler

and SOFTUNE Assembler

7.2 NAME, END Pseudo Instructions

7.3 EXTRN/EXTERN, PUBLIC Pseudo instructions

7.4 CSEG Pseudo Instruction

7.5 DIRSEG Pseudo Instruction (F2MC-8L family Only)

7.6 IOSEG Pseudo Instruction (F2MC-16 family Only)

7.7 DSEG Pseudo Instruction

7.8 SSEG Pseudo Instruction

7.9 ENDS Pseudo Instruction

7.10 DBIT, DB, DW, DSL, DL, DFS, DFD Pseudo Instructions

7.11 RBIT, RB, RW, RSL, RL, RFS, RFD Pseudo Instructions

7.12 STRUC to ENDS Pseudo Instructions

7.13 EQU and SET Pseudo Instructions

7.14 REG Pseudo Instruction, PUSHW POPW Instruction (F2MC-16 family Only)

7.15 EVEN, ORG Pseudo Instructions

7.16 LIST, LISTON, LISTOFF Pseudo Instructions

7.17 PAGE Pseudo Instruction

7.18 TITLE and SUBTTL Pseudo Instructions

Page 66: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

58

7.1 Correspondence of Pseudo Instructions between

Conventional Assembler and SOFTUNE AssemblerTable 7-1 shows the list of pseudo instructions of the SOFTUNE assembler corresponding to those ofconventional assemblers.

♦ Correspondence of pseudo instructions of conventional assemblers SOFTUNE assembler

Table 7-1 Correspondence of Pseudo Instructions between Conventional Assembler and

SOFTUNE Assembler

Conventional

Assembler

SOFTUNE

Assembler

Conventional

Assembler

SOFTUNE

Assembler

NAME .PROGRAM RSL (16) .RES.E

END .END RL (16) .RES.L

EXTRN/EXTE

RN

.IMPORT DFS (16) .FDATA.S

PUBLIC .EXPORT DFD (16) .FDATA.D

CSEG .SECTION RFS (16) .FLOAT

DIRSEG (8L) .SECTION RFD (16) .DOUBLE

IOSEG (16) .SECTION STRUC to ENDS .STRUCT

to .ENDS

DSEG .SECTION EQU .EQU

SSEG .SECTION SET .EQU

ENDS Commented Out REG (16) .REG

DBIT .DATA.I EVEN .ALIGN

DB .DATA.B ORG .ORG

DW .DATA.H LIST .LIST

DSL (16) .DATA.E LISTOFF .LIST

DL (16) .DATA.L LISTON .LIST

RBIT .RES.I PAGE .PAGE

RB .RES.B TITLE .TITLE

RW .RES.H SUBTTL .HEADING

(8L) : F2MC-8L family only

(16) : F2MC-16 family only

Page 67: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

59

7.2 NAME, END Pseudo Instructions

The NAME pseudo instruction is converted to the .PROGRAM pseudo instruction.

The END pseudo instruction is converted to the .END instruction.

♦ NAME pseudo instruction

NAME is converted to .PROGRAM.<Example>

NAME “TEST NAME” à .PROGRAM “TEST NAME”

♦ END pseudo instruction

END is converted to .END.

Page 68: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

60

7.3 EXTRN/EXTERN, PUBLIC Pseudo instructions

The EXTRN/EXTERN pseudo instruction is converted to the .IMPORT pseudo instruction.

The PUBLIC pseudo instruction is converted to the .EXPORT pseudo instruction.

♦ EXTRN/EXTERN pseudo instruction

EXTRN/EXTERN is converted to .IMPORT.<Example>

EXTRN ABC,BCD à .IMPORT ABC,BCD

♦ PUBLIC pseudo instruction

PUBLIC is converted to .EXPORT.<Example>

PUBLIC ABC,BCD à .EXPORT ABC,BCD

Page 69: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

61

MEMO

Page 70: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

62

7.4 CSEG Pseudo Instruction

The CSEG pseudo instruction is converted to the .SECTION pseudo instruction.

♦ CSEG pseudo instruction

CSEG is converted to .SECTION. The following rules are applied to conversion.

• F2MC-16 family

l Section name: The name in the original source is used as is.l PUBLIC attribute: The description is deleted. In the SOFTUNE

assembler, PUBLIC attribute is given as standard.

l ABS attribute: This is converted to “LOCATE”, specifying the startingaddress combined with “ORG” instruction in the description of the section.However, the ASCG has its own different rules at conversion as shownbelow. (The smallest location within the section is the starting address.)Consequently, the operator must review the data in the converted source,and correct the matching line with the smallest address value.

− When the lower 16-bit part is undefined in the ABS description, the lower16-bit value is set to the operand value of the first ORG instruction afterskipping comment lines and blank lines. If this instruction is not ORG, thestarting address is set to 0.

− When the lower 16-bit part is defined in the ABS description, the value istaken as the starting address.

<Example>

Before conversionXXX CSEG ABS=H’7

; comment or blank lines

ORG H’1234

After conversion .SECTION XXX, CODE, LOCATE=(H’7 << 16)+H’1234 ; comment or blank lines

.ORG (H’7 << 16)+H’1234

Before conversionYYY CSEG ABS=H’2:H’5678

ORG 0

After conversion .SECTION YYY, CODE, LOCATE=(H’2 << 16)+H’5678

.ORG (H’2 << 16)+0 This line causes an error. In this case,the operator must make correction manually, because LOCATE=(H'2 <<16)+0.

l Boundary attribute− Undefined, BYTE defined: ALIGN=1

− Word defined: ALIGN=2

Page 71: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

63

− Page defined: ALIGN=256

<Example>

CSEG CSEG PUBLIC à .SECTION CSEG, CODE, ALIGN=1

• F2MC-8L family

l Section name: The description in the original source is used as is. If thename is omitted, then “CSEG” is used.

l PUBLIC attribute: The description is deleted. In the SOFTUNE

assembler, PUBLIC attribute is given as standard.

l ABS attribute: This is converted to “LOCATE” with the value set to 0,regardless of the “ORG” instruction.

l Boundary attribute: Set to ALIGN=1.<Example>

CSEG CSEG ABS à .SECTION CSEG, CODE, LOCATE=0

Page 72: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

64

7.5 DIRSEG Pseudo Instruction (F2MC-8L family Only)The DIRSEG pseudo instruction is converted to the .SECTION pseudo instruction.

♦ DIRSEG pseudo instruction

DIRSEG is converted to .SECTION. The following rules are applied at conversion.

l Section name: The description in the original source is used as is. If thesection name is omitted, “DIRSEG” is used.

l PUBLIC attribute: The description is deleted. In the SOFTUNE assembler,PUBLIC attribute is given as standard. In this case, the section attributeis set to “DIR”.

l COMMON attribute: The section attribute is set to “DIRCOMMON”.l ABS attribute: This is converted to “LOCATE”. The starting address

value is set to 0.l Boundary attribute: Setup ALIGN=1.

<Example>

DS DIRSEG à .SECTION DS, DIR, ALIGN=1

Page 73: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

65

7.6 IOSEG Pseudo Instruction (F2MC-16 family Only)

The IOSEG pseudo instruction is converted to the .SECTION pseudo instruction.

♦ IOSEG pseudo instruction

IOSEG is converted to .SECTION. The following rules are applied at conversion.

l Section name: The description in the original source is used as is.l PUBLIC attribute: The description is deleted. In the SOFTUNE assembler,

PUBLIC attribute is given as standard. When this occurs, the sectionattribute is set to “IO”.

l COMMON attribute: The section attribute is set to “IOCOMMON”.

l ABS attribute: This is converted to “LOCATE”, specifying the startingaddress value combined with “ORG” instruction of the description in theapplicable section.

l Boundary attribute:− Undefined or BYTE defined: ALIGN=1

− WORD defined: ALIGN=2

<Example>

IS IOSEG à .SECTION IS, IO, ALIGN=1

Page 74: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

66

7.7 DSEG Pseudo Instruction

The DSEG pseudo instruction is converted to the .SECTION pseudo instruction.

♦ DSEG pseudo instruction

DSEG is converted to .SECTION. The following rules are applied at conversion.

• F2MC-16 family

l Section name: The description in the original source is used as is.l PUBLIC attribute: The description is deleted. In SOFTUNE assembler,

PUBLIC attribute is given as standard. When this occurs, the sectionattribute is set to “DATA”.

l COMMON attribute: The section attribute is set to “COMMON”.

l ABS attribute: This is converted to “LOCATE” declaration, specifying thestarting address value combined with “ORG” instruction of the descriptionin the applicable section.

l ROM attribute: Set the section attribute to “CONST”.

l Boundary attribute:− BYTE defined: ALIGN=1

− Undefined or WORD defined: ALIGN=2

− PAGE defined: ALIGN=256

<Example>

DS DSEG COMMON à .SECTION DS, COMMON, ALIGN=2

• F2MC-8L family

l Section name: The name in the original source is used as is. When thesection name is omitted, “DSEG” is used.

l PUBLIC attribute: The description is deleted. In SOFTUNE assembler,PUBLIC attribute is given as standard. When this occurs, the sectionattribute is set to “DATA”.

l COMMON attribute: The section attribute is set to “COMMON”.

l ABS attribute: This is converted to the “LOCATE” declaration. Thestarting address value is always set to 0.

l ROM attribute: Set the section attribute to “CONST”.

l Boundary attribute: Setup ALIGN=1

<Example >

DS DSEG ROM à .SECTION DS, CONST, ALIGN=1

Page 75: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

67

7.8 SSEG Pseudo Instruction

The SSEG pseudo instruction is converted to the .SECTION pseudo instruction.

♦ SSEG pseudo instruction

SSEG is converted to .SECTION. The following rules are applied at conversion.

• F2MC-16 family

l Section name: The description in the original source is used as is.l Section attribute: The section attribute is set to “STACK”.

l Boundary attribute:− Undefined, BYTE defined: ALIGN=1

− WORD defined: ALIGN=2

− PAGE defined: ALIGN=256

<Example>

SS SSEG PAGE à .SECTION SS, STACK , ALIGN=256

• F2MC-8L family

l Section name: The description in the original source is used as is.l Section attribute: The section attribute is set to “STACK”.l Boundary attribute: Setup ALIGN=1.

<Example>

SS SSEG à .SECTION SS, STACK, ALIGN=1

Page 76: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

68

7.9 ENDS Pseudo Instruction

The ENDS pseudo instruction is output as a comment.

♦ ENDS pseudo instruction

Because ENDS requires no conversion, it is output as a comment.<Example>

DS ENDS à ;DS ENDS

Page 77: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

69

7.10 DBIT, DB, DW, DSL, DL, DFS, DFD Pseudo Instructions

The DBIT pseudo instruction is converted to the .DATA.I pseudo instruction.

The DB pseudo instruction is converted to the .DATA.B pseudo instruction.

The DW pseudo instruction is converted to the .DATA.H pseudo instruction.

The DSL pseudo instruction is converted to the .DATA.E pseudo instruction.

The DL pseudo instruction is converted to the .DATA.L pseudo instruction.

The DFS pseudo instruction is converted to the .FDATA.S pseudo instruction.

The DFD pseudo instruction is converted to the .FDATA.D pseudo instruction.

♦ DBIT pseudo instruction

DBIT is converted to .DATA.I.<Example>

Label DBIT 1,0,1,0 à Label .DATA.I 1,0,1,0

♦ DB pseudo instruction

DB is converted to .DATA.B.

When an operand including a string is described, conversion is performed incombination with .SDATA. As a result, the original single-line operand is dividedinto two or more lines. Two double quotes in succession included in strings areconverted to \”.<Example>

Label DB ”A””BC”,h’0d,h’0a à Label .SDATA ” A\”BC”

.DATA.B h’0d,h’0a

♦ DW pseudo instruction

DW is converted to .DATA.H.

When strings are included, double quotes are converted to single quotes, and arethen processed as character constants.<Example>

DW ”AB”,”A””” à .DATA.H ‘AB’,’A \”’

♦ DSL pseudo instruction

DSL is converted to .DATA.E.<Example>

Label DSL 123456h à Label .DATA.E 123456h

♦ DL pseudo instruction

DL is converted to .DATA.L

<Example>

Label DL Symbol à Label .DATA.L Symbol

♦ DFS pseudo instruction

DFS is converted to .FDATA.S.<Example>

Label DFS H’0 à Label .FDATA.S H’00000000

Page 78: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

70

♦ DFD pseudo instruction

DFD is converted to .FDATA.D.<Example>

Label DFD H’FF à Label .FDATA.D H’FF00000000000000

Page 79: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

71

7.11 RBIT, RB, RW, RSL, RL, RFS, RFD Pseudo Instructions

The RBIT pseudo instruction is converted to the .RES.I pseudo instruction.

The RB pseudo instruction is converted to the .RES.B pseudo instruction.

The RW pseudo instruction is converted to the .RES.H pseudo instruction.

The RSL pseudo instruction is converted to the .RES.E pseudo instruction.

The RL pseudo instruction is converted to the .RES.L pseudo instruction.

The RFS pseudo instruction is converted to the .FRES.S pseudo instruction.

The RFD pseudo instruction is converted to the .FRES.D pseudo instruction.

♦ RBIT pseudo instruction

RBIT is converted to .RES.I.<Example>

Label RBIT 7 à Label .RES.I 7

♦ RB pseudo instruction

RB is converted to .RES.B.<Example>

Label RB 4 à Label .RES.B 4

♦ RW pseudo instruction

RW is converted to .RES.H.<Example>

Label RW 2 à Label .RES.H 2

♦ RSL pseudo instruction

RSL is converted to .RES.E.<Example>

Label RSL 1 à Label .RES.E 1

♦ RL pseudo instruction

RL is converted to .RES.L.<Example>

Label RL 4 à Label .RES.L 4

♦ RFS pseudo instruction

RFS is converted to .FRES.S.<Example>

Label RFS 3 à Label .FRES.S 3

♦ RFD pseudo instruction

RFD is converted to .FRES.D.<Example>

Label RFD 2 à Label .FRES.D 2

7.12 STRUC to ENDS Pseudo Instructions

The STRUC to ENDS pseudo instructions are converted to the .STRUCT to .ENDS pseudo instruction.

♦ STRUC to ENDS pseudo instruction

STRUC to ENDS are converted to .STRUCT to .ENDS.

Page 80: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

72

<Example>

S_Name STRUC à S_Name .STRUCT

mem1 DB “ABCD”,0dh,0ah à mem1 .SDATA “ABCD”

.DATA.B 0dh,0ah

mem2 RB 2 à mem2 .RES.B 2

S_Name ENDS à .ENDS

Page 81: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

73

7.13 EQU and SET Pseudo Instructions

The EQU pseudo instruction is converted to the .EQU pseudo instruction.

The SET pseudo instruction is converted to the .EQU pseudo instruction.

♦ EQU pseudo instruction

EQU is converted to .EQU.<Example>

Symbol EQU xxxx à Symbol .EQU xxxx

♦ SET pseudo instruction

SET is converted to .EQU, although its complete conversion may not be possible.

<Note>

The ASCG displays a warning during this operation.

Page 82: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

74

7.14 REG Pseudo Instruction, PUSHW POPW Instruction

(F2MC-16 family Only)

The REG pseudo instruction is converted to the .REG pseudo instruction, and the general-purposeregister is parenthesized.

The PUSHW POPW instruction is parenthesized when the operand is a general-purpose register.

♦ REG pseudo instruction

REG is converted to .REG.<Example>

ABC REG RW0-RW7 à ABC .REG (RW0-RW7)

♦ PUSHW POPW instruction

Parenthesized if operand is general-purpose register, if not, parentheses removed<Example>

PUSHW RW0,RW1,RW7 à PUSHW (RW0,RW1,RW7)

<Note>

When a REG pseudo instruction or PUSHW POPW instruction appears in a macro, and such aninstruction has a dummy argument as the operand, conversion cannot be done becauseparentheses are not added/removed. A Warning is output.When this occurs, correct the macro with a proper instruction manually. &macro FOO \P1

PUSHW \P1

&endm

FOO RW0 ; ß An error occurs in the SOFTUNE assembler. FOO A

Page 83: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

75

7.15 EVEN, ORG Pseudo Instructions

The EVEN pseudo instruction is converted to the .ALIGN pseudo instruction.

The ORG pseudo instruction is converted to the .ORG pseudo instruction.

♦ EVEN pseudo instruction

EVEN is converted to .ALIGN. The boundary alignment value is always set to 2.<Example>

EVEN à .ALIGN 2

♦ ORG pseudo instruction

ORG is converted to .ORG.When ORG described in an absolute attribute segment is converted, theconventional F2MC-16 assembler allows only 16-bit description, the bank address(offset) value. Consequently, at conversion, the upper 8-bit address is added tothe operand.

Page 84: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

76

7.16 LIST, LISTON, LISTOFF Pseudo Instructions

The LIST pseudo instruction is converted to the .LIST pseudo instruction.

The LISTON pseudo instruction is converted to the .LIST pseudo instruction.

The LISTOFF pseudo instruction is converted to the .LIST pseudo instruction.

♦ LIST pseudo instruction

LIST is converted to .LIST. The parameters are converted based on conditionslisted in the Tables 7-2 and 7-3.

• F2MC-16 Assembler

Table 7-2 Conditions for Converting LIST Pseudo Instruction (F2MC-16)

Conventional

Assembler

SOFTUNE

Assembler

Functions

ON/OFF ON/OFF Specify whether to generate the

list information or not.

COND/NOCOND COND/NOCOND Control non-expanded line output

of conditional macro.

DEF/NODEF DEF/NODEF Control output of macro definition

part.

CALL/NOCALL CALL/NOCALL Control output of macro calling

part.

EXP/NOEXP EXP/NOEXP Control output of macro expanded

part.

STR/NOSTR EXP/NOEXP

(Note)

Control output of structured

control statement.

Note: The STR/NOSTR function is included in EXP/NOEXP with SOFTUNE assembler.

Page 85: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

77

• F2MC-8L Assembler

Table 7-3 Conditions for Converting LIST Pseudo Instruction (F2MC-8L)

Conventional

Assembler

SOFTUNE

Assembler

Functions

ON/OFF ON/OFF Specify whether to generate the

list information or not.

CD/NCD COND/NOCOND Control non-expanded line

output of conditional macro.

DEF/NDEF DEF/NODEF Control output of macro

definition part.

CL/NCL CALL/NOCALL Control output of macro calling

part.

EXP/NEXP EXP/NOEXP Control output of macro

expanded part.

STR/NSTR EXP/NOEXP

(Note)

Control output of structured

control statement.

Note: The STR/NOSTR function is included in EXP/NOEXP with SOFTUNE assembler.

♦ LISTON pseudo instruction

LISTON is converted to .LIST ON.

♦ LISTOFF pseudo instruction

LISTOFF is converted to .LIST OFF.

Page 86: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

78

7.17 PAGE Pseudo Instruction

The PAGE pseudo instruction is converted to the .PAGE pseudo instruction.

♦ PAGE pseudo instruction

PAGE is converted to .PAGE.<Example>

PAGE à .PAGE

Page 87: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

79

7.18 TITLE and SUBTTL Pseudo Instructions

The TITLE pseudo instruction is converted to the .TITLE pseudo instruction.

The SUBTTL pseudo instruction is converted to the .HEADING pseudo instruction.

♦ TITLE pseudo instruction

TITLE is converted to .TITLE. Conversion of quotation marks is made withconversion of strings in the operand.

♦ SUBTTL pseudo instruction

SUBTTL is converted to .HEADING.

Page 88: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

80

MEMO

Page 89: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

81

Chapter 8 Converting Macro InstructionsThis chapter describes conversion related to macro processing.

8.1 Correspondence of Macro Instructions between SOFTUNE Assembler and

Conventional Assemblers

Page 90: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

82

8.1 Correspondence of Macro Instructions between

SOFTUNE Assembler and Conventional AssemblersTable 8-1 shows the list of SOFTUNE assembler macro instructions corresponding to the conventionalassemblers.

♦ Correspondence of conventional assemblers and SOFTUNE assembler macro instructions

Macro instructions are converted according to the Table 8-1.

Table 8-1 Correspondence of Macro Instructions between SOFTUNE Assembler and

Conventional Assemblers

Conventional

Assembler

SOFTUNE

Assembler

Conventional

Assembler

SOFTUNE

Assembler

&MACRO #macro &THEN Commented

out

&LOCAL #local &ELSE #else

&SET #set &ENDIF #endif

&PURGE #purge &ENDM #endm

&REP #repeat &INCLUDE #include

&IF #if

Page 91: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

83

Chapter 9 Converting Structured Control

InstructionsThis chapter describes conversion of structured control instructions.

9.1 Correspondence of Structured Control Instructions between Conventional

Assemblers and SOFTUNE Assembler

9.2 Processing Other Structured Control Instructions

Page 92: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

84

9.1 Correspondence of Structured Control Instructions between

Conventional Assemblers and SOFTUNE Assembler

Table 9-1 lists the correspondence between structured control instructions of SOFTUNE assemblerand conventional assemblers.

♦ Structured Control Instructions

One-to-one correspondence so ASCG makes “as is” copy.Table 9-1 Structured Control Instructions

Conventional assembler SOFTUNE assembler

.IF to .ELSE to .ENDIF .IF to .ELSE to .ENDIF

.SWITCH to .CASE .SWITCH to .CASE

.FOR to .ENDF .FOR to .ENDF

.REPEAT to .UNTIL .REPEAT to .UNTIL

.WHILE to .ENDW .WHILE to .ENDW

.BREAK .BREAK

.CONTINUE .CONTINUE

♦ Structured Operation Expression (F2MC-8L only)

A structured operation expression is converted as shown in the Table 9-2.

Table 9-2 Structured Operation Expression

Conventional assembler SOFTUNE assembler

Symbol = Symbol .( Symbol = Symbol)

Assignment operation

expression

.( Assignment operation

expression)

Symbol++ .( Symbol++)

Symbol-- .( Symbol--)

Page 93: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

85

♦ Condition

One-to-one correspondence so ASCG makes

Table 9-3 lists the conditions.

Table 9-3 Conditions

Condition Content Condition Content

Z (EQ) Z-Flag Set NV V-Flag Clear

NZ (NE) Z-Flag Clear LT V or N Set

C (LO) C-Flag Set GE V or N Clear

NC (NS) C-Flag Clear LE (V Xor N)or Z Set

N N-Flag Set GT (V Xor N)or Z Clear

P N-Flag Clear LS C or Z Set

V N-Flag Set HI C or Z Clear

♦ Comparison Conditional Expression

The ASCG performs conversion as shown in Table 9-4.

Table 9-4 List of Corresponding Comparison Conditional Expressions

Conventional assembler SOFTUNE assembler

Signed Unsigned Signed Unsigned

<Z>(<EQ>) =

<NZ>(<NE>) !=

<LT> <LO> < <.u

<LE> <LS> <= <.u

<GT> <HI> > >.u

<GE> <HS> >= >=.u

<BS> (F2MC-16 only) Not available (Note)

<BC> (F2MC-16 only) !

Note: Deletes <BS> notation

Page 94: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

86

<Note>

Comparison Conditional Expression in .FOR is turned over condition.

Example

.FOR(A=#0, <EQ>#3, #1) -> .FOR(A=#0, !=#3, #1)

And, <BC> and <BS> Comparison Conditional Expression in .FOR do not exist function in SOFTUNE

assembler. And so, ASCG is output error. In this case, expand .FOR by hand-opration.

Example

-> MOV A, #0

.FOR(A=#0, <BS>abc:4, #1) -> BRA Label1

-> Label2:

... ...

-> Label3:

-> ADD A, #1

-> Label1:

.ENDF -> BBC abc:4, label2

-> Label4:

Note: Label3 is expanded label for .CONTINUE. Label4 is expanded label for .BREAK.When .FOR is expanded, expand too these instruction that correspond .FOR.

Page 95: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

87

9.2 Processing Other Structured Control InstructionsThis section describes conversion of other structured control instructions.

♦ Bit conditional expression

A conventional assembler for F2MC-8L distinguishes a bit conditional expressionby enclosing the operand with “<>”, but “<>” is not supported by the SOFTUNE

assembler. Conversion is performed as follows:.REPEAT

NOP.UNTIL(<BITSYM>) à .UNTIL(BITSYM)

♦ Continuation of assignment expression, and assignment operation expression

A conventional assembler for F2MC-8L uses “=” to specify continuing lines, but theSOFTUNE assembler uses “\” to delimit continuing lines. However, the lines arejoined as follows in conversion:

A = R0 = à .(A = R0 = SYMBOL)

SYMBOL à

♦ Continuation of conditional expression

When a conditional expression is divided into multiple lines as shown below, “\”must be described. However, the ASCG joins such lines for conversion as shownin the following example: Comments remain as is without joining.

.IF ( à .IF (A == #3 || <GT>) A <EQ> #3 à ; Comment

; Comment à

|| <GT> à

) à

Page 96: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

88

MEMO

Page 97: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

89

Chapter 10 Converting #pragma Part for cc907This chapter describes functions for converting the #pragma part in the C source for CC907 to the#pragma part in the C source for the SOFTUNE C compiler.

10.1 Converting #pragma asm Part

10.2 Converting #pragma Section Part

Page 98: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

90

10.1 Converting #pragma asm PartA description starting with #pragma asm and ending with #pragma endasm is converted asexplained in Chapters 6 to 9 of this manual.

♦ Converting #pragma asm part

A description starting with #pragma asm and ending with #pragma endasm isconverted in as explained in Chapters 6 to 9 of this manual.<Example>

#pragma asm

movw A,#10 ; This part is converted.#pragma endasm

<Note>

When #pragma is enclosed by /* */, it means comment in C. However, the ASCG cannot itinterpret correctly. <Example> /*

#pragma asm

*/ ß asm; An error occurs because this is interpreted as the beginning of a block.

Page 99: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

91

10.2 Converting #pragma Section PartThe default section names and section attributes of the #pragma section are converted tocorresponding names and attributes.

♦ Converting #pragma section part

The default section names and section attributes of the #pragma section areconverted to corresponding names and attributes, according to the list as shown inthe Table 10-1. However, when a non-standard attribute is described, conversionis performed according to the list in Table 10-2.

Table 10-1 List of Corresponding Default Section Namescc907 C Compiler SOFTUNE C Compiler

Section Name Attribute Section Name AttributeCSEG CSEG CODE CODEDINIT DSEG INIT DATADCONST DSEG DCONST CONSTDVAR DSEG DATA DATACCONST DSEG CONST CONSTCINIT DSEG CINIT DATAFAR_CSEG CSEG FAR_CODE CODEFAR_DINIT DSEG FAR_INIT DATAFAR_DCONST DSEG FAR_DCONST CONSTFAR_DVAR DSEG FAR_DATA DATAFAR_CCONST DSEG FAR_CONST CONSTFAR_CINIT DSEG FAR_CINIT DATADIRINIT DSEG DIRINIT DIRDIRCONST DSEG DIRCONST CONSTDIRVAR DSEG DIADATA DATAINTVEC DSEG INTVECT CONSTIOVAR IOSEG IO IO

Table 10-2 Attributes Conversion Tablecc907 SOFTUNE

CSEG CODEDSEG DATASSEG STACKIOSEG IO

Page 100: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

92

MEMO

Page 101: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

93

AppendixThe appendix lists the error messages.

A Error Messages

Page 102: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

94

A Error MessagesThe following list briefly describes the error messages output by the ASCG.

♦ Error Messages

W1001V Used &SET macro.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

See 5.1 of this manual, and correct fault.

W1002V Check using of macro parameter.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

See 5.2 of this manual, and correct fault.

W1003V Change double quoted constant.

<Processing>

Converts double quotes to single quotes and ouputs.<Operator response>

See 5.3 of this manual, and correct fault.

W1004V Check section start address.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

Section starting address converted incorrectly; see 5.5 of this manual, andcorrect fault.

W1005V Used ORG instruction.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

See 5.6 of this manual, and correct fault.

Page 103: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

95

W1007V Possible differ opration result.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

See 5.8 of this manual, and correct fault.

W1008V Change LIST parameter.

<Processing>

Converts LIST STR/NOSTR to LIST EXP/NOEXP to output<Operator response>

See 5.9 of this manual if source for F2MC-16 family; see 5.13 of this manual ifsource F2MC-8L family, and correct fault.

W1009V Used &INCLUDE instruction.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

See 5.10 of this manual if source for F2MC-16 family; see 5.14 of this manual ifsource for F2MC-8L family, and correct fault.

W1010V Used bit symbol in EQU.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

See 5.11 of this manual if source for F2MC-16 family; see 5.15 of this manual ifsource for F2MC-8L family, and correct fault.

Page 104: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

96

W1011V Used assembler control command.

<Processing>

Outputs description as comment<Operator response>

See 5.12 of this manual, and correct fault.

W1012V Check using position of declared symbol

in IOSEG area.

<Processing>

The data is output as listed.<Operator response>

See 5.16 in this manual to make the corrections.

E4001V Expression too complex.

<Processing>

Stops converting item and outputs unconverted part as comment

E4002V Illegal term in expression.

<Processing>

Stops converting item and outputs unconverted part as comment

E4003V Coverted source file.

<Processing>

Quits

E4004V Cannot convert function.

<Processing>

Stops converting item and outputs unconverted part as comment<Operator response>

Description remains on line as comment; check contents and make correction.

E4005V Used __asm statement.

<Processing>

Outputs error and processes in accordance with description.<Operator response>

Correct description in conventional assembler format to SOFTUNE assemblerformat.

Page 105: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

97

F9001V Memory allocation error.

<Processing>

Quits<Operator response>

Increase system memory by quitting other unnecessary processes or by addingmemory board.

F9002V Internal error.

<Processing>

Quits<Operator response>

Notify dealer with contents of displayed sub-message.

F9003V File write error.

<Processing>

Quits<Operator response>

Error in output file indicated by sub-message.

Check setups listed below.

l Available disk capacityl Access attribute of output destination

l Input/output file names

F9004V File read error.

<Processing>

Quits<Operator response>

Error in input file indicated by sub-message. Check access attribute of inputdestination.

Page 106: SOFTUNE Assembler Source Convert Guide - Fujitsu · ii Preface ♦ Manual purpose and intended users This manual describes the usage and operations of the SOFTUNE Assembler Source

98

F9006V Source file not specified.

<Processing>

Quits

F9007V Cannot open file.

<Processing>

File indicated by sub-message cannot be opened and quits

F9008V Invalid option description.

<Processing>

Quits

F9009V Same directory for input and output

file.

<Processing>

Quits<Operator response>

Change directory location of output file.