| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
CMOS 8-BIT SINGLE CHIP MICROCOMPUTER E0C88 Family STRUCTURED
Top Searches for this datasheetMF730-05 CMOS 8-BIT SINGLE CHIP MICROCOMPUTER E0C88 Family STRUCTURED ASSEMBLER MANUAL NOTICE part this material reproduced duplicated form means without written permission Seiko Epson. Seiko Epson reserves right make changes this material without notice. Seiko Epson does assume liability kind arising inaccuracies contained this material application product circuit and, further, there representation that this material applicable products requiring high level reliability, such medical products. Moreover, license intellectual property rights granted implication otherwise, there representation warranty that anything made accordance with this material will free from patent copyright infringement third party. This material portions thereof contain technology subject relating strategic products under control Foreign Exchange Foreign Trade Control Japan require export license from Ministry International Trade Industry other approval from another government agency. Please note that "E0C" name product "SMC". "SMC" appears other manuals understand that reads "E0C". MS-DOS EDLIN registered trademarks Microsoft Corporation, U.S.A. PC-DOS, PC/AT, PS/2, VGA, registered trademarks International Business Machines Corporation, U.S.A. other product names mentioned herein trademarks and/or registered trademarks their respective owners. SEIKO EPSON CORPORATION 1999 rights reserved. E0C88 Family Structured Assembler Manual Preface This manual explains software development procedure using E0C88 Family software development tool package "E0C88 Family Structured Assembler", functions software tools included package operate them. This manual been divided into following three parts depending explanation contents. User's Guide Part includes explanation program development, installation, flow program development basic processing procedures each tool within that flow when using "E0C88 Family Structured Assembler" package. Creating Procedure Assembly Source File Part explains details parts relative assembly source file creation such assembly source file format pseudoinstructions which structured preprocessor sap88 cross assembler asm88 included. Reference Part describes start-up format, start-up flags that used, error messages, etc. reference each software tool. When develop E0C88 Family program first time, should read from Part understand development procedure. After understanding basic operation procedure Part will able develop program referring necessary section Part III. This manual software tools this package used E0C88 Family models (compatible with models future). Besides this package, programs model specific settings prepared "Development Tool" package each model. Refer manual attached E0C88 Family Structured Assembler Manual USER'S GUIDE Part includes explanation program development, installation, flow program development basic processing procedures each tool within that flow when using "E0C88 Family Structured Assembler" package. CONTENTS Contents OUTLINE PACKAGE Introduction Standard Floppy Disk Outline Software Tools 1.3.1 Structured preprocessor <sap88> 1.3.2 Cross assembler <asm88> 1.3.3 Linker <link88> 1.3.4 Other utilities 1.3.5 Batch file DEVELOPMENTAL ENVIRONMENT INSTALL System Configuration Installation 2.2.1 Installer 2.2.2 Installation procedure PROGRAM DEVELOPMENT PROCEDURES I-10 Development Flow I-10 Creating Source File I-12 3.2.1 Development using assembler language I-12 Assembly I-15 3.3.1 Structured preprocessor (sap88) 3.3.2 Cross assembler (asm88) 3.3.3 Starting sap88 asm88 3.3.4 Batch processing 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 assembly execution 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 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 linking (lk88.bat) 3.4.6 Absolute object file 3.4.7 Execution example linking Creating Program Data File I-33 3.5.1 Program data file I-33 3.5.2 Creating program data file using hex88 I-33 3.5.3 Motorola format I-34 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 OUTLINE PACKAGE OUTLINE PACKAGE Introduction "E0C88 Family Structured Assembler" package software development tools CMOS 8-bit single chip microcomputer E0C88 Family. consists cross assembler, linker utilities create programs. This package commonly used E0C88 Family models allows development programs with macro function. Model dependent software tools prepared each model "E0C88XXX Development Tool" package. Therefore, software included this package directly used future E0C88 Family models well. Outline Software Tools software tools included this package responsible area indicated (with shading) overall software development program. Figure 1.3.1 shows flow software development using structured assembler. Standard Floppy Disk This package includes following floppy disks containing structured assembler, linker various common software tools. 3.5" floppy disk (2HD) IBM-PC/AT E0C88 Family Structured Assembler Manual (this manual) Before package, read section "2.1 System Configuration" containing information personal computers compatible host development systems. Always make copy master disk either hard disk another floppy disk store original safe place. Note: DISKCOPY backup original disk. Refer section "2.2 Installation" install floppy disk software development tools. USER'S GUIDE EPSON Software tool included this package Structured preprocessor Structured assembly source files OUTLINE PACKAGE sap88 Cross assembler Assembly source files asm88 Relocatable object files Cross reference list file Error list file Assembly list files link88<fn.lcm Linker Absolute object file .lcm Binary/HEX converter Link command parameter file EPSON Program unused area filling utility Program data file rel88>fn.ref generator Symbol information hex88 .ref fog88XXX Function option generator Symbol information reference file sym88 .psa .fdc Program data file (Unused area filled with Function option document file Symbolic table file generator fil88XXX .fsa sog88XXX option generator .sdc Segment option document file Segment Symbolic table file Function option file .ssa Segment option file mdc88XXX checker .pan Mask data file submitting Mask data USER'S GUIDE Fig. 1.3.1 Structured assembler software development flow OUTLINE PACKAGE basic functions each program follows. 1.3.1 Structured preprocessor <sap88> sap88 structure preprocessor preprocessor used macro function cross assembler asm88. First create assembly source files including macro functions process them with sap88 create source files which macros expanded into E0C88 instructions) that assembled with asm88. Symbolic table file generator <sym88> sym88 symbolic table file generator converts symbolic information file generated file redirect with rel88 symbol information generator symbolic table file that referenced ICE88. Loading symbolic table file corresponding relocatable assembly program file ICE88 makes symbolic debugging possible. 1.3.5 Batch files Batch files included automatically process basic tools operations promote efficient program development. Customize file accordingly. 1.3.2 Cross assembler <asm88> asm88 cross assembler assembles program source file described E0C88 instruction pseudo-instruction converts into machine language. asm88 compatible with relocatable assembly development module, creates relocatable object files used link other modules linker. Note: batch files installed root directory. them after copying your work directory necessary. ra88.bat: Batch file relocatable assembly lk88.bat: Batch file linking Details batch file create customized files will explained Section respectively under their titles. 1.3.3 Linker <link88> relocatable object file created with asm88 linked there more than present then converted into absolute (binary form) object file. 1.3.4 Other utilities This package contains following utility programs addition earlier mentioned major programs. Symbol information generator <rel88> This program that obtains symbolic table information relocatable object file. This utility used preprocessing symbolic table generations. Binary/HEX converter <hex88> Converts binary file into Motorola format file (ASCII file). This basically used convert absolute object file output from link88 linker into program file. converted program data file allows debugging through hardware tools creation mask data. USER'S GUIDE EPSON DEVELOPMENTAL ENVIRONMENT INSTALL DEVELOPMENTAL ENVIRONMENT INSTALL Here will explain configuration program development system installation procedure software tools. System Configuration system configuration that necessary program development using this package shown below. Development using IBM-PC/AT Model: DOS: capacity: Hard disk drive: Floppy disk drive: IBM-PC/AT full compatible (*1) PC-DOS ver. higher (*2) MS-DOS ver. higher (*2) 640K bytes (*3) Free space more than 510K bytes necessary (*4) inches (1.44M bytes) drive more graphic board: Printer: Other software: Restrictions: Compatible with models that Intel 80286/386/486 system CPU. When debugging using ICE88, interface board compatible with (8-bit) assumes that 80286 higher (IBM-PC/AT). case MS-DOS 5.0, possible operate unless task swap function used. operated DOS/V compatible with PC/MS-DOS. (However, since multilingual mode supported, sure English mode.) This system operates real mode does protected memory. Assumes basically. EGA, (text display only, fixed character lines) listing (only character printing) Editor source file creation/modification EPSON USER'S GUIDE DEVELOPMENTAL ENVIRONMENT INSTALL Installation Here will explain installing programs included this package. contents floppy disk supplied with this package shown Figure 2.2.1. Keep original disk safe place backup after installing. 2.2.1 Installer This package includes exclusive installer "setupasm.exe" install software tools customer's disk drive. Install software tools this package starting this installer. Path name install fixed root directory default, setting that appending upper layered path name possible. When installing other software tools E0C88 Family, setting same upper layered path name like this, file management disk will easy. What's more, added path names will automatically reflected path name search batch file commands. Example: When setting append "EPSON" upper layered path name. <EPSON> Upper layered path name when installing sap88.exe asm88.exe link88.exe Note: DISKCOPY backup original disk. "E0C88 Family Structured Assembler" package (This package) \<88XXX> \<test> "E0C88XXX Development Tool" package setupasm.exe ra88.bat lk88.bat sap88.exe asm88.exe link88.exe rel88.exe hex88.exe sym88.exe Installer Batch file relocatable assembly Batch file linking Structured preprocessor Cross assembler Linker Symbol information generator Binary/HEX converter Symbolic table file generator Fig. 2.2.1 Contents floppy disk Note: batch files installed root directory. them after copying your work directory necessary. USER'S GUIDE EPSON DEVELOPMENTAL ENVIRONMENT INSTALL 2.2.2 Installation procedure software tools this package need capacity approximate 510K bytes including work area case program installed. Therefore, recommend (hard disk) basically. exclusive installer this package checks free space disk installed. there enough free space install destination disk, reserve free space disk perform file deletion backup. Operation procedure Insert floppy disk this package into drive. Start installer. When using IBM-PC/AT, sure English mode. C:setupasm Hereafter, install according messages displayed below. Initial screen E0C88 Family Development Tool Install Utility Ver. X.XX Copyright(C) SEIKO EPSON CORP. 1993-1996 ******** Structured Assembler ******** Enter install drive from Transfer source drive (original disk) Transfer destination drive path (default setting) (Quit Ctrl Enter copy drive path ************************* Message Window ************************* Enter Caution Install copy drive must different name EPSON USER'S GUIDE DEVELOPMENTAL ENVIRONMENT INSTALL Changing transfer destination drive path E0C88 Family Development Tool Install Utility Ver. X.XX Copyright(C) SEIKO EPSON CORP. 1993-1996 ******** Structured Assembler ******** Enter install drive from transfer source drive also changed return cursor this position. appending path transfer destination disk setting cursor this position. transfer destination drive also changed setting cursor this position. (Quit Ctrl ************************* Message Window ************************* Enter appends path from default setting (max char) Enter copy drive path Registration appending path transfer destination E0C88 Family Development Tool Install Utility Ver. X.XX Copyright(C) SEIKO EPSON CORP. 1993-1996 ******** Structured Assembler ******** Enter install drive from appending path transfer destination disk. Enter copy drive path C:\EPSON\ (Quit Ctrl ************************* Message Window ************************* Enter appends path from default setting (max char) USER'S GUIDE EPSON DEVELOPMENTAL ENVIRONMENT INSTALL Confirmation transfer source disk (original) insertion E0C88 Family Development Tool Install Utility Ver. X.XX Copyright(C) SEIKO EPSON CORP. 1993-1996 ******** Structured Assembler ******** Install drive from Copy drive C:\EPSON\ Confirm setting Enter Confirm setting Enter Volume name original disk (Quit Ctrl ************************* Message Window ************************* Insert install disk ASM88_DISK1 specified drive Press continue_ After setting transfer source drive transfer destination drive Enter respectively, installer waits confirmation transfer source disk (original) insertion. Installation starts inputting this status. file name transferred displayed "Message Window" during installing. When installation completed normally, message displayed "Message Window". Error E0C88 Family Development Tool Install Utility Ver. X.XX Copyright(C) SEIKO EPSON CORP. 1993-1996 ******** Structured Assembler ******** Install drive from Copy drive (Quit Ctrl ************************* Message Window ************************* Insufficient disk space error occurred during installing, error message displayed "Message Window". Press continue_ Note: When error which fatal generated installing stage, installer returns initial screen operation continued. However, when "Quit" fatal error generated, installer forcibly terminated. this case, delete file which installed incompletely.) EPSON USER'S GUIDE DEVELOPMENTAL ENVIRONMENT INSTALL <Messages installer> Start-up message E0C88 Family Development Tool Install Utility Ver. X.XX Copyright SEIKO EPSON CORP. 1993-1996 Setting, confirmation operating messages Message Explanation Transfer source drive name Enter install drive from Transfer destination drive name Enter copy drive path Caution Install copy drive must different name Transfer source drive name transfer destination drive name must different names. Insert install disk [volume name] specified drive Copy drive path [drive path name] Enter appends path from default setting (max char) Install drive from [Install drive path name] Copy drive [Copy drive path name] Copying [reading file] [writing file] Press continue Press exit E0C88 Family Dev. Tools install utility been successfully Good-bye from E0C88 Family Dev. Tools install utility Insert transfer source disk [volume name] into specified drive. Transfer destination drive path [drive name path name]. Input path name appending default setting. Transfer source drive [drive name path name]. Transfer destination drive [drive name path name]. Reading transfer source file [file name]. Writing transfer destination file [file name]. Press continue installer. Press terminate installer. Installation E0C88 Family software tools been succeeded. Terminates installation E0C88 Family software tools. Error messages Error message Incorrect Version later Write protect error Unit exist Drive ready Install disk different Seek error Media type different Sector found Write error Read error Other error Disk error [drive] Cannot create path Setting path already exists enter another drive path Insufficient disk space Insufficient disk space, insert other disk select install drive select copy drive Error [Reading file] Cannot open source file Error [Writing file] Cannot open file E0C88 Family Dev. Tools install utility been terminated Caution Delete temporary installed files Explanation version incorrect. Transfer destination disk been protected from writing. There unit number. drive ready. Disk installed different. Seek error been generated. Disk different. Sector cannot detected. Write error been generated. Read error been generated. Other error been generated. Disk error been generated [drive]. Path cannot created. Since path already exists, another drive path. Disk space insufficient. Since disk space insufficient, insert another disk. Drive specification transfer source disk wrong. Drive specification transfer destination disk wrong. Transfer source file cannot read. Transfer destination file cannot written. Installation E0C88 Family software tools been terminated. Since installation E0C88 Family software tools been terminated, delete file which installed incompletely. USER'S GUIDE EPSON PROGRAM DEVELOPMENT PROCEDURES PROGRAM DEVELOPMENT PROCEDURES This section will start explaining flow involved program development then give details each software tool this package used, accordance with development flow. Each software tools will explained basic processing procedures flag settings (start-up command flag) required tools terms batch file commands. Refer Part III, "Reference" more information other flags, etc. Development Flow following shows program development procedure using asm88 cross assembler. <Relocatable assembly link> Create entire program multiple module (development module) Relocatable assembly refers assembling method which programs allocated into several parts (each allocated part referred module) according processing contents then undergoing development procedures each module. cross assembler input assembly source files created with editor files which macros expanded sap88. Each module (relocatable object file) linked linker after assembling then consolidated into program. program memory address that allocates each module determined through link. Therefore, developmental process which source program created performed without regards address. Debugging efficiency boosted since this method allows debugging modules that have been allocated small programs. Figure 3.1.1 shows flow program development upon using relocatable assembly. This package contains "ra88.bat" "lk88.bat" that batch files containing basic processing tools. Customize accordingly. (Refer section "3.3.4 Batch processing relocatable assembly" "3.4.5 Batch processing linking (lk88.bat)" more information "ra88.bat" "lk88.bat".) Note: Prepare each relocatable module under bytes that they bank. Modules exceeding this capacity will result error message during linking. Thus, will necessary allocate program that under bytes. Similarly, data size must under bytes that fits page. modules cannot reallocated that they span across both banks. this case, modules will allocated that starts from head next bank. program memory (usable area) will wasted modules large. Give consideration each module size prevent this. I-10 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Create source file editor Structured assembly source files (create each module) Correct after debugging program Execute sap88 Expands macro statements Assembly source file after expanding macro statements Execute asm88 Assembles source file Relocatable object file Assembly list file Cross reference list file Error list file Execute each module Batch processing relocatable assembly <ra88.bat> Relocatable object files (create each module) .lcm Link command parameter file link88* Created editor Execute link88 Link Absolute object file Execute hex88 Converts binary Program data file Execute rel88 Creates symbol information Symbol information reference file .ref Execute sym88 Creates symbolic table file Symbolic table file .ref Batch processing linking <lk88.bat> System code setting filling unused program area fil88XXX. Program debugging using ICE88/EVA88. Creating mask data program. Fig. 3.1.1 Relocatable assembly development flow USER'S GUIDE EPSON I-11 PROGRAM DEVELOPMENT PROCEDURES Creating Source File Software used: Editor Create source file using editor. Small applications created solely assembler language with entire program single module. What's more, source files single module also allocated using INCLUDE pseudoinstruction sap88 structured preprocessor. Generally, debugging requires appropriate consideration module allocation since source files each created respective modules. <Instruction set> E0C88 Family models employs E0C88 core CPU. Therefore, instructions common models other than MODELS mode limitations. Refer "E0C88 Core Manual" more information instructions, refer "E0C88XXX Technical Manual" control program examples peripheral circuit incorporated each model. asm88 cross assembler capable converting mnemonic instruction settings E0C88 into machine language. <Macro statement> Macro used priorly define processing (sequence instructions) frequently used program with voluntary name allow called under that specific name. result, need routine procedures eliminated. (For more information refer Part this manual.) Macro statements offered pseudo-instructions sap88 putting through sap88 applied macro call-out portion mnemonic form that assembled. 3.2.1 Development using assembler language Create source files assembler modules using E0C88 instruction assembler pseudo-instructions. Specify assembly source file name with ".s" extension. Each source program statement basically comes following form. Symbol field Mnemonic field Operand field Comment field Symbol field: This field indicates symbol. Always colon immediately after symbol, other than command statements. Mnemonic field: This field indicates operation code pseudoinstruction. Operand field: This field indicates operand, constant, variable, defined symbol, symbol that indicates memory address formula each instruction. Comment field: semi-colon beginning this field, then continued with comment. Refer Part this manual more information create source file. Macro statement offered sap88 structured preprocessor various pseudo-instructions asm88 cross assembler used this assembler. following indicates outlines these statements instructions. I-12 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Example macro definition Before expanding subtitle "example" public main,work external src_address,dst_address,counter 0ffh data work: code macro define nop3 macro endm example main: a,#abc b,[work] nop3 macro call ix,#src_address iy,#dst_address hl,[counter] ;*** After expanding subtitle "example" public main,work external src_address,dst_address,counter 0ffh data work: code macro define example main: a,#abc b,[work] ix,#src_address iy,#dst_address hl,[counter] ;*** Macro definition Macro call Macro statement expanded into mnemonics USER'S GUIDE EPSON I-13 PROGRAM DEVELOPMENT PROCEDURES <Pseudo-instruction> Pseudo-instruction function Section setting pseudo-instructions (BANK, DATA) Data definition pseudo-instructions (DB, ASCII, PARITY) Symbol definition pseudo-instructions (EQU, SET) Location counter control pseudo-instruction (ORG) External definition reference pseudo-instructions (EXTERNAL, PUBLIC) Source file insertion pseudo-instruction (INCLUDE) sap88 only Assembly termination pseudo-instruction (END) Macro related pseudo-instructions (MACRO-ENDM, DEFINE, LOCAL, PURGE, UNDEF, IRP-ENDR, IRPC-ENDR, REPT-ENDR) sap88 only Conditional assembly pseudo-instructions (IFC-ENDIF, IFDEF-ENDIF, IFNDEF-ENDIF) sap88 only Output list control pseudo-instructions (LINENO, SUBTITLE, SKIP, NOSKIP, LIST, NOLIST, EJECT) Description specify sections. Specifies program area data area. (For more details refer "3.3.2 Cross assembler (asm88)".) Specifies various data within program memory. Allocates constant symbols (voluntary name) used within source program. Sets program counter. Allows symbols labels referenced between modules. Inserts contents other source files voluntary places. Specified assembly point. Defines macro statement. Assembly skip according definition symbol. Controls output assembly list file. Unlike instructions, pseudo-instructions directly compose application programs upon executing control instructions asm88. pseudo-instructions that used with this assembler indicated above according their functions. (Refer Part this manual more details.) I-14 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Assembly This section will explain method assemble assembly source file relocatable object file created process. Software used: sap88, asm88 3.3.2 Cross assembler (asm88) asm88 cross assembler assemble E0C88 Family instructions pseudo-instructions asm88 converts into machine language. asm88 compatible with relocatable assembly. relocatable assembly creates relocatable object files (".o") that will linked with other modules using linker. asm88 input several assembly source files thus allows simultaneously assembly several relocatable modules. asm88 also output three lists, i.e., assembly list (".l"), error list (".e") cross reference list (".x") programmer. assembly list consists line number, target address, code that corresponds source source statements. line number output decimals, while address code output hexadecimals. case error takes place during assembling, error list file containing source file name, line number which error took place, error level error message will created. What's more, assembly list file will also note line which error took place with asterisks beside line number. Processing will continued regardless error message unless error fatal. relation symbol definition reference within file been prepared foster easy understanding depending cross reference list. File management been enhanced since they prepared separate files. Create source file editor Structured assembly source file (create each module) Execute sap88 Expands macro statements Assembly source file after expanding macro statements Execute asm88 Assembles source file Relocatable object file Execute relocatable assembly Assembly list file Cross reference list file Error list file Linking Fig. 3.3.1 Flowchart relocatable assembly 3.3.1 Structured preprocessor (sap88) This assembler system composed sap88 structured preprocessor asm88 cross assembler. indicated section 3.2.1, sap88 responsible putting macro statement mnemonic form. Since asm88 cannot read macro statement, assembly source files included these documents directly input asm88 file. asm88 actual assembler responsible converting mnemonic language into machine language assembling cannot performed with sap88. Therefore, there need used both sap88 asm88 structured assembly. advisable process through sap88 even structured assembly required, since process will effect source file. sap88 inputs assembly source file with ".s" extension expands macro statements. After that, sap88 outputs file assembly. name extension output file should ".ms". <Control program data memory> This section will explain control memory program data. E0C88XXX memory categorized program memory (ROM) program code memory data. example, even certain symbol noted voluntary position assembly source file, asm88 capable determining whether this within program memory data memory. this reason, there need clarify which memory each line comes under prior instruction through section setting pseudo-instructions. following explains section methods relocatable assembly, asm88 process corresponding method. USER'S GUIDE EPSON I-15 PROGRAM DEVELOPMENT PROCEDURES Setting sections absolute address allocated within each module relocatable assembly will specified determined upon liking. Therefore, absolute address cannot specified within assembly source file. relative address specification made using pseudo-instruction, however, this case, standard relative address will required. What's more, there also need specify segments program data area asm88. entire program this assembler categorized into CODE DATA. These basically indicate following areas. CODE section: Program data area written DATA section: Data memory area other than asm88 complete with CODE DATA pseudo-instruction specify section. area through descriptions assembly source file. Specifying CODE section CODE pseudo-instruction described within assembly source file, asm88 will assemble allocated CODE section until next DATA pseudo-instruction appears. CODE pseudo-instruction used several places within module. asm88 assumes head CODE section within module relative address 0000H will continuously realign them order that CODE pseudo-instruction appears consolidate into block. other words, CODE specification range module will handled CODE section. (Refer Figure 3.3.2.1.) CODE section each module further consolidated whole linker. linker will link sectional units accordance with bank control within program memory area. CODE section consists CODE sections with multiple modules maximum size limited bytes bank (Details section control will explained "3.4.2 Section control".) Therefore, programmer must careful more than bytes code when creating module. capacity CODE section verified using -ROM# flag when starting-up asm88. this feature advised. example, when flag specification "-ROM 32768" performed, error message will displayed CODE section module exceeds bytes. Specifying DATA section DATA pseudo-instruction described within assembly source file, asm88 will assemble allocated DATA section until next CODE pseudo-instruction appears. DATA pseudo-instruction used several places within module. asm88 assumes head DATA section within module relative address 0000H will continuously realign them order that DATA pseudo-instruction appears consolidate into block. other words, DATA specification range module will handled DATA section. (Refer Figure 3.3.2.1.) DATA section each module further consolidated whole linker. linker will link sectional units accordance with page control within data memory area. DATA section consists DATA sections with multiple modules maximum size limited bytes page (Details section control will explained "3.4.2 Section control".) Therefore, programmer must careful more than bytes code when creating module. capacity DATA section verified using -RAM# flag when starting-up asm88. this feature advised. example, when flag specification "-RAM 65535" performed, error message will displayed DATA section module exceeds bytes. Assembly source file CODE DATA CODE DATA Object code CODE section DATA section Fig. 3.3.2.1 CODE section DATA section Note either CODE pseudo-instruction DATA pseudo-instruction missing during relocatable assembling operation will result error. this reason, important that CODE pseudoinstruction used program memory DATA pseudo-instruction used data memory. I-16 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES 3.3.3 Starting sap88 asm88 <sap88 operation procedure> directory which structured assembly source file (.s) presented current drive. Start-up sap88 with next format. sap88_[flag]_input file indicates space input. indicates return input. Flag -ROM# -RAM# Description Specify capacity byte units. especially useful during relocatable assembling used verify size CODE area. Specify capacity byte units. especially useful during relocatable assembling used verify size DATA area. following indicates flag used batch processing relocatable assembly (ra88.bat). Flag <file name> Description Specify file name that output. (Specify ".ms" extension file output.) this flag omitted will processed standard output. Refer Part this manual more information other flags. Example When continuously assembling several assembly source files through relocatable assembly. C:\USER>c:\EPSON\asm88 sample1.ms sample2.ms Inputs assembly source files "sample1.ms" "sample2.ms" created sub-directory USER drive starts relocatable assembly process. Then creates relocatable object files "sample1.o" "sample2.o" same directory input file. same time, assembly list files "sample1.l" "sample2.l", cross reference list files "sample1.x" "sample2.x", error list files "sample1.e" "sample2.e" will also created same directory. PATH asm88 set, then there need specify path before asm88. Example Assembling with relocatable assembler, including verification capacity. Refer Part this manual information other flags. Example: C:\USER>c:\EPSON\sap88 sample.ms sample.s Inputs assembly source file "sample.s" created sub-directory USER drive then creates assembly source file "sample.ms" input asm88 same directory input file. PATH sap88 set, then there need specify path before sap88. Refer section "3.3.9 Example assembly execution" more information files messages displayed. C:\USER>c:\EPSON\asm88 -ROM 32768 -RAM 65536 sample.ms Inputs assembly source file "sample.ms" created within sub-directory USER drive starts relocatable assembly. Then creates relocatable object file "sample.o" same directory input file. same time, creates assembly list file "sample.l", cross reference list file "sample.x" error list file "sample.e" same directory. capacity CODE DATA sections will verified during assembling with -ROM -RAM flags. error will result this case when CODE exceeds bytes DATA exceeds bytes. PATH asm88 set, then there need specify path before asm88. Refer section "3.3.9 Example assembly execution" more information files messages displayed. <asm88 operation procedure> directory which assembly source file (.ms) created with sap88 exsists current drive. Start-up asm88 with next format. asm88_[flag]_input file indicates space input. indicates return input. Flag omitted. following indicates flags used batch processing relocatable assembly (ra88.bat). USER'S GUIDE EPSON I-17 PROGRAM DEVELOPMENT PROCEDURES 3.3.4 Batch processing relocatable assembly (ra88.bat) start-up procedures sap88 asm88 were already discussed earlier section, however, must further noted that these batch processed consolidating them into batch file. batch file voluntarily created user, however, since this package contains batch file, i.e., ra88.bat relocatable assembly, following will introduce contents batch file them. This batch file used general processing purposes. advantageously customizing flag settings, etc. needed. Figure 3.3.4.1 shows ra88.bat processing flow. Structured assembly source file (create each module) <Outline process> ra88.bat inputs specified assembly source file then executes sap88 asm88, respectively perform relocatable assembly create relocatable object file. Since sap88 does permit input multiple assembly source files, limited assembly module other than when several structured assembly source files read with INCLUDE pseudo-instruction sap88. <Input/output files> following indicates input/output files ra88.bat. Input file Structured assembly source file (relocatable): file_name.s This structured assembly source file (relocatable) created with editor such EDLIN. Output files Assembly source file: file_name.ms Execute sap88 Expands macro statements Assembly source file after expanding macro statements assembly source file which macros expanded will output. Relocatable object file: file_name.o Execute asm88 Assembles source file Relocatable object file Assembly list file Cross reference list file Error list file This binary file that been converted machine language that reallocated through relocatable assembly. (This also file that inputs lk88.bat batch file perform linking.) Assembly list file: file_name.l Execute each module Batch file relocatable assembly <ra88.bat> Fig. 3.3.4.1 ra88.bat processing flow This file output list that corresponds each source statement when machine language relocatable address (the head CODE DATA section assumed relative address 000000H) converted with assembler. Cross reference list file: file_name.x This address list that contains definition references symbols. Error list file: file_name.e This list error taking place during assembling. I-18 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES <Operation procedure> directory which structured assembly source file (.s) presented current drive. Start-up ra88.bat with next format. ra88_file name indicates space input. indicates return input. Note: There basically error checks made these parameter settings, therefore, parameter with settings other than those specified. <Customizing ra88.bat execution command> ra88.bat following command line upon execution program. Customize these command lines flag without default setting used. sap88 input extensions file name. fixed ".s" extension. Example: C:\USER>c:\EPSON\ra88 sample %drv%sap88 %1.ms %1.s asm88 Inputs structured assembly source file "sample.s" created within sub-directory USER drive starts relocatable assembly. Then creates following files same directory input file. sample.ms, sample.o, sample.l, sample.x, sample.e PATH ra88 set, then there need specify path before ra88. Refer section "3.3.9 Example assembly execution" more information files messages displayed. Customizing ra88.bat <Customizing ra88.bat execution parameters> Since ra88.bat controls program execution, execution parameter customization field within General parameters temporarily described default position, however, advised that program customized accordance with user's development method. Setting capacity (Verification size CODE section) %drv%asm88 -ROM %rom% -RAM %ram% %1.ms %drv% path that locates execution command ra88.bat. this reason, altered neither statement that defined altered. file name that input from command line. following indicates ra88.bat program source list message list ra88.bat. Refer upon customizing program. 32768 capacity CODE section that locates errors will specified bytes. (default capacity 32768 bytes) Setting capacity (Verification size DATA section) 65536 capacity DATA section that locates errors will specified bytes. (default capacity 65536 bytes) USER'S GUIDE EPSON I-19 PROGRAM DEVELOPMENT PROCEDURES ra88.bat program source list echo E0C88 Family Auto Relocatable Assemble Execution Utility (Ver. X.XX) Copyright(C) SEIKO EPSON CORP. 1993-1996 customized parameter information rom=* capacity(32768 max.) ram=* capacity(65536 max.) User customization field ********** customized parameter area (default) ********** Note: There basically caution customized parameters value check, therefore error checks made please carefully when these parameter ********** settings, therefore, Setting capacity rom=32768 parameter with settings other Setting capacity ram=65536 than those specified. ********** command searching path ********** drv=c:\ path that locates execution command ra88.bat. root directory default. Customize necessary. main program want another option(s), please append option flag(s) command line. :start echo E0C88 Family Auto Relocatable Assemble Execution Utility Ver. X.XX echo Copyright SEIKO EPSON CORP. 1993-1996 "%1"=="" goto usage :error_chk exist exist exist exist %drv%nul goto exit04 %1.s goto exit05 %drv%sap88.exe goto exit06 %drv%asm88.exe goto exit07 (sap88) :sap88 %drv%sap88 %1.ms %1.s errorlevel goto exit01 (asm88) :asm88 %drv%asm88 -ROM %rom% -RAM %ram% %1.ms errorlevel goto exit02 goto Start-up command sap88 Start-up command asm88 :usage echo usage ra88 needs [input file_name] goto skip :exit01 echo Error stop %drv%sap88.exe goto skip :exit02 echo Error stop %drv%asm88.exe goto skip :exit03 echo Cannot find %drv% installed E0C88 dev. tools directory goto skip :exit04 I-20 EPSON USER'S GUIDE 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 been successfully executed. :skip rom= ram= drv= Message list Start-up message E0C88 Family Auto Relocatable Assemble Execution Utility Ver. X.XX Copyright SEIKO EPSON CORP. 1993-1996 Message when terminated normally ra88.bat utility been successfully executed. Error message Error message usage ra88 needs [input file_name] Error stop [drive path name] sap88.exe Error stop [drive path name] asm88.exe Cannot find [drive path name] installed E0C88 dev. tools directory Cannot find input file Cannot find [drive path name] sap88.exe Cannot find [drive path name] asm88.exe Explanation Usage output. Error occurred sap88. Error occurred asm88. Cannot find [drive path] which E0C88 Family software tools installed. Cannot find aa88.bat input file (.s). Cannot find sap88. Cannot find asm88. Note: following operations will stopped when error occurs. <Precautions upon using batch file> Some messages displayed during batch processing automatically generated through MS-DOS/PC-DOS batch processing function command. this reason, placed under MS-DOS/PC-DOS control when error occurs thus force batch processing interrupted. When error occurs, following procedures automatically continue. However, controllable noted reason indicated above. ra88.bat lk88.bat (mentioned hereafter) employ MS-DOS/PC-DOS COPY command addition E0C88 Family tools. EPSON this reason, requested that COPY command operable, setting PATH, when executing batch file. execution parameters (user customization field) batch file basically locate parameter setting errors. Therefore, parameters other than specified. MS-DOS/PC-DOS environment variable will used execute batch file, therefore, size environment variable should allocated with much space possible using CONFIG.SYS. USER'S GUIDE I-21 PROGRAM DEVELOPMENT PROCEDURES 3.3.5 Relocatable object file relocatable object file binary file that created through relocatable assembly asm88. Other than when flag specified file name that created will same file name input with asm88 extension will ".o". This file consists header information symbol tables required reallocation using linker, addition object (machine language) code. assembly list file consists following items: LINE consecutive line number from beginning. ADDRESS This refers target address object code. CODE: This object (machine language) code that corresponds source statement same line. SOURCE STATEMENT This assembly source input asm88. When relocatable assembly performed, code address will relative address from beginning CODE section. Similarly, address data area relative address from beginning DATA section. error occurred, asterisks will placed beginning line which error occurred. output assembly list file controlled with following asm88 pseudo-instructions flag specifications upon start-up. 3.3.6 Assembly list file assembly list file ASCII file added with object code (hexadecimal) code address (hexadecimal) assembly source file input asm88. created through asm88 assembly. Each page will have header with file name date that file created. file name that created will same file name input asm88 other than when flag specified. extension will ".l". Output list control pseudo-instructions Pseudo-instruction LINENO SUBTITLE SKIP NOSKIP LIST NOLIST EIECT Description Changes line number (LINE) voluntary value. Inserts subtitle line that voluntarily after column explanation line. line code exceeds bytes through ASCII, data settings, exceeding portion will output. (default setting.) Outputs codes canceling SKIP setting. following lines output list when NOLIST setting canceled. Prevents output list from line after pseudo-instruction. Adds involuntary page break. Refer Part this manual details pseudo-instructions. Start-up flag Flag Prevents creation assembly list file. Description Refer Part this manual details flag. I-22 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES 3.3.7 Cross reference list cross reference list file created through asm88 assembly with ASCII file. This ASCII file defined within module contains list reference symbols. name file created will same file name input with asm88 other than when specifying flag. extension will ".x". output format cross reference list file follows. SYMBOL VALUE LINE INFORMATION Reference definition Global Local Attribute Label Constant Variable Undefined within module VALUE Symbol value digit, hexadecimal expression) LINE INFORMATION This list which symbol defined referenced line numbers. They output follows. lineno* lineno lineno lineno lineno*: line number which target symbol defined. lineno: line number which target symbol referenced. LINE INFORMATION consist maximum line numbers. following page header will output head each page. numeric labels temporary labels. same name used they outside range defined general label. will output cross reference list. (Refer Part this manual numeric labels.) cross reference list file prohibit output using flag asm88. SYMBOL Symbol name (maximum characters) Example cross reference list CROSS REFERENCE TABLE asm88 delay delay_00 delay_3times 000100H 000103H 000107H error.x 1993-06-07 17:28 PAGE 3.3.8 Error list errors generated during asm88 assembling will output error list file. name file created will same file name input with asm88 other than when specifying flag. extension will ".e". output format error list indicated below. SOURCE FILE LINE No.: ERROR LEVEL: ERROR MESSAGE SOURCE FILE LINE ERROR LEVEL Fatal This fatal error. Assembly will interrupted. Fatal errors displayed without output error list file. ERROR MESSAGE Error content Refer Part this manual error messages asm88. Example error list error.s Severe: ddelay defined Source file name Line number which error occurred Level error This warning does affect output object. This general error. output object will invalid. When error generated, nothing will output error list file. Warning Severe USER'S GUIDE EPSON I-23 PROGRAM DEVELOPMENT PROCEDURES 3.3.9 Example assembly execution following shows example assembly execution. Messages when ra88.bat (relocatable assembly) executed C:\USER>c:\EPSON\ra88 sample C:\USER>echo E0C88 Family Auto Relocatable Assemble Execution Utility Ver. X.XX Copyright SEIKO EPSON CORP. 1993-1996 sap88 Structured Assembler Preprocessor Version X.XX Copyright 1993 Advanced Data Controls, Corp. Licenced SEIKO EPSON CORP. asm88 Cross Assembler Version X.XX Copyright 1993 Advanced Data Controls, Corp. Licenced SEIKO EPSON CORP. Symbol(s) Used Warning Error(s) Severe Error(s) ra88.bat utility been successfully executed. C:\USER> I-24 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Link This section will explain linking operations relocatable modules. Software used: link88 Relocatable object files Create link88 link command parameter file editor Link command parameter file .lcm Execute link88 Link Absolute object file Creating program data file Fig. 3.4.1 Link processing flow Therefore program described linear programs created 16M-byte address space. This indicates that multiple modules simply linked. this reason, link88 employs multi-section method resolve this problem allocate voluntary modules voluntary addresses. Allocation this method undertaken making possible specify addresses block units referred sections. section categorized into CODE section which allocation site DATA section which data memory. resolve aforementioned bank page problems, size CODE section consist bytes size DATA section limited bytes. important note that this size based fact that they allocated over bank page limit. case they allocated middle bank page, size will limited remaining size. create object code desired multisection using section method, user must define section supply address information allocation section allocate address. section defined using linker's secondary flag (flag used define section) +code +data flag used allocate address. maximum sections defined with link. 3.4.1 Linking modules object codes each module created with relocatable assembly asm88 specified located certain portion ROM. allocation address determined each modules linked. link88 linker tool used linking operations. When linking successfully performed relative address external reference label that undeclared this point will declared thus, create absolute object file (.a) that consolidates modules into file. processing this absolute object file with binary/HEX converter hex88, indicated section 3.5, program data file used create program mask data debug hardware will created. <Example section definition> Let's look section definition procedures through simple example. First, method actualize memory mapping indicated Figure 3.4.2.1 will explained. will assumed that "prg1.s" describing "prg2.s" describing "prg3.s" describing assembled then each respective relocatable object file "prg1.o", "prg2.o" "prg3.o" created. this case, indicates CODE section indicates DATA section. flag link88 specified through input redirect operations. When following flag specification performed link command parameter file (filename.1cm) that used allocate address define section created following executing link88<filename.lcm, memory mapping indicated Figure 3.4.2.1 will created. 3.4.2 Section control E0C88 Family 24-bit width address space (maximum bytes). using topmost 8bit register control using code bank register (CB), expand page register (EP, others, address space allocated into 32K-byte bank (CODE) 64K-byte page (DATA) unit. Access performance improved within those ranges. rewriting content register, user will have access voluntary bank page from voluntary bank. result, large programs data bases easily controlled. However, bank page will automatically changed with execution program thus must accordance with program specifications. USER'S GUIDE EPSON I-25 PROGRAM DEVELOPMENT PROCEDURES 000000H 000100H Memory 00001FH prg1.o prg2.o <Allocation address relocation section> indicated earlier example, flag determines physical start address section defined immediately before operations. Let's say, example, following settings made certain section. 0x10000 start address this section will physically 10000H. CODE section will specified head bank DATA section will specified head page following allocation (reallocation address information) will performed symbol symbol defined positioned from head this section 1234H offset that symbol used reference that address. When handled data memory (symbol name will indicated "SYMBOL".) Operand #SYMBOL [SYMBOL] #POD SYMBOL #LOD SYMBOL #HIGH SYMBOL #LOW SYMBOL [BR:LOW SYMBOL] Relocate value 002xxxH prg3.o 00F000H 00F800H 00F7xxH 00FFFFH Fig. 3.4.2.1 Memory mapping example Contents file transferred link88 (link88<filename.lcm) prg.a +code -p0x000000 +data -p0x00f000 prg1.o +code -p0x000100 prg2.o prg3.0 .(1) .(2) .(3) .(4) .(5) .(6) Specifies absolute object file that output with flag. Defines CODE section that starts with physical address from 000000H. Defines DATA section that starts with physical address from 00F000H. Allocates "prg1.o" sections defined indicated above. this case, contents CODE section "prg1.o" will allocated from beginning CODE section defined contents DATA section will allocated head DATA section defined (3). Defines CODE section that starts with physical address from 000100H. This CODE section different from CODE section defined (2). CODE section will completed when section defined this point. "prg2.o" CODE section "prg3.o" CODE section will continuously allocated respective order. this example, "prg2.o" "prg3.o" does have DATA section. However, there DATA section then will allocated from address following DATA section defined (3). There three sections defined linked this example indicated above. When link successful absolute object file named "prg.a" will created. Multiple modules allocated these sections defined long within allowable capacity limit. What's more, multiple sections allocated within bank well. I-26 #1234H [1234H] 1234H [BR:34H] When handled program memory (symbol name will indicated "LABEL".) Operand #BOC LABEL #LOC LABEL Relocate value 9234H relative valued accordance with address that allocated branch instruction will calculated relative branch instructions like "JRL LABEL". section start address, above example, specified head bank page, however, specifications made start middle bank page, indicated below. 0x15000 this case start address will physically 15000H have 5000H offset from head bank page. link88 relocates each symbol based physical address, therefore, such offsets will also properly processed. symbol information after reallocation will recorded absolute object file. list these symbols created using rel88 symbol information generating utility. Refer section "3.6.1 Creating symbol information (rel88)" more information rel88 operations. EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES 3.4.3 Module allocation information indicated example section definition mentioned earlier, section definitions command lines that specify files handed over link88 through input redirect function. number modules limited link simple, indicated example, will possible create file similar that indicated example directly input into link88. There will need conscious about memory efficiency when increasing number modules. CODE section limited bytes DATA section limited bytes. Thus, will necessary allocate each module that does exceed limit. will necessary give consideration combination modules each section upon allocation. Otherwise, there will more unused memory area thus, require unnecessary memory extension. name absolute object file specified link command parameter file will created same directory input file. PATH link88 set, then there need specify path before link88. Refer Section 3.4.2 link command parameter file. 3.4.4 Starting link88 <Operations link88> directory which relocatable object files (.o) linked link command parameter file (.lcm) including link88 command line created with editor existed current drive. Start-up link88 with next format. link88_<_link command parameter file name indicates space input. indicates return input. Regardless input redirect function, link command parameter file directly input command line. procedures will omitted since practical. Refer Part this manual more information formatting. Details flags that compose command line will also omitted. Refer Part this manual details flags. Example:Performing linking through link command parameter file (.lcm) C:\USER>c:\EPSON\link88 sample.lcm link command parameter file "sample.lcm" created USER subdirectory drive input redirect function start-up link88 perform linking. USER'S GUIDE EPSON I-27 PROGRAM DEVELOPMENT PROCEDURES 3.4.5 Batch processing linking (lk88.bat) Relocatable object files (create each module) .lcm Link command parameter file link88* Created editor Execute link88 Link Absolute object file Execute hex88 Converts binary Program data file Execute rel88 Creates symbol information Symbol information reference file .ref Execute sym88 Creates symbolic table file Symbolic table file .ref Batch processing linking <lk88.bat> Fig. 3.4.5.1 lk88.bat processing flow with assembler, this package contains lk88.bat batch file linking. This batch file prepared that process procedures from linking creation program data file. (Details processing procedures after linking will noted later.) Figure 3.4.5.1 shows processing flow lk88.bat. <Input/output files> Input files Link command parameter file: file_name.lcm This command parameter file link88. indicates information reallocate relocatable object E0C88 memory space. Relocatable object file: file_name.o <Outline processing procedures> lk88.bat reads link command parameter file link88 executes linking operations. When absolute object file created using link88, will then rel88 symbol information generator. After reallocation operations complete symbolic table information file will created. After that, sym88 will executed generate symbolic table file that necessary symbolic debugging using ICE88. Then program data file will created with hex88 binary/HEX converter from absolute object file. This relocatable file machine language that output through relocatable assembly with cross assembler. Output files Absolute object file: file_name.a This multi-section object file created with linker. Program data file: file_name.sa This Motorola format ASCII record file consisting absolute object file that converted with binary/HEX converter. I-28 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Symbol information reference file: file_name.ref symbol information generator (rel88) This symbol information reference file absolute object file that reallocated physical address. Symbolic table file: file_name.sy This file contains symbol names address list information symbolic debugging. rel88 rel88 used (default) symbol information reference file (.ref) will created. rel88 used. +sec flag (information individual section) symbol information generator (rel88) secf <Operation procedure> directory including relocatable object files (.o) linked current drive. command parameter file handed over link88 same directory. Start-up lk88 with next format. lk88 indicates return input. Example: C:\USER>c:\EPSON\lk88 +sec flag added rel88 (default) +sec flag added rel88 Note: This parameter will ignored when rel88 used. Note: There basically error checks made these parameter settings, therefore, parameter with settings other than those specified. <Customizing lk88.bat execution command> lk88.bat following command line upon execution program. Customize these command lines flag without default setting used. link88 link command parameter file "sample.lcm" created USER subdirectory drive start batch processing. Batch processing will create absolute object file (.a), symbol information reference file (.ref), program data file (.sa) symbolic table file (.sy) same directory input file. PATH lk88 set, then there need specify path before lk88. Customizing lk88.bat <Customizing ra88.bat execution parameters> Since lk88.bat controls program execution, execution parameter customization field within General parameters temporarily described default position. Always customize batch files according your development method since parameter will vary depending your application style. Parameter file name input %drv%link88<%parfn%.lcm rel88 (when +sec flag used) %drv%rel88 +sec %outfn%.a>%outfn%.ref rel88 (when +sec flag used) %drv%rel88 %outfn%.a>%outfn%.ref hex88 %drv%hex88 %outfn%.sa %outfn%.a sym88 %drv%sym88 %outfn%.ref %drv% path that locates execution command lk88.bat. this reason, altered neither statement that defined altered. same name customized parameter outfn name described link command parameter (.lcm). following indicates lk88.bat program source list message list lk88.bat. Refer upon customizing program. parfn file_name Link command parameter file name (.lcm) input link88 Output file name outfn file_name File name absolute object file program data file USER'S GUIDE EPSON I-29 PROGRAM DEVELOPMENT PROCEDURES lk88.bat program source list echo E0C88 Family Auto Link Execution Utility (Ver. X.XX) Copyright(C) SEIKO EPSON CORP. 1993-1996 customized parameter information parfn= input parameter file_name (file_name_lcm) link88.exe i.e. c8316xxx.lcm outfn= output file_name which written input parameter file_name i.e. c8316xxx rel=y rel88 absolute symbol generation rel88 secf=y show physical address module size with absolute symbolic table after link procedure show physical address module size just symbolic table after link procedure ********** customized parameter area (default) ********** caution customized parameters value check, therefore User customization field Note: There basically please carefully when error checks made ********** these parameter Name link command parameter file input parfn=sample settings, therefore, Name file output outfn=sample parameter rel88 with settings other rel=y than those specified. rel88 flag secf=y ********** command searching path ********** drv=c:\ path that locates execution command lk88.bat. root directory default. Customize necessary. main program want another option(s), please append option flag(s) command line :start echo E0C88 Family Auto Link Execution Utility Ver. X.XX echo Copyright SEIKO EPSON CORP. 1993-1996 :error_chk :chk00 exist %drv%nul goto exit05 exist %parfn%.lcm goto exit06 exist exist exist exist %drv%link88.exe goto exit07 %drv%rel88.exe goto exit08 %drv%hex88.exe goto exit09 %drv%sym88.exe goto exit10 :link88 %drv%link88<%parfn%.lcm errorlevel goto exit01 (rel88 :rel88_01 %drv%rel88 option) "%rel%"=="n" goto hex88 "%secf%"=="y" goto rel88_02 %outfn%.a>%outfn%.ref errorlevel goto exit02 goto hex88 Start-up command link88 Start-up command rel88 +sec flag) I-30 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES (rel88 with option) :rel88_02 %drv%rel88 +sec %outfn%.a>%outfn%.ref errorlevel goto exit02 :hex88 %drv%hex88 %outfn%.sa %outfn%.a errorlevel goto exit03 :sym88 %drv%sym88 %outfn%.ref errorlevel goto exit04 goto Start-up command rel88 (with +sec flag) Start-up command hex88 Start-up command sym88 :exit01 echo Error stop %drv%link88.exe goto skip :exit02 echo Error stop %drv%rel88.exe goto skip :exit03 echo Error stop %drv%hex88.exe goto skip :exit04 echo Error stop %drv%sym88.exe goto skip :exit05 echo Cannot find %drv% installed E0C88 dev. tools directory goto skip :exit06 echo Cannot find %parfn% input parameter file goto skip :exit07 echo Cannot find %drv%link88.exe goto skip :exit08 echo Cannot find %drv%rel88.exe goto skip :exit09 echo Cannot find %drv%hex88.exe goto skip :exit10 echo Cannot find %drv%sym88.exe :end echo lk88.bat utility been successfully executed. :skip parfn= outfn= rel= secf= drv= Message list Start-up message E0C88 Family Auto Link Execution Utility Ver. X.XX Copyright SEIKO EPSON CORP. 1993-1996 USER'S GUIDE EPSON I-31 PROGRAM DEVELOPMENT PROCEDURES Message when terminated normally lk88.bat utility been successfully executed. Error message Error message Error stop [drive path name] link88.exe Error stop [drive path name] rel88.exe Error stop [drive path name] hex88.exe Error stop [drive path name] sym88.exe Cannot find [drive path name] installed E0C88 dev. tools directory Cannot find [file_name] input parameter file Cannot find [drive path name] link88.exe Cannot find [drive path name] rel88.exe Cannot find [drive path name] hex88.exe Cannot find [drive path name] sym88.exe Explanation Error occurred link88. Error occurred rel88. Error occurred hex88. Error occurred sym88. Cannot find [drive path] which E0C88 Family software tools installed. Cannot find input parameter file (.lcm) that used with lk88.bat. Cannot find link88. Cannot find rel88. Cannot find hex88. Cannot find sym88. Note: following operations will stopped when error occurs. <Precautions upon using batch file> Some messages displayed during batch processing automatically generated through MS-DOS/PC-DOS batch processing function command. this reason, placed under MS-DOS/PC-DOS control when error occurs thus force batch processing interrupted. When error occurs, following procedures automatically continue. However, controllable noted reason indicated above. execution parameters (user customization field) batch file basically locate parameter setting errors. Therefore, parameters other than specified. MS-DOS/PC-DOS environment variable will used execute batch file, therefore, size environment variable should allocated with much space possible using CONFIG.SYS. 3.4.6 Absolute object file absolute object file binary file created link88. name file name created will same that specified with flag. files come multi-section object format. This file composed object (machine language) code various reallocation information. 3.4.7 Execution example linking following shows examples lk88 execution. C:\USER>c:\EPSON\lk88 C:\USER>echo E0C88 Family Auto Link Execution Utility Ver. X.XX Copyright SEIKO EPSON CORP. 1993-1996 link88 Linker Version X.XX Copyright 1993 Advanced Data Controls, Corp. Licenced SEIKO EPSON CORP. lk88.bat utility been successfully executed. C:\USER> I-32 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Creating Program Data File This section will explain program data file they created using hex88 binary/HEX converter. Software used: hex88 Absolute object file 3.5.2 Creating program data file using hex88 following indicates direction creating program data file using hex88. directory which absolute object file (.a) presented current drive. Start-up hex88 with next format. hex88_[flag]_file name indicates space input. indicates return input. Execute hex88 Convertes binary Program data file following indicates flag employed during batch processing (lk88.bat) links. Flag <file name> Description Specify file name that output. (Specify ".sa" extension file output.) this flag omitted will processed standard output. System code setting filling unused program area fil88XXX. Program debugging using ICE88/EVA88. Creating mask data program. Fig. 3.5.1 Program data file generation flow 3.5.1 Program data file program data file ASCII file which binary object codes were converted data. Motorola format generally employed file format since E0C88 Family 16M-byte address space. (Refer section 3.5.3 more information.) This file will required mask program data debug program with ICE88 EVA88. When development undertaken modules according relocatable assembly, absolute object file created linker will converted into data through hex88 binary/HEX converter then create program data file. program data file created through such procedures will system codes according each model fill unused built-in area. This done with fil88XXX software tools according model comes with "E0C88XXX Development Tool" package. Example: Converting sample.a create program data file C:\USER>c:\EPSON\hex88 sample.sa sample.a "sample.sa" will created same directory input file inputting absolute object file "sample.a" created USER sub-directory drive converting into data format. PATH hex88 set, then there need specify path before hex88. batch file allow hex88 executed after linking. Refer section "3.4.5 Batch processing linking (lk88.bat)" more details such batch processing methods. USER'S GUIDE EPSON I-33 PROGRAM DEVELOPMENT PROCEDURES 3.5.3 Motorola format file Motorola format collection records composed fields like following. FIELD><COUNT><ADDR><DATA BYTES><CHECKSUM> <ADDR> Indicates address first data byte that line. <ADDR> field format 3-byte. units order increase address. This field generally includes 32-byte (maximum) data. <DATA BYTES> Data will allocated byte information will indicated hexadecimal pairs each pair will indicate 1-byte value. FIELD> <COUNT> Indicates format that line. "S2" will appear this field. Indicates total number bytes <ADDR>, <DATA BYTES> <CHECKSUM> hexadecimal form. <CHECKSUM> This complement total number bytes allocated that line (excluding field). Motorola format <ADDR> <COUNT> 32-byte FIELD> <DATA BYTES> <CHECKSUM> I-34 EPSON USER'S GUIDE PROGRAM DEVELOPMENT PROCEDURES Symbol Information 3.6.1 Creating symbol information (rel88) rel88 utility used create symbol information. will obtain symbol information from specified object file then create list. target object files relocatable object file created with asm88 absolute object file created with link88. Generally, this tool used purposes: checking symbol list after linking second generating file input sym88. rel88 outputs list accordance with standard output. following explains operations obtain symbol list absolute object file. following indicate list symbols that created. Correlation with flag rel88 (default) format 0x8000c 0x80b8d 0x8000C 0x80bcD 0x8059C 0x8045C 0x80baD 0x80b8D 0x8082C acia.o acia.o n_getch _buffer n_recept n_outch _ptlec _ptecr n_main rel88 format SECTION 0x008000 0x008000 0x008045 0x008059 0x008082 SECTION 0x0080b8 0x0080b8 0x0080ba 0x0080bc <rel88 operation procedure> When creating symbol list absolute object file directory which absolute object file (.a) presented current drive. Start-up rel88 with next format. rel88_[flag]_input file name_>_output file name indicates space input. indicates return input. acia.o n_getch n_outch n_recept n_main acia.o _ptecr _ptlec _buffer rel88 +sec format SECTION code address 0x008000 General flags Flag +sec Description Outputs start address size each section. Sorts sections contents according symbol value. size 0x000b8 SECTION data address 0x0080b8 size 0x00000 (For reference) format 0x000000 0x0000b8 0x0000bc 0x0000b8 0x0000ba 0x000000 0x000082 0x000045 0x000059 sec: sec: sec: sec: sec: sec: sec: sec: sec: acia.o acia.o _buffer _ptecr _ptlec n_getch n_main n_outch n_recept Refer following examples information flag effects. Refer Part this manual more details flag. Since rel88 output corresponds standard output, file will created according output redirect. Example: C:\USER>c:\EPSON\rel88 +sec sample.a sample.ref Inputs absolute object file "sample.a" created USER sub-director drive then creates symbol list file "sample.ref" same directory input file. PATH rel88 set, then there need specify path before rel88. format 0x000000 0x0000b8 0x000000 0x0000bc acia.o acia.o n_getch _buffer USER'S GUIDE EPSON I-35 PROGRAM DEVELOPMENT PROCEDURES 0x000059 0x000045 0x0000ba 0x0000b8 0x000082 n_recept n_outch _ptlec _ptecr n_main 3.6.2 Creating symbolic table file (sym88) sym88 symbolic table file generator converts symbol information reference (.ref) output from rel88 symbol information generator into information file that contains symbolic table symbolic debugging ICE88. format 0x000000 0x0000bc 0x000059 0x000045 0x0000ba 0x0000b8 0x000082 n_getch _buffer n_recept n_outch _ptlec _ptecr n_main <sym88 operation procedure> directory which symbol information reference file (.ref) presented current drive. Start-up sym88 with next format. sym88_input file name +dec format acia.o acia.o n_getch _buffer n_recept n_outch _ptlec _ptecr n_main indicates space input. indicates return input. Example: C:\USER>c:\EPSON\sym88 sample.ref Inputs symbol information reference file "sample.ref" created USER subdirector drive then creates symbolic table file "sample.sy" same directory input file. PATH sym88 set, then there need specify path before sym88. I-36 EPSON USER'S GUIDE E0C88 Family Structured Assembler Manual CREATING PROCEDURE ASSEMBLY SOURCE FILE Part explains details parts relative assembly source file creation such assembly source file format pseudo-instructions which structured preprocessor sap88 cross assembler asm88 included. CONTENTS Contents OUTLINE II-1 File Name .II-1 Source File Differences Depending sap88 asm88 .II-1 Macro Instructions .II-1 GENERAL FORMAT SOURCE FILE II-2 2.10 2.11 2.12 2.13 Symbol .II-3 Mnemonic .II-3 Operand .II-3 Comment II-3 Numerical Expression .II-3 Characters .II-4 ASCII Character II-4 Expressions .II-4 Operators .II-5 Instruction .II-6 Register Name .II-6 Addressing Mode .II-7 Example Mnemonic Notation .II-8 PSEUDO-INSTRUCTIONS II-9 View explanation .II-9 Section Setting Pseudo-Instructions II-10 Data Definition Pseudo-Instructions II-11 Symbol Definition Pseudo-Instructions II-15 Location Counter Control Pseudo-Instruction II-16 External Definition External Reference Pseudo-Instructions II-16 Source File Insertion Pseudo-Instruction [sap88 only] II-17 Assembly Termination Pseudo-Instruction II-17 Macro-Related Pseudo-Instructions [sap88 only] II-18 Conditional Assembly Pseudo-Instructions [sap88 only] II-24 3.10 Output List Control Pseudo-Instructions II-27 CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-i OUTLINE OUTLINE When develop program using assembly language, first create assembly source file using instructions pseudo-instructions included with cross assembler. assembly source file should created according contents rules explained hereafter, using EDLIN editor have. File Name explained Section Part this assembler separated into programs: structured preprocessor sap88 which expands macro instructions into format that assembled asm88, cross assembler asm88 which actually executes assembly. Files handled this series procedures assembly source file. However, since there some difference each file, extensions file names specified below. particularly, attention should paid when modifying source file ".ms" being input into asm88 directly. pseudo-instructions which incorporated cross assembler asm88 functions will cause error structured preprocessor sap88. pseudo-instructions explained later, details only structured preprocessor sap88 indicated [sap88 only] notes described. Take care when reading. Structured assembly source file: file_name.s This assembly source file which includes macro instructions, etc., input into structured preprocessor sap88. When create programs using assembler language, create assembly source files make file name with extension ".s". Macro Instructions Macro instruction allows user define virtual instructions with instruction sequences. structured preprocessor sap88 expands defined instructions into source format that assembled cross assembler asm88. following describes outline When using same statement block multiple parts program, previous define statement block with optional name, after this statement block called using defined name. defined statement block Macro. Describe macro name that been defined necessary parameters program, call macro. That part expanded contents statement block that have been defined macro structured preprocessor sap88, that point changing specified parameters also done. addition macro-definition macrocall, some pseudo-instructions related macro have been provided. details, Section 3.8. Assembly source file: file_name.ms This assembly source file which macro instructions have been expanded, generated from structured preprocessor sap88. structured preprocessor sap88 cross assembler asm88, files with other extensions input, generally above mentioned extension. Source File Differences Depending sap88 asm88 explained previous section, format file input cross assembler asm88 different from that structured preprocessor sap88 contents. statement (line) such macro instruction sap88 pseude-instruction, which used structured preprocessor sap88, cannot distinguished cross assembler asm88, will cause error. Consequently, when using macro instructions, sure expand format which input into cross assembler asm88, using structured preprocessor sap88. CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-1 GENERAL FORMAT SOURCE FILE GENERAL FORMAT SOURCE FILE Assembly source file composed statements (lines) such instruction set, pseudoinstructions which incorporated sap88 asm88, comments, completed pseudo-instruction (pseudo-instruction terminate assembly). (Statements described after pseudo-instruction, however, that part will assembled.) following explains asm88 fundamentally. (Functions permitted asm88 will cause error sap88.) Example source file subtitle public external code main: ;*** ix,[src_address] iy,[dst_address] hl,[counter] "assembly source file example (sample.s)" main src_address, dst_address, counter following explains general particulars such composition statement characters notation numerical values which used. Each source program statement should written using following format. Symbol field Example: start: flag: value: Mnemonic field Operand field Comment field 1000h init 080h initialize above sort format line, line normally termination, however, operand described over several lines. Symbol field: this field, describe symbol. colon must used following symbol except statement instruction. symbols properly accordance with following definition. Mnemonic field: Operand field: this fild, describe operation code pseudo-instruction. this field, describe operand constant each instruction, variable, defined symbol, symbol that indicates memory address, operational expression. semicolon beginning this field, describe comment following Comment field: Symbol (Colon must follow) (Constant definition instruction) II-2 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE GENERAL FORMAT SOURCE FILE Symbol Symbol name which specific value defined. following ways define symbol. Label symbol that beginning statement instructions data definition defined label. value that defined symbol address instruction data area. default setting, also permissible instruction written either capital letters small letters. When writing programs, better write them with standard method. However, when handling symbol name distinguish between capital letters small letters using flag, sure describe instruction register name small letters. Example: ;jump label register register Name defined using pseudoinstruction. value that defined symbol value <expression> that specified using pseudoinstruction. symbol definition accordance with following rules. Although symbol length restricted, maximum characters from front will distinguished symbol. case label, described from column, however, colon must used label. case name, must begin from column characters that used symbols follows: Alphabetic characters (A-Z, a-z), Arabic numerals (0-9), input symbol does matter whether capital letters small letters used. default setting, capital letters small letters distinguished, therefore symbols handled identically. However, when flag used, they distinguished. symbol cannot begin with number. Symbol names must begin with alphabetic character "_". Operand more operands placed accordance with content mnemonic field. These operands allocated parameter strings. They begin from blank character indicating termination mnemonic field, delimited comma with blank character semicolon. Comment Comments disregarded process assembly. comment begins with (semicolon) ends termination line (line feed code). Numerical Expression control frequently executed microcomputer built into equipment. this reason, asm88 sap88 handle binary, octal, hexadecimal decimal expressions radix numerical expression. radix recognized placement following characters after number. None: Binary Octal Hexadecimal Decimal used.) (These also written small letters.) Mnemonic instruction pseudo-instruction placed mnemonic field. These normally composed character-strings that with blank space.These discussed later. default setting asm88 sap88, capital letters small letters distinguished. such cases, even inputting following, they will considered correct same. Examples: byte BYTE bYtE numbers must begin with Arabic numerals (0-9). example, number "10" appear follows. 1010B: 12Q: 0AH: Decimal Binary Octal Hexadecimal distinguish from names hexadecimal numbers using letters must have front. number, name) II-3 CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON GENERAL FORMAT SOURCE FILE Characters sap88 asm88 have adopted notation that been normally called ASCII (American Standard Code Information Interchange) expression characters character strings. These descriptions escape sequences only permitted character strings. character string handled ASCII instruction, they also expressed sets characters enclosed single quotation marks. ASCII Character ASCII character code composed parts: bits data according characters parity check whether there error during transfer. ASCII character classified into following four types. Table 2.7.1 ASCII character code table Expressions Constants many points within programs, example, operands instruction parameters pseudo-instructions. Moreover, constants shown using expressions. cross assembler asm88 evaluates expressions make result value into constant. variable same size numbers used larger used expression evaluation during assembly. NOTE: When relocatable code made, address only used within expression which result will quantity that becomes relocatable constant. Consequently, following expressions used. label1 label2 ;When labels same program selection label1 <constant> label1 <constant> following expressions used because result will relocatable quantity constant. label1 label2 label1 label2 label1 <constant> label1 <constant> label1 <constant> label1 label2 label1 label2 label1 label2 <constant> label2 label1 label2 ;When labels different program selection Section asm88, notation characters handled character constant enclosing them with single quotation marks such 'A', 'X'. '\'' particularly used single quotation marks themselves. express character which displayed such control code, asm88 permits following notations control characters thought have particularly high usage frequency. '\a' '\n' '\r' '\t' '\b' '\e' '\i' '\o' Bell New-line Return Back space Escape Shift-in Shift-out (07H) (0AH) (0DH) (09H) (08H) (1BH) (0FH) (0EH) Since results become relocatable quantity, logic operations using relocatable address become errors during assembly. Expressions composed several terms linked binary operators (for example, evaluation, these expressions calculated with 16-bit precision. following terms used within expressions. Numbers Variables which have been defined user instructions, declared labels Location counters CREATING PROCEDURE ASSEMBLY SOURCE FILE notation, \nnn (nnn octal), also used. When this notation used, bell, example, written '\007'. II-4 EPSON GENERAL FORMAT SOURCE FILE When used operand instructions, address immediately preceding instruction applied. asm88 pass assembler values several variables which used program defined pass stage. When variables which values undefined appear within expressions during pass execution, assigned them. there variables which values still undefined pass execution, error results. Also, variables which were undefined when used expression pass used pass causes phase error. Consequently, should define values variables prior using them expression. Table 2.9.1b Unary operator Operator Function Calculates page value from physical address. This operator effective physical address. (Page Data) Example: a,#pod label ep,a Calculates logical address within page from physical address. This operator effective physical address. (Logical address Data) Example: ix,#lod label a,[ix] label: Operators asm88 accepts following operators. Table 2.9.1a Unary operator Operator Function Positive sign Example: a,#+25h Negative sign Example: b,#-13h Assigns values reversing each bit. Example: a,#~10h Assigns lower 8-bit value expression. Example: b,#low 1234h HIGH Assigns lower 8-bit value expression after expression value shifted 8-bit right. This same that return upper 8-bit 16-bit expression. Example: h,#high 1020h Calculates bank value from physical address. This operator effective physical address. (Bank Code) Example: a,#boc label nb,a Calculates logical address within logical space from physical address. This operator effective physical address. (Logical address Code) Example: hl,#loc label label: Table 2.9.1c Binary operator Operator Function Addition (32-bit signed integer) Example: [hl],#25h+10h Subtraction (32-bit signed integer) Example: a,#63h-03h Multiplication (32-bit signed integer) Example: l,#48h*5h Integer division (32-bit signed integer) Example: ba,#1256h/31h Remainder. Divides left operand right operand, returns remainder. Example: a,#0d7h%4fh Logical AND. Returns true both operands true. Returns false either operands false both operands false. Example: sp,#04a1h&2030h Logical Returns true either operand true both operands true. Example: ix,#3026h|1000h Exclusive Returns true operand true other false. Returns false both operands true false. Example: [iy],#44h^10h a<<b Shift left. Shifts (integer) bits left. Example: hl,#5000h<<3 a>>b Shift right. Shifts (integer) bits right Example: ba,#8130h>>10h CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-5 GENERAL FORMAT SOURCE FILE Priority operators expression evaluated from left right, however, operator with higher priority evaluated earlier than other operators immediately front behind there more continued operators equal priority, operators evaluated from left side. Every left parenthesis must have corresponding right parenthesis ")". following table shows priority operators. Table 2.9.2 Priority operators Operators (addition), (subtraction) BOC, LOC, POD, HIGH, LOW, Priority High 2.10 Instruction asm88 accepts each following instructions instruction set. E0C88 Family instruction list rete rets pack call carl push cars halt swap upck 2.11 Register Name register names indicated following have been reserved keywords asm88. Refer "E0C88 Core Manual" information respective register functions. Data register Data register register pair Data register Data register Index register Index register Index register Stack pointer Base register System condition flag Program counter code bank register Code bank register Expand page register expand page register expand page register register Operation rules BOC, LOC, unary operators, four operators BOC, peculiar E0C88, possesses original rules operation below. (physical address 0x7f8000) (physical address 0x7f8000) (physical address 0x7fff) 0x8000 else (physical address 0x7fff) 0x0000 (physical address 0xff0000) (physical address 0xffff) above, value indicates physical value possessed operand. During assembly, asm88 only generates special relocation information corresponding each operator actual address calculation done link88 during linking. II-6 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE GENERAL FORMAT SOURCE FILE 2.12 Addressing Mode E0C88 determines execution address according following types addressing modes. Table 2.12.1 List E0C88 addressing modes Addressing mode Immediate data addressing Register direct addressing Register indirect addressing Register indirect addressing with displacement Register indirect addressing with index register 8-bit absolute addressing 16-bit absolute addressing 8-bit indirect addressing 16-bit indirect addressing Signed 8-bit relative addressing Signed 16-bit relative addressing Implied register addressing Table 2.12.2 Notation rules operands Notation rule placed front numeric expressions symbols Register name written directly Index register enclosed brackets Index register displacement enclosed brackets Index register enclosed brackets "BR:" placed front numeric expressions enclosed brackets Numeric expressions symbols enclosed brackets Numeric expressions symbols enclosed brackets Numeric expressions symbols enclosed brackets Numeric expressions symbols written directly Numeric expressions symbols written directly None Refer "E0C88 Core Manual" details each addressing mode. notation rules operands corresponding these addressing modes follows. CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-7 GENERAL FORMAT SOURCE FILE 2.13 Example Mnemonic Notation examples mnemonic notation each addressing mode shown below. Addressing #mmnn 65535 [br:ll] [hhll] 65535 [ix+dd] [iy+dd] [sp+dd] -128 -128 [kk] qqrr -32768 32767 Constant eg.) a,#0ffh eg.) ba,#1000h eg.) b,[br:0ffh] eg.) 1,[1000h] eg.) [ix+10h],a Name name eg.) a,#name eg.) ba,#name eg.) b,[br:name] eg.) l,[name] eg.) [ix+name],a Label (default) label: address 00ffh eg.) a,#label eg.) ba,#label eg.) b,[br:label] eg.) l,[label] -Default definition -[br:low label] [lod label] eg.) br,#0ffh eg.) ep,#05h eg.) nb,#05h eg.) eg.) [10h] eg.) 1000h eg.) br,#name eg.) ep,#name eg.) nb,#name eg.) name eg.) [name] eg.) name eg.) br,#label eg.) ep,#label eg.) nb,#label eg.) label eg.) [label] eg.) label high label label label label [low label] label Meaning above mentioned default definitions follows: example, when "jrl label" been described, cross assembler asm88 judges "jrl label". label label program sequence long jumped logical address converted from physical address. error occurs when operand exceeding above mentioned addressing range been specified, when judged exceed programming, attention following points when using short branch long branch instruction. jrs(l) Jumps address distance (10+1)H from current address $+10H Jumps address distance from current address jrs(l) Except above, notations described "E0C88 Core Manual" used II-8 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE PSEUDO-INSTRUCTIONS PSEUDO-INSTRUCTIONS this chapter usage each type pseudo-instruction supported asm88 sap88 explained form classified function. format explained below been adopted each explanation permit reference time. View explanation explanation contents each pseudo-instruction have been configured following format. following symbols have been given special meanings. enclosed part indicated optional selection. This option placed repeatedly number times. When different parameters number different types adopted, among them that delimited this symbol must necessarily used parameter. Other symbols Commas ","s, brackets "]", parentheses input assembler sources. Name Name pseudo-instruction Function instruction Format Here instruction format described. format explained using notations according following rules. explanations respective terms used operand notations follows. <Expression> General expression composed symbols constants including operators <Numerical expression> Constant expression using numerical value expression (including name which been defined constant instruction) <Label> Symbols having definition within selfmodule that relocatable property <Name> Symbols defined instructions <Symbol> Name defined specific value <Character string> Character strings enclosed double quotation marks Functions Here operations instruction explained detail. Examples Here usage examples indicated. Several types written depending instruction. Related items Here instructions that function similar manner instructions that assist understanding indicated. Restriction Here restrictions provided. Also, causes errors that occur instruction (forgetting separator, example) explained. CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-9 PSEUDO-INSTRUCTIONS Section Setting Pseudo-Instructions section setting pseudo-instructions each section (code section data section) decides program area. section setting pseudo-instructions follows: CODE DATA Correspondence each pseudo-instruction, setting section, area used, contents described shown table below. Section name Area used Contents described Code section Data allocation that (CODE) necessary decide from power such program code, constant data, table. Data section Reservation data area that (DATA) does matter initial value undefined power such work area, stack area, flags, buffers. section setting pseudo-instruction cross assembler asm88 been defined assumption that code section should allocated into data section into RAM. aims that nonvolatile data such program codes constant data should assigned into RAM, since microcomputer built into equipment area that initial values become undefined. Therefore, when non-volatile data such program codes constant data described, must described within code section code section CODE pseudo-instruction. When volatile data such work area stack area described, must described within data section data section DATA pseudoinstruction. Name: Name: CODE.Definition program section Format: CODE Functions: This instruction used allocate program constants CODE section (ROM area). optional number CODE sections defined within module resumed during assembly. Since this instruction specifies section with same function DATA pseudo-instruction, sure specify which when assembly. When been specified, error message output. Example: Defines program constants code section. code trans: [iy],[ix] nz,trans 01h, 02h, 03h, 04h, DATA.Definition data section Format: DATA Functions: This instruction used reserve allocate data area DATA section (RAM area). optional number DATA sections defined within module resumed during assembly. Normally, data section definition performs only area reservation, output object result assembly. However, this section area. When using equipment with built microcomputer, attention that area undefined power initial values invalidated. Since this instruction specifies section with same function CODE pseudo-instruction, sure specify which when assembly data section. When been specified, error message output. Example: Reserves area flag buffer table data section. flag: buffer: data [256*8] Related items: DATA, Related items: CODE, II-10 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE PSEUDO-INSTRUCTIONS Data Definition Pseudo-Instructions Data definition pseudo-instruction pseudo-instruction define data stored into memory. data definition pseudo-instructions follows: Name: ASCII PARITY Reserve/constant setting byte unit data area Format <expression> {,<expression>}* Format <expression> (<numeric expression>) {,<expression> (<numeric expression>)}* Format [<numeric expression>] {,[<numeric expression>]}* Functions: This instruction used reserve byte unit data area constant. setting constants done according string numeric values delimited comma specification repeat number. parameters this instruction described over several lines, should take care that relocation information linking included. Further when this instruction used, should described within DATA (RAM) area when reserving data area, within CODE (ROM) area when setting constant. code generation rules each format follows. Format This format defines optional constant optional number object codes byte unit multiple expressions specified operand field. expression handled constant value byte when multiple specifications made, object codes generated order specification. Format This format repeat defines optional constant byte units sets repeat number <numeric expression> enclosed parentheses. Format This format reserves area number bytes that have been assigned <numeric expression> enclosed brackets. code generated within object this time Integer numeric constants, character constants symbols used expressions formats they must necessarily have absolute numeric attribute. value expression must also within range -128 255. When operation result outside above range, will made error value lower byte will made evaluation value. Each format premixed instruction. Examples: buffer: tratbl: [50] ;Reserves bytes area '8','9','A','B','C','D','E','F' ;Reserves bytes data constant '(64) ;Reserves bytes initializes character code space '*'(64) ;Reserves bytes constant xhrbuf: Related items: CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-11 PSEUDO-INSTRUCTIONS Name: Reserve/constant setting word unit data area Format <expression> {,<expression>}* Format <expression> (<numeric expression>) {,<expression> (<numeric expression>)}* Format [<numeric expression>] {,[<numeric expression>]}* Functions: This instruction used reserve word bytes) unit data area constant. setting constants done according string numeric values delimited comma specification repeat number. parameters this instruction described over several lines. Further when this instruction used, should described within DATA (RAM) area when reserving data area, within CODE (ROM) area when setting constant. code generation rules each format follows. Format This format defines optional constant optional number object codes word bytes) units multiple expressions specified operand field. expression handled long word constant value symbol value when multiple specifications made, object codes generated order specification. Format This format repeat defines optional constant word units sets repeat number <numeric expression> enclosed parentheses. Format This format reserves area number words that have been assigned <numeric expression> enclosed brackets. code generated within object this time Integer numeric constants, character constants symbols used expressions formats When expression relocatable quality, logical address location where concerned symbol been allocated rearranged during linking. value expression must also within range -32766 65535. When operation result outside above range, will made error value lower bytes will made evaluation value. Each format premixed instruction. Examples: array: [10] ;Reserves word size area external jmptbl: func1,func2,func3, func4,func5 func1,func2,func3,func4,func5 ;Jump table functions Related items: II-12 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE PSEUDO-INSTRUCTIONS Name: Reserve/constant setting long word unit data area Format <expression> {,<expression>}* Format <expression> (<numeric expression>) {,<expression> (<numeric expression>)}* Format [<numeric expression>] {,[<numeric expression>]}* Functions: This instruction used reserve long word bytes) unit data area constant. setting constants done according string numeric values delimited comma specification repeat number. parameters this instruction described over several lines. Further when this instruction used, should described within DATA (RAM) area when reserving data area, within CODE (ROM) area when setting constant. code generation rules each format follows. Format This format defines optional constant optional number object codes long word bytes) units multiple expressions specified operand field. expression handled long word constant value symbol value when multiple specifications made, object codes generated order specification. Format This format repeat defines optional constant long word units sets repeat number <numeric expression> enclosed parentheses. Format This format reserves area number long words that have been assigned <numeric expression> enclosed brackets. code generated within object this time Integer numeric constants, character constants symbols used expressions formats When expression relocatable quality, lower bits value rearranged valid value during linking. Each format premixed instruction. Examples: lubarr: lonum: [10] 13768 ;Reserves byte size areas ;Sets constant lonum with long word size integer Related items: CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-13 PSEUDO-INSTRUCTIONS Name: Name: ASCII.ASCII text storing memory Format: ASCII character expression character expression}* character expression character string character constant byte constant PARITY.Setting/resetting parity Format: PARITY Functions: alphabet that been adopted cross assembler asm88 ASCII character set. ASCII character data indicated with bits most significant shows parity. This optionally reset either always always using PARITY instruction. addition, total number made even. following parities specified <operand>. Sets parity (default) Sets parity such that within bits becomes PARITY EVEN such that within bits becomes even PARITY PARITY PARITY Related item: Table ASCII character <operand> Functions: This instruction used store ASCII character code memory. area reserved this instruction, ASCII text assigned parameter must stored memory. character string parameter decoded stored memory sequentially from low-order addresses. area size becomes number bytes decoded parameter. operand character string more characters enclosed double quotation marks. ASCII instruction stores character code each character character string memory, however, since information showing length termination character string output, character strings without limitation. Examples: ascii ascii ascii ascii ascii "E0C88 Family" "bell",'\a' "bell\07" "bell",'\07' 62h,65h,6ch,6ch,07h bell BELL code Other format example Other format example Other format example Related item: Table ASCII character II-14 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE PSEUDO-INSTRUCTIONS Symbol Definition Pseudo-Instructions Symbol definition pseudo-instruction pseudo-instruction define expression with name. symbol definition pseudo-instructions follows: Name: Name: EQU.Name value setting Format: <name> Functions: This instruction used define <expression> with <name>. value name that been defined this instruction changed later. EXTERNAL declared symbol placed right side equals sign. Length expression restricted, character hexadecimal number output assembly list. When more character hexadecimal number been defined, warning output. sap88, name defined used conditional expression statement that hereafter occurs, used parameter IFDEF/IFNDEF statements. [sap88 only] Examples: false true tablen ;Initialization TABFIN-TABSTA ;Calculation table length ;Defines character string indicating ASCII characters SET.Name value setting Format: <name> <expression> <expression> Functions: This instruction same instruction, intended, among others, improve maintenance assembler source code serves link <numeric expressions> with <names>. Unlike case instruction, name defined instruction redefined number times other values treated assembler variable. Among attributes cross-reference list, which output lists assembler, those defined variables take this symbol. right side equals sign must defined before this instruction. main object this instruction name conditional assemble macro variable serves valuable function structured preprocessor sap88. However, does have much application cross assembler asm88 itself, other than functioning permit redefining names. Length expression restricted, character hexadecimal number output assembly list. When more character hexadecimal number been defined, warning output. sap88, name defined used conditional expression statement that hereafter occurs, used parameter IFDEF/IFNDEF statements. [sap88 only] Examples: a,#abc a,#abc Related items: SET, IFC, IFDEF, IFNDEF, REPT Limitation: <name> description must begin from column. Related items: EQU, IFC, IFDEF, IFNDEF, REPT Limitation: <name> description must begin from column. CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-15 PSEUDO-INSTRUCTIONS Location Counter Control Pseudo-Instruction location counter control pseudo-instruction follows: External Definition External Reference Pseudo-Instructions External definition external reference pseudoinstructions pseudo-instructions define refer symbols which commonly used between modules. External reference pseudo-instruction .EXTERNAL External definition pseudo-instruction .PUBLIC Name: Name: ORG.Changing location counter value Format: Functions: This instruction used specify addresses where program been placed. <expression> must relative value from label within current program section. this time, attempt insert absolute address into program counter results error. Length expression defined digit hexadecimal number, error occurs digits more been defined. Examples: sizstk topstk: 200h ;The stack size bytes ;Reserves space stack topstk+sizstk EXTERNAL.Symbol external definition declaration Format: EXTERNAL Functions: EXTERNAL PUBLIC instructions used that same symbol will used between multiple modules. Declaration must done with EXTERNAL instruction reference symbols defined within self-module, rather defined within other modules. declaration made EXTERNAL, will simultaneously made PUBLIC well. Example: external sqrt carl sqrt <expression> <symbol> {,<symbol>}* Related item: PUBLIC Name: Related items: CODE, DATA PUBLIC.Global declaration symbol Format: PUBLIC Functions: When optional symbols used multiple modules, they declared with PUBLIC EXTERNAL instructions. PUBLIC used declaration symbols, such that there definition within self-module that permits reference from other modules. Example: public sqrt: etc. sqrt ;SQRT permits reference from other modules ;Routine that computes square root integer <symbol> {,<symbol>}* Related item: EXTERNAL II-16 EPSON CREATING PROCEDURE ASSEMBLY SOURCE FILE PSEUDO-INSTRUCTIONS Source File Insertion PseudoInstruction [sap88 only] Source file insertion pseudo-instruction pseudo-instruction read insert other files into optional location source file. Assembly Termination Pseudo-Instruction Assembly termination pseudo-instruction terminates each source program. INCLUDE This instruction only used structured preprocessor sap88. sap88 expands this instruction creates source file which specified file inserted. cross assembler asm88, this instruction cannot used will cause error used. Name: Name: INCLUDE.Another file insertion Format: INCLUDE Functions: This instruction reads specified file following INCLUDE statement. Including nested optional depths. Another file further included into file that already included. sap88 analyses this pseudo-instruction creates output file which specified file inserted. This pseudo-instruction transferred asm88 Examples: include include chargen.s utilsub ;Character generator ;General purpose subroutine group END.Assembly stop Format: Functions: This instruction used stop assembly. list portion following this instruction output, assembled. {<Label>} <file name> Limitation: This instruction only used structured preprocessor sap88. cross assembler asm88, cannot used will cause error used. CREATING PROCEDURE ASSEMBLY SOURCE FILE EPSON II-17 PSEUDO-INSTRUCTIONS Macro-Related PseudoInstructions [sap88 only] following pseudo-instructions related macro functions, they perform macro definition, macro deletion, repeat definition, like. Name: MACRO.Macro defini Other recent searchesROS-2432-119+ - ROS-2432-119+ ROS-2432-119+ Datasheet HFBR2412TCZ - HFBR2412TCZ HFBR2412TCZ Datasheet BSIM3V3 - BSIM3V3 BSIM3V3 Datasheet AD9222 - AD9222 AD9222 Datasheet 2SD2598 - 2SD2598 2SD2598 Datasheet 2N7272D - 2N7272D 2N7272D Datasheet 2N7272R - 2N7272R 2N7272R Datasheet 2N7272H - 2N7272H 2N7272H Datasheet
Privacy Policy | Disclaimer |