MF730-05 E0C88 E0C88XXX ICE88 88XXX ASM88 ICE88/EVA88 0000H 000000H 000100H - Datasheet Archive
CMOS 8-BIT SINGLE CHIP MICROCOMPUTER E0C88 Family STRUCTURED ASSEMBLER MANUAL NOTICE No part of this material may be reproduced
MF730-05 MF730-05 CMOS 8-BIT SINGLE CHIP MICROCOMPUTER E0C88 E0C88 Family STRUCTURED ASSEMBLER MANUAL NOTICE No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson reserves the right to make changes to this material without notice. Seiko Epson does not assume any liability of any kind arising out of any inaccuracies contained in this material or due to its application or use in any product or circuit and, further, there is no representation that this material is applicable to products requiring high level reliability, such as medical products. Moreover, no license to any intellectual property rights is granted by implication or otherwise, and there is no representation or warranty that anything made in accordance with this material will be free from any patent or copyright infringement of a third party. This material or portions thereof may contain technology or the subject relating to strategic products under the control of the Foreign Exchange and Foreign Trade Control Law of Japan and may require an export license from the Ministry of International Trade and Industry or other approval from another government agency. Please note that "E0C" is the new name for the old product "SMC". If "SMC" appears in other manuals understand that it now reads "E0C". MS-DOS and EDLIN are registered trademarks of Microsoft Corporation, U.S.A. PC-DOS, PC/AT, PS/2, VGA, EGA and IBM are registered trademarks of International Business Machines Corporation, U.S.A. All other product names mentioned herein are trademarks and/or registered trademarks of their respective owners. © SEIKO EPSON CORPORATION 1999 All rights reserved. E0C88 E0C88 Family Structured Assembler Manual Preface This manual explains the software development procedure using the E0C88 E0C88 Family software development tool package "E0C88 E0C88 Family Structured Assembler", the functions of the software tools included in the package and how to operate them. This manual has been divided into the following three parts depending on the explanation contents. I User's Guide Part I includes the explanation on program development, installation, flow of program development and the basic processing procedures of each tool within that flow when using the "E0C88 E0C88 Family Structured Assembler" package. II Creating Procedure of Assembly Source File Part II explains details of the parts relative to an assembly source file creation such as the assembly source file format and the pseudoinstructions of which the structured preprocessor sap88 and the cross assembler asm88 are included. III Reference Part III describes the start-up format, all the start-up flags that can be used, error messages, etc. as reference for each software tool. When you develop the E0C88 E0C88 Family program for the first time, you should read from Part I to understand the development procedure. After understanding basic operation procedure in Part I, you will be able to develop a program by referring to the necessary section in Part II and III. This manual and the software tools in this package can be used for all E0C88 E0C88 Family models (compatible with new models in the future). Besides this package, programs for the model specific settings are prepared as a "Development Tool" package for each model. Refer to the manual attached in it. E0C88 E0C88 Family Structured Assembler Manual I USER'S GUIDE Part I includes the explanation on program development, installation, flow of program development and the basic processing procedures of each tool within that flow when using the "E0C88 E0C88 Family Structured Assembler" package. CONTENTS Contents 1 OUTLINE OF PACKAGE . I-1 1.1 1.2 1.3 Introduction . I-1 Standard Floppy Disk . I-1 Outline of Software Tools . I-1 1.3.1 Structured preprocessor . 1.3.2 Cross assembler . 1.3.3 Linker . 1.3.4 Other utilities . 1.3.5 Batch file . 2 I-3 I-3 I-3 I-3 I-3 DEVELOPMENTAL ENVIRONMENT AND INSTALL . I-4 2.1 2.2 System Configuration . I-4 Installation . I-5 2.2.1 Installer . I-5 2.2.2 Installation procedure . I-6 3 PROGRAM DEVELOPMENT PROCEDURES . I-10 3.1 3.2 Development Flow . I-10 Creating Source File . I-12 3.2.1 Development using assembler language . I-12 3.3 Assembly . I-15 3.3.1 Structured preprocessor (sap88) . 3.3.2 Cross assembler (asm88) . 3.3.3 Starting sap88 and asm88 . 3.3.4 Batch processing for relocatable assembly (ra88.bat) . 3.3.5 Relocatable object file . 3.3.6 Assembly list file . 3.3.7 Cross reference list . 3.3.8 Error list . 3.3.9 Example of assembly execution . 3.4 Link . I-25 3.4.1 Linking modules . 3.4.2 Section control . 3.4.3 Module allocation information . 3.4.4 Starting link88 . 3.4.5 Batch processing for linking (lk88.bat) . 3.4.6 Absolute object file . 3.4.7 Execution example of linking . 3.5 I-15 I-15 I-17 I-18 I-22 I-22 I-23 I-23 I-24 I-25 I-25 I-27 I-27 I-28 I-32 I-32 Creating Program Data HEX File . I-33 3.5.1 Program data HEX file . I-33 3.5.2 Creating program data HEX file using hex88 . I-33 3.5.3 Motorola S2 format . I-34 3.6 Symbol Information . I-35 3.6.1 Creating symbol information (rel88) . I-35 3.6.2 Creating symbolic table file (sym88) . I-36 USER'S GUIDE EPSON I-i 1 OUTLINE OF PACKAGE 1 OUTLINE OF PACKAGE 1.1 Introduction 1.3 Outline of Software Tools The "E0C88 E0C88 Family Structured Assembler" package is one of the software development tools of the CMOS 8-bit single chip microcomputer E0C88 E0C88 Family. It consists of a cross assembler, linker and utilities to create programs. This package can commonly be used for all E0C88 E0C88 Family models and allows for development of programs with macro function. Model dependent software tools are prepared for each model as "E0C88XXX E0C88XXX Development Tool" package. Therefore, the software included in this package can directly be used for future E0C88 E0C88 Family models as well. The software tools included in this package is responsible for the area indicated (with shading) in the overall software development program. Figure 1.3.1 shows the flow of software development using the structured assembler. 1.2 Standard Floppy Disk This package includes the following floppy disks containing the structured assembler, linker and various common software tools. 1) 3.5" floppy disk (2HD) for IBM-PC/AT . one 2) E0C88 E0C88 Family Structured Assembler Manual (this manual) . one Before use of the package, read section "2.1 System Configuration" containing information on the personal computers compatible as the host for development systems. Always make a copy the master disk either on the hard disk or on another floppy disk and store the original in a safe place. Note: Use the DISKCOPY for backup of the original disk. Refer to section "2.2 Installation" on how to install the floppy disk and the software development tools. USER'S GUIDE EPSON I-1 .x Cross reference list file I-2 EPSON .sy sym88 .ref Symbolic table file Symbolic table file generator Symbol information reference file Symbol information Link command parameter file Error list file rel88>fn.ref generator .lcm .e Software tool included in this package .o .o Mask data Program data HEX file (Unused area is filled with FF) Program unused area filling utility Program data HEX file Binary/HEX converter Absolute object file .pan .l .l Function option document file Assembly list files .fsa Function option HEX file Function option generator .l Fig. 1.3.1 Structured assembler software development flow Mask data file for submitting mdc88XXX checker .psa fil88XXX .sa hex88 .a .fdc Relocatable object files Cross assembler .ms Assembly source files fog88XXX Structured assembly source files Structured preprocessor .s link88c:\EPSON sm88 sample1.ms sample2.ms Inputs the assembly source files "sample1.ms" and "sample2.ms" created in the sub-directory USER of drive C and starts the relocatable assembly process. Then creates the relocatable object files "sample1.o" and "sample2.o" in the same directory as the input file. At the same time, the assembly list files "sample1.l" and "sample2.l", cross reference list files "sample1.x" and "sample2.x", and error list files "sample1.e" and "sample2.e" will also be created in the same directory. If the PATH to asm88 is set, then there is not need to specify the path before asm88. Refer to Part III of this manual for information on other flags. Example: C:\USER>c:\EPSON\sap88 -o sample.ms sample.s Inputs the assembly source file "sample.s" created in the sub-directory USER of drive C and then creates assembly source file "sample.ms" to be input in asm88 in the same directory as the input file. If the PATH to sap88 is set, then there is not need to specify the path before sap88. Refer to section "3.3.9 Example of assembly execution" for more information on I/O files and messages displayed. Description Specify the ROM capacity in byte units. It is especially useful during relocatable assembling and is used to verify the size of the CODE area. Specify the RAM capacity in byte units. It is especially useful during relocatable assembling and is used to verify the size of the DATA area. Example 2: Assembling with the relocatable assembler, including the verification of the ROM and RAM capacity. C:\USER>c:\EPSON sm88 -ROM 32768 -RAM 65536 sample.ms Inputs assembly source file "sample.ms" created within the sub-directory USER of drive C and starts relocatable assembly. Then creates the relocatable object file "sample.o" in the same directory as the input file. At the same time, creates the assembly list file "sample.l", cross reference list file "sample.x" and error list file "sample.e" in the same directory. The capacity of the CODE and DATA sections will be verified during assembling with the -ROM and -RAM flags. An error will result in this case when the CODE exceeds 32K bytes and the DATA exceeds 64K bytes. If the PATH to asm88 is set, then there is not need to specify the path before asm88. (1) Set the directory in which the assembly source file (.ms) created with the sap88 exsists as the current drive. (2) Start-up the asm88 with the next format. asm88_[flag]_input file _ indicates a space key input. indicates a return key input. Flag can be omitted. The following indicates the flags used for batch processing of relocatable assembly (ra88.bat). Refer to section "3.3.9 Example of assembly execution" for more information on I/O files and messages displayed. USER'S GUIDE EPSON I-17 3 PROGRAM DEVELOPMENT PROCEDURES 3.3.4 Batch processing for relocatable assembly (ra88.bat) The start-up procedures for sap88 and asm88 were already discussed in the earlier section, however, it must be further noted that these can be batch processed by consolidating them into a batch file. The batch file can voluntarily created by the user, however, since this package contains batch file, i.e., ra88.bat for relocatable assembly, the following will introduce the contents of the batch file and how to use them. This batch file can be used for general processing purposes. Use it advantageously by customizing the flag settings, etc. as needed. The ra88.bat inputs the specified assembly source file and then executes sap88 and asm88, respectively to perform relocatable assembly to create a relocatable object file. Since the sap88 does not permit input of multiple assembly source files, it is limited to assembly per module other than when several structured assembly source files are read with the INCLUDE pseudo-instruction of the sap88. The following indicates the input/output files of the ra88.bat. s Input file Structured assembly source file (relocatable): file_name.s Figure 18.104.22.168 shows the ra88.bat processing flow. .s This is a structured assembly source file (relocatable) created with an editor such as EDLIN. Structured assembly source file (create for each module) s Output files Execute sap88 Expands macro statements .ms 1. Assembly source file: file_name.ms An assembly source file in which macros are expanded will be output. Assembly source file after expanding macro statements 2. Relocatable object file: file_name.o Execute asm88 Assembles source file Relocatable object file Execute for each module .l Assembly list file .x Cross reference list file .e .o This is a binary file that has been converted in machine language that can be reallocated through relocatable assembly. (This is also the file that inputs the lk88.bat batch file to perform linking.) Error list file 3. Assembly list file: file_name.l This is the file output as a list that corresponds to each source statement when the machine language and the relocatable address (the head of the CODE or the DATA section is assumed as relative address 000000H 000000H) converted with the assembler. Batch file for relocatable assembly Fig. 22.214.171.124 ra88.bat processing flow 4. Cross reference list file: file_name.x This is the address list that contains the definition and references of symbols. 5. Error list file: file_name.e This is the list of error taking place during assembling. I-18 EPSON USER'S GUIDE 3 PROGRAM DEVELOPMENT PROCEDURES Note: There are basically no error checks made on these parameter settings, therefore, do not set the parameter with settings other than those specified. (1) Set the directory in which the structured assembly source file (.s) is presented as the current drive. The ra88.bat has the following command line upon execution of the program. Customize these command lines if a flag without a default setting is to be used. (2) Start-up the ra88.bat with the next format. ra88_file name _ indicates a space key input. indicates a return key input. sap88 Do not input the extensions of file name. It is fixed on the ".s" extension. %drv%sap88 -o %1.ms %1.s asm88 Example: C:\USER>c:\EPSON\ra88 sample %drv%asm88 -ROM %rom% -RAM %ram% %1.ms Inputs structured assembly source file "sample.s" created within the sub-directory USER of drive C and starts relocatable assembly. Then creates the following files in the same directory as the input file. The %drv% is a path that locates the execution command of the ra88.bat. For this reason, it can not be altered and neither can the SET statement that is defined be altered. The %1 is a file name that is input from the command line. sample.ms, sample.o, sample.l, sample.x, sample.e If the PATH to ra88 is set, then there is not need to specify the path before ra88. The following indicates the ra88.bat program source list and the message list of the ra88.bat. Refer to it upon customizing the program. Refer to section "3.3.9 Example of assembly execution" for more information on I/O files and messages displayed. s Customizing ra88.bat Since the ra88.bat controls the program execution, it has a execution parameter customization field within it. General parameters are temporarily described in the default position, however, it is advised that the program is customized in accordance with the user's development method. 1. Setting the ROM capacity (Verification of the size of the CODE section) set rom = 32768 : The capacity of the ROM of the CODE section that locates errors will be specified in bytes. (default capacity 32768 = 32K bytes) 2. Setting the RAM capacity (Verification of the size of the DATA section) set ram = 65536 : The capacity of the RAM of the DATA section that locates errors will be specified in bytes. (default capacity 65536 = 64K bytes) USER'S GUIDE EPSON I-19 3 PROGRAM DEVELOPMENT PROCEDURES s ra88.bat program source list echo off rem * rem * E0C88 E0C88 Family Auto Relocatable Assemble Execution Utility rem * (Ver. X.XX) rem * Copyright(C) SEIKO EPSON CORP. 19931996 rem * rem * customized parameter information rem * rom=* * : rom capacity(32768 max.) rem * ram=* * : ram capacity(65536 max.) rem * User customization field rem * customized parameter area (default) * Note: There are basically no rem * caution : customized parameters value do not check, therefore error checks made on rem * please be carefully when you set these parameter rem * settings, therefore, do Setting the capacity of the ROM set rom=32768 not set the parameter with settings other Setting the capacity of the RAM set ram=65536 than those specified. rem * command searching path * rem set drv=c:\ The drv is a path that locates the execution command of the ra88.bat. It is set to root directory by default. Customize it if necessary. rem * rem * main program rem * if you want to use another option(s), please append rem * option flag(s) at command line. rem * :start echo E0C88 E0C88 Family Auto Relocatable Assemble Execution Utility Ver. X.XX echo Copyright (C) SEIKO EPSON CORP. 19931996 if "%1"="" goto usage :error_chk if if if if not not not not exist exist exist exist %drv%nul goto exit04 %1.s goto exit05 %drv%sap88.exe goto exit06 %drv%asm88.exe goto exit07 rem (sap88) :sap88 %drv%sap88 -o %1.ms %1.s if errorlevel 1 goto exit01 Start-up command of sap88 rem (asm88) :asm88 %drv%asm88 -ROM %rom% -RAM %ram% %1.ms if errorlevel 1 goto exit02 goto end Start-up command of asm88 :usage echo usage : ra88 needs [input file_name] goto skip :exit01 echo Error stop at %drv%sap88.exe goto skip :exit02 echo Error stop at %drv%asm88.exe goto skip :exit03 echo Cannot find %drv% installed E0C88 E0C88 dev. tools directory goto skip :exit04 I-20 EPSON USER'S GUIDE 3 PROGRAM DEVELOPMENT PROCEDURES echo Cannot find input file goto skip :exit05 echo Cannot find %drv%sap88.exe goto skip :exit06 echo Cannot find %drv%asm88.exe goto skip :end echo ra88.bat utility has been successfully executed. :skip set rom= set ram= set drv= s Message list 1. Start-up message E0C88 E0C88 Family Auto Relocatable Assemble Execution Utility Ver. X.XX Copyright (C) SEIKO EPSON CORP. 19931996 2. Message when terminated normally ra88.bat utility has been successfully executed. 3. Error message Error message usage : ra88 needs [input file_name] Error stop at [drive and path name] sap88.exe Error stop at [drive and path name] asm88.exe Cannot find [drive and path name] installed E0C88 E0C88 dev. tools directory Cannot find input file Cannot find [drive and path name] sap88.exe Cannot find [drive and path name] asm88.exe Explanation Usage output. Error occurred in sap88. Error occurred in asm88. Cannot find [drive or path] in which the E0C88 E0C88 Family software tools is installed. Cannot find aa88.bat input file (.s). Cannot find sap88. Cannot find asm88. Note: The following operations will be stopped when an error occurs. For this reason, it is requested that the COPY command is operable, by setting the PATH, when executing the batch file. (1) Some of the messages displayed during batch processing is automatically generated through the MS-DOS/PC-DOS batch processing function and command. For this reason, it may be placed under MS-DOS/PC-DOS control when an error occurs and thus force the batch processing to be interrupted. (2) When an error occurs, the following procedures do not automatically continue. However, it may not be controllable as noted in reason (1) indicated above. (4) The execution parameters (user customization field) of the batch file basically do not locate parameter setting errors. Therefore, do not set the parameters other than specified. (5) An MS-DOS/PC-DOS environment variable will be used to execute the batch file, therefore, the size of the environment variable should be allocated with as much space as possible using the CONFIG.SYS. (3) The ra88.bat and the lk88.bat (mentioned hereafter) employ the MS-DOS/PC-DOS COPY command in addition to E0C88 E0C88 Family tools. USER'S GUIDE EPSON I-21 3 PROGRAM DEVELOPMENT PROCEDURES 3.3.5 Relocatable object file The relocatable object file is a binary file that is created through the relocatable assembly of the asm88. Other than when -o flag is specified the file name that is created will be the same file name input with the asm88 and the extension will be ".o". This file consists of header information and symbol tables required for reallocation using the linker, in addition to the object (machine language) code. The assembly list file consists of the following items: LINE . The consecutive line number from the beginning. ADDRESS . This refers to the target address of the object code. CODE: . This is the object (machine language) code that corresponds to the source statement in the same line. SOURCE STATEMENT . This is the assembly source input in the asm88. The assembly list file is an ASCII file added with an object code (hexadecimal) and code address (hexadecimal) in the assembly source file input in the asm88. It is created through asm88 assembly. Each page will have a header with the file name and date that the file is created. When relocatable assembly is performed, the code address will be a relative address from the beginning of the CODE section. Similarly, the address of the data area is a relative address from the beginning of the DATA section. If an error is occurred, an asterisks "*" will be placed at the beginning of the line in which the error occurred. The file name that is created will be the same as the file name input via the asm88 other than when -o flag is specified. The extension will be ".l". The output of assembly list file can be controlled with the following asm88 pseudo-instructions and flag specifications upon start-up. 3.3.6 Assembly list file s Output list control pseudo-instructions Pseudo-instruction LINENO SUBTITLE SKIP NOSKIP LIST NOLIST EIECT Description Changes the line number (LINE) to the voluntary value. Inserts the subtitle line that is voluntarily set after the column explanation line. If any line of the code exceeds 5 bytes through ASCII, DB or DW data settings, the exceeding portion will not be output. (default setting.) Outputs all codes by canceling the SKIP setting. The following lines are output in a list when the NOLIST setting is canceled. Prevents output of the list from the line after the pseudo-instruction. Adds a involuntary page break. Refer to Part II of this manual for details of the pseudo-instructions. s Start-up flag Flag -l Description Prevents creation of an assembly list file. Refer to Part III of this manual for for details of the flag. I-22 EPSON USER'S GUIDE 3 PROGRAM DEVELOPMENT PROCEDURES Symbol value (6 digit, hexadecimal expression) 3.3.7 Cross reference list VALUE The cross reference list file is created through asm88 assembly with an ASCII file. This ASCII file is defined within the module or contains a list of reference symbols. The name of the file created will be the same as the file name input with the asm88 other than when specifying -o flag. The extension will be ".x". LINE No. INFORMATION This is a list in which the symbol is defined or referenced line numbers. They are output as follows. lineno* lineno lineno . . . . lineno lineno*: The line number in which the target symbol is defined. lineno: The line number in which the target symbol is referenced. The output format of the cross reference list file is as follows. The LINE No. INFORMATION can consist up to a maximum of 12 line numbers. R SYMBOL A VALUE LINE No. INFORMATION The following page header will be output at the head of each page. Reference definition G: Global L: Local R The numeric labels are temporary labels. The same name can be used if they are outside the range defined by the general label. It will not be output on the cross reference list. (Refer to Part II of this manual for the numeric labels.) SYMBOL Symbol name (maximum 15 characters) Attribute L: Label C: Constant V: Variable U: Undefined within the module A The cross reference list file can prohibit output using the -x flag of the asm88. Example of cross reference list CROSS REFERENCE TABLE OF asm88 L L L delay delay_00 delay_3times L L L 000100H 000100H 000103H 000103H 000107H 000107H error.x 1993-06-07 5* 7* 13* 14 9 17:28 PAGE 1 15 3.3.8 Error list The errors generated during asm88 assembling will be output as an error list file. The name of the file created will be the same as the file name input with the asm88 other than when specifying -o flag. The extension will be ".e". The output format of the error list is as indicated below. Fatal This is a fatal error. Assembly will be interrupted. Fatal errors are displayed on the CRT without output of an error list file. ERROR MESSAGE Error content SOURCE FILE LINE No.: ERROR LEVEL: ERROR MESSAGE Refer to Part III of this manual for the error messages of the asm88. SOURCE FILE Source file name Example of error list LINE No. Line number in which the error occurred error.s 16: ERROR LEVEL Level of error Warning Severe USER'S GUIDE Severe: ddelay not defined When an error is not generated, nothing will be output in the error list file. This is a warning and does not affect the output object. This is a general error. The output object will be invalid. EPSON I-23 3 PROGRAM DEVELOPMENT PROCEDURES 3.3.9 Example of assembly execution The following shows example of the assembly execution. s Messages when ra88.bat (relocatable assembly) is executed C:\USER>c:\EPSON\ra88 sample C:\USER>echo off E0C88 E0C88 Family Auto Relocatable Assemble Execution Utility Ver. X.XX Copyright (C) SEIKO EPSON CORP. 19931996 sap88 Structured Assembler Preprocessor Version X.XX Copyright (c) 1993 by Advanced Data Controls, Corp. Licenced to SEIKO EPSON CORP. asm88 Cross Assembler Version X.XX Copyright (c) 1993 by Advanced Data Controls, Corp. Licenced to SEIKO EPSON CORP. 9 Symbol(s) Used 0 Warning Error(s) 0 Severe Error(s) ra88.bat utility has been successfully executed. C:\USER> I-24 EPSON USER'S GUIDE 3 PROGRAM DEVELOPMENT PROCEDURES 3.4 Link This section will explain the linking operations of relocatable modules. Software used: link88 Relocatable object files .o .o .o Create the link88 link command parameter file by editor .lcm Link command parameter file Execute link88 Link .a Absolute object file Creating program data HEX file Fig. 3.4.1 Link processing flow 3.4.1 Linking modules The object codes of each module created with the relocatable assembly of the asm88 is not specified to be located in a certain portion of the ROM. The allocation address is determined by how each modules are linked. The link88 linker is the tool used for linking operations. When linking is successfully performed the relative address for the external reference label that was undeclared up to this point will be declared and thus, create an absolute object file (.a) that consolidates all modules into one file. By processing this absolute object file with the binary/HEX converter hex88, as indicated in section 3.5, the program data HEX file to be used to create the program mask data or to debug the hardware will be created. 3.4.2 Section control The E0C88 E0C88 Family has a 24-bit width address space (maximum of 16M bytes). By using the topmost 8bit for register control using the code bank register (CB), expand page register (EP, XP, YP) and others, the address space can be allocated into a 32K-byte bank (CODE) or 64K-byte page (DATA) unit. Access performance can be improved within those ranges. By rewriting the content of the register, the user will have access of a voluntary bank or page from a voluntary bank. As a result, large programs and data bases can easily be controlled. However, the bank and page will not automatically be changed with the execution of the program and thus it must be set in accordance with the program specifications. USER'S GUIDE Therefore a program as described in linear programs can not be created in the 16M-byte address space. This indicates that multiple modules can not simply be linked. For this reason, the link88 employs a multi-section method to resolve this problem by allocate voluntary modules in voluntary addresses. Allocation in this method is undertaken by making it possible to specify addresses for block units referred to as sections. The section is categorized into a CODE section in which the allocation site is the ROM and the DATA section which is the data memory. To resolve the aforementioned bank and page problems, the size of one CODE section can consist of up to 32K bytes and the size of one DATA section is limited to 64K bytes. It is important to note that this size is based on the fact that they are not allocated over the bank or page limit. If in case they are allocated in the middle of a bank or page, the size will be limited to the remaining size. To create an object code for the desired multisection using the section method, the user must define the section and supply address information on the allocation of the section to allocate the address. The section is defined by using the linker's secondary flag (flag used to define section) +code and +data and the -p flag is used to allocate the address. Up to a maximum of 255 sections can be defined with one link. Let's look at the section definition procedures through a simple example. First, the method to actualize a memory mapping as indicated in Figure 126.96.36.199 will be explained. It will be assumed that "prg1.s" describing C1 and D1, "prg2.s" describing C2 and "prg3.s" describing C3 is assembled and then each respective relocatable object file "prg1.o", "prg2.o" and "prg3.o" is created. In this case, C indicates the CODE section and D indicates the DATA section. The flag to link88 can be specified through input redirect operations. When the following flag specification is performed and a link command parameter file (filename.1cm) that is used to allocate the address and define the section is created following by executing link88c:\EPSON\lk88 C:\USER>echo off E0C88 E0C88 Family Auto Link Execution Utility Ver. X.XX Copyright (C) SEIKO EPSON CORP. 19931996 link88 Linker Version X.XX Copyright (c) 1993 by Advanced Data Controls, Corp. Licenced to SEIKO EPSON CORP. lk88.bat utility has been successfully executed. C:\USER> I-32 EPSON USER'S GUIDE 3 PROGRAM DEVELOPMENT PROCEDURES 3.5 Creating Program Data HEX File This section will explain the program data HEX file and how they can be created using the hex88 binary/HEX converter. Software used: hex88 .a 3.5.2 Creating program data HEX file using hex88 The following indicates the direction in creating a program data HEX file using the hex88. (1) Set the directory in which the absolute object file (.a) is presented as the current drive. Absolute object file (2) Start-up the hex88 with the next format. hex88_[flag]_file name Execute hex88 Convertes binary to HEX .sa _ indicates a space key input. indicates a return key input. Program data HEX file The following indicates the flag employed during batch processing (lk88.bat) of links. Flag -o · System code setting and FF filling in unused program area by fil88XXX. · Program debugging using ICE88/EVA88 ICE88/EVA88. · Creating mask data of program. Fig. 3.5.1 Program data HEX file generation flow Example: Converting sample.a to create program data HEX file 3.5.1 Program data HEX file The program data HEX file is an ASCII file in which the binary object codes were converted in HEX data. The Motorola S2 format is generally employed at the HEX file format since the E0C88 E0C88 Family has a 16M-byte address space. (Refer to section 3.5.3 for more information.) This file will be required to mask program data or to debug program with the ICE88 ICE88 and EVA88 EVA88. When development is undertaken for modules according to relocatable assembly, the absolute object file created by the linker will be converted into HEX data through the hex88 binary/HEX converter and then create a program data HEX file. The program data HEX file created through such procedures will set system codes according to each model and fill FF of the unused built-in ROM area. This is done with the fil88XXX software tools according to the model and comes with the "E0C88XXX E0C88XXX Development Tool" package. USER'S GUIDE Description Specify the file name that is output. (Specify ".sa" as the extension of the file to be output.) If this flag is omitted it will be processed as a standard output. C:\USER>c:\EPSON\hex88 -o sample.sa sample.a "sample.sa" will be created in the same directory as the input file by inputting the absolute object file "sample.a" created in the USER of the sub-directory of drive C and converting it into HEX data format. If the PATH to hex88 is set, then there is not need to specify the path before hex88. The batch file can allow for hex88 to be executed after linking. Refer to section "3.4.5 Batch processing for linking (lk88.bat)" for more details on such batch processing methods. EPSON I-33 3 PROGRAM DEVELOPMENT PROCEDURES 3.5.3 Motorola S2 format The HEX file in the Motorola S2 format is a collection of records composed of fields like the following. Data will be allocated in 1 byte units in order of the increase in address. This field generally includes the 32-byte (maximum) data. All information will be indicated in hexadecimal pairs and each pair will indicate a 1-byte value. Indicates the format of that line. "S2" will appear in this field. Indicates the address of the first data byte of that line. The field in S2 format is 3-byte. Indicates the total number of bytes of , and in hexadecimal form. This is the complement of 1 of the total number of bytes allocated to that line (excluding S field). Motorola S2 format 32-byte I-34 EPSON USER'S GUIDE 3 PROGRAM DEVELOPMENT PROCEDURES 3.6 Symbol Information The following indicate the list of symbols that are created. 3.6.1 Creating symbol information (rel88) s Correlation with flag The rel88 is a utility used to create symbol information. It will obtain symbol information from the specified object file and then create its list. The target object files are the relocatable object file created with asm88 and the absolute object file created with link88. Generally, this tool is used for two purposes: one for checking the symbol list after linking and second for generating a file to be input to the sym88. The rel88 outputs a list in accordance with the standard output. The following explains the operations to obtain the symbol list of an absolute object file. When creating a symbol list for the absolute object file (1) Set the directory in which the absolute object file (.a) is presented as the current drive. (2) Start-up the rel88 with the next format. rel88_[flag]_input file name_>_output file name _ indicates a space key input. indicates a return key input. -v * rel88 -v format * SECTION 1 0x008000 c 0x008000 C 0x008045 C 0x008059 C 0x008082 C acia.o n_getch n_outch n_recept n_main acia.o _ptecr _ptlec _buffer SECTION 1: code address = 0x008000 size = 0x000b8 SECTION 2: data address = 0x0080b8 Description Outputs the start address and size of each section. Sorts the sections contents according to the symbol value. size = 0x00000 (For reference) Refer to the following examples for information on the flag effects. Refer to Part III of this manual for more details on the flag. Since the rel88 output corresponds to the standard output, a file will be created according to the output redirect. Example: C:\USER>c:\EPSON\rel88 -v +sec sample.a > sample.ref Inputs the absolute object file "sample.a" created in the USER of the sub-director of drive C and then creates the symbol list file "sample.ref" in the same directory as the input file. If the PATH to rel88 is set, then there is not need to specify the path before rel88. USER'S GUIDE acia.o acia.o n_getch _buffer n_recept n_outch _ptlec _ptecr n_main * rel88 +sec format * General flags +sec 0x8000c 0x80b8d 0x8000C 0x80bcD 0x8059C 0x8045C 0x80baD 0x80b8D 0x8082C SECTION 2 0x0080b8 d 0x0080b8 D 0x0080ba D 0x0080bc D Flag * rel88 (default) format * * -a format * 0x000000 0x0000b8 0x0000bc 0x0000b8 0x0000ba 0x000000 0x000082 0x000045 0x000059 c d D D D C C C C sec: sec: sec: sec: sec: sec: sec: sec: sec: 1 2 2 2 2 1 1 1 1 acia.o acia.o _buffer _ptecr _ptlec n_getch n_main n_outch n_recept * -d format * 0x000000 0x0000b8 0x000000 0x0000bc EPSON c d C D acia.o acia.o n_getch _buffer I-35 3 PROGRAM DEVELOPMENT PROCEDURES 0x000059 0x000045 0x0000ba 0x0000b8 0x000082 C C D D C n_recept n_outch _ptlec _ptecr n_main * -g format * 0x000000 0x0000bc 0x000059 0x000045 0x0000ba 0x0000b8 0x000082 C D C C D D C n_getch _buffer n_recept n_outch _ptlec _ptecr n_main 3.6.2 Creating symbolic table file (sym88) The sym88 symbolic table file generator converts symbol information reference (.ref) output from the rel88 symbol information generator into an information file that contains a symbolic table for symbolic debugging in the ICE88 ICE88. (1) Set the directory in which the symbol information reference file (.ref) is presented as the current drive. (2) Start-up the sym88 with the next format. sym88_input file name * +dec format * 0 184 0 188 89 69 186 184 130 I-36 c d C D C C D D C acia.o acia.o n_getch _buffer n_recept n_outch _ptlec _ptecr n_main _ indicates a space key input. indicates a return key input. Example: C:\USER>c:\EPSON\sym88 sample.ref Inputs the symbol information reference file "sample.ref" created in the USER of the subdirector of drive C and then creates the symbolic table file "sample.sy" in the same directory as the input file. If the PATH to sym88 is set, then there is not need to specify the path before sym88. EPSON USER'S GUIDE E0C88 E0C88 Family Structured Assembler Manual II CREATING PROCEDURE OF ASSEMBLY SOURCE FILE Part II explains details of the parts relative to an assembly source file creation such as the assembly source file format and the pseudo-instructions of which the structured preprocessor sap88 and the cross assembler asm88 are included. CONTENTS Contents 1 OUTLINE . II-1 1.1 1.2 1.3 2 GENERAL FORMAT OF SOURCE FILE . II-2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 3 File Name .II-1 Source File Differences Depending on sap88 and asm88 .II-1 Macro Instructions .II-1 Symbol .II-3 Mnemonic .II-3 Operand .II-3 Comment . II-3 Numerical Expression .II-3 Characters .II-4 ASCII Character Set . II-4 Expressions .II-4 Operators .II-5 Instruction Set .II-6 Register Name .II-6 Addressing Mode .II-7 Example for Mnemonic Notation .II-8 PSEUDO-INSTRUCTIONS .