The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

AS6133 Ver.2.21 Later Assembler PC-9800 (MS-DOSBased) PC/AT(PC DO


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



User's Manual
AS6133 Ver.2.21 Later
Assembler PC-9800 (MS-DOSBased) PC/AT(PC DOSBased) Target Devices µPD6133 Series µPD6604 Series µPD63 Series µPD67 Series
Document U10115EJ3V0UM00 (3rd edition) Date Published August 2001 CP(K)
1999 1995 Printed Japan
[MEMO]
User's Manual U10115EJ3V0UM
MS-DOS, Windows, WindowsNT either registered trademarks trademarks Microsoft Corporation United States and/or other countries. PC/AT PC-DOS trademarks International Business Machines Corporation USA.
information this document current June, 2001. information subject change without notice. actual design-in, refer latest publications NEC's data sheets data books, etc., most up-to-date specifications semiconductor products. products and/or types available every country. Please check with sales representative availability additional information. part this document copied reproduced form means without prior written consent NEC. assumes responsibility errors that appear this document. does assume liability infringement patents, copyrights other intellectual property rights third parties arising from semiconductor products listed this document other liability arising from such products. license, express, implied otherwise, granted under patents, copyrights other intellectual property rights others. Descriptions circuits, software other related information this document provided illustrative purposes semiconductor product operation application examples. incorporation these circuits, software information design customer's equipment shall done under full responsibility customer. assumes responsibility losses incurred customers third parties arising from these circuits, software information. While endeavours enhance quality, reliability safety semiconductor products, customers agree acknowledge that possibility defects thereof cannot eliminated entirely. minimize risks damage property injury (including death) persons arising from defects semiconductor products, customers must incorporate sufficient safety measures their design, such redundancy, fire-containment, anti-failure features. semiconductor products classified into following three quality grades: "Standard", "Special" "Specific". "Specific" quality grade applies only semiconductor products developed based customer-designated "quality assurance program" specific application. recommended applications semiconductor product depend quality grade, indicated below. Customers must check quality grade each semiconductor product before using particular application. "Standard": Computers, office equipment, communications equipment, test measurement equipment, audio visual equipment, home electronic appliances, machine tools, personal electronic equipment industrial robots "Special": Transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster systems, anti-crime systems, safety equipment medical equipment (not specifically designed life support) "Specific": Aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life support systems medical equipment life support, etc. quality grade semiconductor products "Standard" unless otherwise expressly specified NEC's data sheets data books, etc. customers wish semiconductor products applications intended NEC, they must contact sales representative advance determine NEC's willingness support given application. (Note) "NEC" used this statement means Corporation also includes majority-owned subsidiaries. "NEC semiconductor products" means semiconductor product developed manufactured defined above).
User's Manual U10115EJ3V0UM
Regional Information
Some information contained this document vary from country country. Before using product your application, pIease contact office your country obtain list authorized representatives distributors. They will verify:
Device availability Ordering information Product release schedule Availability related technical literature Development environment specifications (for example, specifications third-party tools components, host computers, power plugs, supply voltages, forth) Network requirements
addition, trademarks, registered trademarks, export restrictions, other legal issues also vary from country country.
Electronics Inc. (U.S.)
Santa Clara, California Tel: 408-588-6000 800-366-9782 Fax: 408-588-6130 800-729-9288
Electronics (Germany) GmbH
Benelux Office Eindhoven, Netherlands Tel: 040-2445845 Fax: 040-2444580
Electronics Hong Kong Ltd.
Hong Kong Tel: 2886-9318 Fax: 2886-9022/9044
Electronics Hong Kong Ltd. Electronics (France) S.A.
Velizy-Villacoublay, France Tel: 01-3067-5800 Fax: 01-3067-5899 Seoul Branch Seoul, Korea Tel: 02-528-0303 Fax: 02-528-4411
Electronics (Germany) GmbH
Duesseldorf, Germany Tel: 0211-65 Fax: 0211-65
Electronics (France) S.A. Electronics (UK) Ltd.
Milton Keynes, Tel: 01908-691-133 Fax: 01908-670-290 Madrid Office Madrid, Spain Tel: 091-504-2787 Fax: 091-504-2860
Electronics Singapore Pte. Ltd.
Novena Square, Singapore Tel: 253-8311 Fax: 250-3583
Electronics Taiwan Ltd. Electronics Italiana s.r.l.
Milano, Italy Tel: 02-66 Fax: 02-66
Electronics (Germany) GmbH
Scandinavia Office Taeby, Sweden Tel: 08-63 Fax: 08-63
Taipei, Taiwan Tel: 02-2719-2377 Fax: 02-2719-5951
Brasil S.A.
Electron Devices Division Guarulhos-SP, Brasil Tel: 11-6462-6810 Fax: 11-6462-6829
J01.2
User's Manual U10115EJ3V0UM
Major Revisions This Edition
Page Throughout Description Deleting description "separate volume SM6133" "supplied with SM6133" because AS6133 assembler separated from SM6133 simulator Changing supported debugger from NEC's SM6133 simulator Naito Densei Machida Mfg's EB-6133 Adding target device PREFACE p.45 p.74 p.75 p.77 p.87 p.102 p.103 Changing description PC-9800 Series, PC/AT Compatibles, Assembler Adding description PART Pseudo Instructions Control Instructions Adding PART Supported Debugger Adding Install Adding Table Device Name That Described Supported Device Changing description [Example] 4.4.2 Starting assembler Adding description 5.4.1 Error check instructions exceeding allowable number bits Changing description 5.4.3 Check destination branch instruction (automatic check BANK0 BANK1) Adding description 5.4.5 Check input/output instructions nonexisting ports Adding APPENDIX CONSTRAINTS Adding APPENDIX REVISION HISTORY
p.104 p.112 p.113
mark
shows major revised points.
User's Manual U10115EJ3V0UM
PREFACE
AS6133 assembler supports under following 4-bit microcontrollers.
Series Name Supported Device
µPD6133 µPD6604 µPD63 µPD67
µPD6132, 6132A, 6133, 6134, 6135, 61P34B µPD6603, 6604, 6605, 66P04B µPD62, 62A, 63A, 64A, 6P4B, µPD67,
AS6133 assembler runs under following environment:
PC-9800 Series Supported PC-9800 series MS-DOS Ver.5.0 later Windows
Note
3.1/95/98
Note
WindowsNT
Note
Notes Versions 5.00 5.00A feature task swap function. However, this software does support this function. used with MS-DOS prompt (Windows 3.1/95/98) command prompt (WindowsNT). AS6133 assembler runs MS-DOS NEC's PC-9800 series Windows, Windows PC-9800 series supplied Microsoft. will liable unsatisfactory operation this assembler under another commercially available version MS-DOS Windows. CONFIG.SYS file must contain following settings: files more) buffers more)
User's Manual U10115EJ3V0UM
PC/AT Compatibles Supported PC/AT compatibles PC/AT compatible personal computers which following runs: Supported PC/AT compatible MS-DOS Ver.6.0 later Ver.6.1 later Windows 3.1/95/98 WindowsNT
Note Note Note Note
Notes Versions feature task swap function. However, this software does support this function. used with MS-DOS prompt (Windows 3.1/95/98) command prompt (WindowsNT). AS6133 assembler runs MS-DOS Windows PC/AT compatibles supplied Microsoft, PC/AT compatibles supplied Japan. will liable unsatisfactory operation this assembler under another commercially available version MS-DOS, Windows, DOS.
Supply Media
Assembler File name AS6133.EXE Floppy disk types PC-9800 series: High-density 3.5-inch floppy disk (3.5" 2HD) PC/AT compatibles: High-density 3.5-inch floppy disk (3.5" 2HD)
Symbols Used This Manual
preceding option repeated number times. options enclosed parentheses omitted. Only options braces must selected. single-byte space TAB. Used enclose character character string. Carriage return Line feed Horizontal Represents character string. Represents character string. Represents character string. Indicates corresponding contents. Represents data equivalent enclosed item.
User's Manual U10115EJ3V0UM
File Naming Rules
[drive-name:] [\directory-name\.] file-name [.extension]
drive-name: Drive which floppy disk containing file mounted. Omitting drive name causes current drive assumed. file-name: extension: String eight single-byte four double-byte characters. String three single-byte characters.
User's Manual U10115EJ3V0UM
CONTENTS
PART LANGUAGE CHAPTER OVERVIEW.15 Overview Assembler
1.1.1 What assembler?.15 1.1.2 What absolute assembler? 1.1.3 What relocatable assembler? 1.1.4 Flow system development using µPD6133 Series 1.1.5 Comparison assemblers.19
Functional Overview µPD6133 Series Assembler
1.2.1 Creating sequence file.19 1.2.2 Creating source module files.19 1.2.3 Supported Japanese code 1.2.4 External module definition reference function 1.2.5 Assembly.22
Before Starting Program Development.24
1.3.1 Restrictions symbols 1.3.2 Restrictions pseudo instructions.24 1.3.3 Notes using Japanese code 1.3.4 Setting date time host machine 1.3.5 Restrictions number source modules
CHAPTER CODING SOURCE PROGRAMS.26 Basic Configuration Source Program Configuration Statement.26 Tabulation Function.27 Character Sets.28
2.4.1 Alphanumeric characters.28 2.4.2 Digits 2.4.3 Special characters.29
Symbol Field.30
2.5.1 Rules governing writing symbols
Mnemonic Field Operand Field
2.7.1 Operand field entry types
Comment Field Expressions Operators
2.9.1 Expressions.36 2.9.2 Overview operators 2.9.3 Arithmetic operators 2.9.4 Logical operators.38 2.9.5 Comparison operators.39 2.9.6 Shift operators.40 2.9.7 Other operators
User's Manual U10115EJ3V0UM
CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS. Outline Pseudo Instructions Control Instructions. Pseudo Instructions. Control Instructions Pseudo Instructions Control Instructions. Macro Function.
3.5.1 Macro definition applicable range 3.5.2 Macro reference 3.5.3 Macro expansion
PART OPERATION CHAPTER PRODUCT OVERVIEW. Product Description Supported Debugger. System Configuration CHAPTER BEFORE EXECUTION Creating Backup File. Install CHAPTER SEQUENCE FILE Overview. Sequence File Format
3.2.1 Overall format. 3.2.2 Device name format 3.2.3 Assembly option format 3.2.4 Source file name format
Example Sequence File Description CHAPTER ASSEMBLER FUNCTIONS Overview. Assembly Input/Output Files. Assembler Functions.
4.3.1 Intermediate object module file output function 4.3.2 Linkage function 4.3.3 file output function. 4.3.4 Assembly time reduction function. 4.3.5 Assembly list file output function 4.3.6 Cross-reference list file output function
Assembler Start-Up Procedure
4.4.1 Input files needed when assembler starts 4.4.2 Starting assembler. 4.4.3 Aborting assembly
Assembly Options.
4.5.1 Option control EB-6133 emulator information output. 4.5.2 Option control object file output 4.5.3 Option control load module file (PRO file) output
User's Manual U10115EJ3V0UM
4.5.4 Option control assembly list file output 4.5.5 Option control cross-reference list file output 4.5.6 Option control number lines output list output page (ROW NO.) 4.5.7 Option control number columns output list output line 4.5.8 Option control option information output.95 4.5.9 control option 4.5.10 Form feed control option 4.5.11 Option control assembly-time variables.96 4.5.12 Option control work drive.97 4.5.13 Option control list header output 4.5.14 Help message display
CHAPTER ASSEMBLY OUTPUT LISTS.99 Types Assembly Output Lists Controlling Each List Output Format.100 Header Output .101 Assembler's Check Functions.102
5.4.1 Error check instructions exceeding allowable number bits.102 5.4.2 Check prevent program crash .102 5.4.3 Check destination branch instruction (automatic check BANK0 BANK1) .103 5.4.4 Check output input-only port .104 5.4.5 Check input/output instructions nonexisting ports.104
CHAPTER ERROR MESSAGES .105 Errors Detected Start-Up Time.105 APPENDIX CONSTRAINTS .112 APPENDIX REVISION HISTORY .113
User's Manual U10115EJ3V0UM
LIST FIGURES
Figure
Title PART LANGUAGE
Page
System Development Flow.17 Software Development Flow Creating Source Module Files Creating Object Files.23 PART OPERATION
Processing Flow Assembly Time Reduction Function.83 AS6133 Input/Output File Configuration.85
User's Manual U10115EJ3V0UM
LIST TABLES
Table
Title PART LANGUAGE
Page
Comparison Assemblers Pseudo Instructions Which Nested Maximum Nesting Levels Operator Priorities.36 Pseudo Instructions Control Instructions.45 PART OPERATION
Device Name That Described Supported Device Assembly Options Output Lists.99
User's Manual U10115EJ3V0UM
PART LANGUAGE
User's Manual U10115EJ3V0UM
CHAPTER OVERVIEW
Overview Assembler
1.1.1 What assembler? microcontroller only interpret so-called machine language, which consists entirely Machine language very complicated humans understand essentially impossible remember. assigning symbolic (assembly) language instructions machine language instructions, however, programs coded such that humans more easily understand them. assembler program which translates this "humanfriendly" symbolic language, into machine language microcontroller.
Processing
A,MEM1 SCAF Processing Assembler
1111111011100010 1111111011110011 1111101011110011 1110110111110001
Assembly language (Symbolic language)
Machine language
Assemblers classified absolute assemblers relocatable assemblers. AS6133 absolute assembler. Unlike conventional absolute assemblers, however, allows split programming. Thus, although actually absolute assembler, AS6133 said have characteristics similar those relocatable assembler. 1.1.2 What absolute assembler? machine language instruction consists instruction data. instruction specifies operation performed microcontroller. Data value(s) which that operation performed. Data include constants variables used perform arithmetic instruction. absolute assembler makes addresses assigned instructions data absolute upon translating them into machine language. This means that addresses data must determined before program assembled. information passed assembler location counter control pseudo instruction called "ORG". machine language code created absolute assembler stored memory executed microcontroller. machine language code thus created called absolute object module. other hand, source symbolic language code called source module.
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
1.1.3 What relocatable assembler? absolute object module created absolute assembler absolute data addresses. other hand, assembler which creates object module which relocated address memory called relocatable assembler. machine language code created relocatable assembler called relocatable object module. relocatable object module cannot directly executed program microcontroller. This because addresses data relative. program which translates relocatable object module such that executed microcontroller called linker. What linker? linker determines location more relocatable object modules created relocatable assembler, resolves address references, combines modules into one. also assigns absolute values those addresses data which relative values were assigned. combination modules produced linker called load module. This load module cannot directly executed microcontroller. microcontroller. 1.1.4 Flow system development using µPD6133 Series Figure shows flow system development using µPD6133 Series. Figure shows flow software development detail. must, therefore, translated into form that executed
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
Figure 1-1. System Development Flow
Product planning
System design
Finalization specifications
Hardware development
Software development
Logic design (circuit/mechanism design) Software design
Evaluation
development
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
Figure 1-2. Software Development Flow
Software development
Preparation program specifications
Programs equipment used (product names)
Preparation flowchart
Coding
Editor
Assembly
Assembler (AS6133)
Errors detected?
Debugging
EB-6133 emulator
System evaluation
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
1.1.5 Comparison assemblers Table lists features absolute relocatable assemblers. Table 1-1. Comparison Assemblers
Absolute Assembler Assembly method Batch assembly (AS6133 allows pseudo split assembly.) Relocatable Assembler Split assembly Link Relative Imposed linker.
Addresses assembly list Variable Restrictions operations performed variables operand part Local variable
Absolute None
Cannot defined. (Can defined AS6133.) Because batch assembly used, partially modifying source does reduce assembly time. (AS6133 realize reduction, however, because allows pseudo split assembly.)
defined.
Others
Address calculation necessary during debugging. Because split assembly supported, module-by-module programming more than person possible.
Functional Overview µPD6133 Series Assembler
1.2.1 Creating sequence file µPD6133 series assembler (AS6133) absolute assembler. Despite being absolute assembler, AS6133 supports module programming, features relocatable assembler. Unlike relocatable assembler packages, however, AS6133 does provide linker program. features linker are, however, supported. When programming source modules, sequence file which describes order which source module files linked necessary. sequence file also specifies device names assembly-time options, addition order which source module files linked. 1.2.2 Creating source module files When designing program, generally divided into several subprograms, according function. functional independence subprograms high, debugging each subprogram will easy. This enhances development efficiency will lead better maintainability future. subprogram unit coding also acts unit input assembler. unit input assembler called source module. Once coding source module been completed, editor write module file. created file called source module file. When source program split into source modules, order which source modules linked must written sequence file. Splitting into files using INCLUDE statements differs from above-mentioned splitting into source modules. More specifically, file specified INCLUDE pseudo instruction said part source module containing INCLUDE pseudo instruction.
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
1.2.3 Supported Japanese code AS6133 assemble source programs written Japanese code (8-bit code shift code). Japanese code used only comment fields also symbol fields. 1.2.4 External module definition reference function PUBLIC EXTRN pseudo instructions used reference symbols defined external modules. symbol which PUBLIC declared referenced with EXTRN declaration time. symbols defined backward modules referenced assembly time while those defined forward modules referenced link time.
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
Figure 1-3. Creating Source Module Files
Source program
Source module SUB.ASM
Source module
Source module
INCLUDE 'SUB.ASM'
Source module
Source module
Writing files (using editor)
Source module files
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
1.2.5 Assembly assemble source module, following files necessary: Assembler (AS6133.EXE) Source module file Sequence file .ASM, etc.) .SEQ)
When starting AS6133, output list controlled directly from console specifying assembly options sequence file. errors found assembly list, modify source modules repeat assembly until errors have been removed. source program consists modules, AS6133 creates intermediate object module files (.OBJ) assembly. These intermediate object module files used when source program partially modified re-assembled. reduce assembly time, AS6133 re-assembles modified source modules only, using already created intermediate object module files those source modules that have been modified. check whether source module been modified, assembler compares creation date time source module file with that intermediate object module file having same name. source module file found newer, judged have been modified. therefore, intermediate object module file corresponding source module file found, source module file older, assembler automatically detects this creates intermediate object module file assembly. assembly time reduction function reduce assembly time considerably user proceeds with debugging.
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
Figure 1-4. Creating Object Files
Source module files
Assembly (AS6133)
Intermediate object module files (.OBJ)
List file Assembly list (.PRN) Cross-reference (.XRF) Object files (.PRO)
Errors detected?
Modification source module files
Modified source module files
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
Before Starting Program Development
This section explains those items with which user must familiar enable efficient AS6133. subsequent sections provide detailed explanation above. 1.3.1 Restrictions symbols Restrictions number symbols Each source module symbol table area With AS6133, symbol defined using characters (one byte character). maximum number symbols that used follows: symbols characters long. 3,368 symbols eight characters long. Note Double-byte characters (shift codes) consist bytes each. Symbols macro Those symbols which declared being global handled local symbols. 1.3.2 Restrictions pseudo instructions MACRO, REPT, statements nested levels deep. When expanding pseudo instructions pseudo instruction, care must exercised prevent nesting level from exceeding macro, macro name references made macro definitions cannot created. Table 1-2. Pseudo Instructions Which Nested Maximum Nesting Levels
Pseudo Instruction Which Nested REPT-EXITR-ENDR IF-ELSE-ENDIF MACRO-ENDM INCLUDE Maximum Nesting Levels 8Note Total
Note
Note INCLUDE statement nested independently above pseudo instructions. 1.3.3 Notes using Japanese code source list created using Japanese editor. available character codes 8-bit (single-byte) codes shift (double-byte) codes. Reserved words must written using single-byte codes. double-byte space, colon, semicolon must used delimit symbol, mnemonic, operand fields. single-byte double-byte codes characters different. example, when space coded using double-byte code, handled blank, delimiter.
User's Manual U10115EJ3V0UM
PART CHAPTER OVERVIEW
1.3.4 Setting date time host machine Always check current date time when starting MS-DOS host machine (PC-9800 series). assembly time, AS6133 compares creation dates times source module files with those intermediate object module files having same names. result this comparison, intermediate object module file found newer, corresponding source module assembled. time indicated clock host machine subsequent creation date time source module file, changes made source module file take effect after assembly. 1.3.5 Restrictions number source modules AS6133 assemble source program consisting modules. source modules handled single source program describing assembly order sequence file (.SEQ).
User's Manual U10115EJ3V0UM
CHAPTER CODING SOURCE PROGRAMS
Basic Configuration Source Program
source program consists more source modules, shown Figure 1-3. Each source module consists more statements. configuration statement shown Section 2.2. restrictions imposed size source module. This means that number statements written. source program consist source modules. source program, instructions, pseudo instructions, control instructions written location. pseudo instruction, however, written only each source module. pseudo instruction need written include file read into source module INCLUDE pseudo instruction source module.
Configuration Statement
source program assembler language consists statements. statement written using characters listed Section 2.4. When creating source program using text editor, each statement terminated with (carriage return) code (line feed) code. assembler regards code being statement terminator, ignores code. statement consists four fields: symbol, mnemonic, operand, comment, shown below. Each field must delimited with single-byte space (8-bit code 20H), code (09H), single-byte colon (3AH), single-byte semicolon (3BH). characters written line. format statement arbitrary. symbol, mnemonic, operand, comment fields start columns provided that they appear this order. statement containing only symbol comment field, well empty statement also written. Symbol field Mnemonic field Operand field Comment field
enter symbol symbol field, single-byte colon blank (one more single-byte spaces code) delimiter. Whether colon blank should used depends instruction written mnemonic field. When operand field necessary, blank delimiter. When comment written comment field, single-byte semicolon delimiter. number blanks inserted before after colon semicolon. Example colon used delimit symbol mnemonic fields. Example blank used.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
[Example A,#8H A=8H
[Example
Tabulation Function
AS6133 provides tabulation function improve readability assembly listing. tabulation function rearranges symbol, mnemonic, operand, comment fields source program that they each begin column that multiple eight. [Example] Addition: A,#8H R01,A
;R01=8H
Columns that multiples eight (column numbers equal number, multiplied eight)
tabulation function, insert (Horizontal TAB, 09H) code source program before each mnemonic operand fields before single-byte semicolon indicating start comment field. Symbol "TAB" Mnemonic "TAB" Operand "TAB" Comment
AS6133 supports assembly option which allows user select whether code (09H) should sent printer replaced single-byte spaces, depending printer being used. This option provided support printers which cannot recognize codes. this way, AS6133 allows user specify that code should converted single-byte spaces before being sent printer. Remark recommended that code used make effective disk.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Character Sets
8-bit code shift code must used write statements. Restrictions imposed characters that used symbols. however, case sensitive. [Example details, Section 2.5.1. Reserved words used either single-byte alphabetic upper lower cases. Symbols defined user,
regarded being different symbols.
[Example MEM1,#1 mem1,#3 MEM1 mem1 different symbols. MEM1 mem1 reserved word MOV, however, interpreted being identical Mov.
2.4.1 Alphanumeric characters Single-byte alphabetic characters arabic numerals collectively referred alphanumeric characters. 2.4.2 Digits Binary digits: Octal digits: Decimal digits: digits referred binary digits. eight digits referred octal digits. digits referred decimal digits. digits.
Hexadecimal digits: sixteen digits referred hexadecimal
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
2.4.3 Special characters following special characters single-byte characters. equivalent double-byte characters cannot used special characters; they interpreted These special characters (except code) used represent their normal meanings character strings (character constants) comment fields. Single-byte character Space code code code Ampersand Expression operator Horizontal Line feed Carriage return Question mark Unit price symbol Underscore Comma Period Plus Minus Asterisk Slash Opening parenthesis Closing parenthesis Dollar sign Equal sign Semicolon Double semicolon Colon Quotation mark Name Field delimiter Equivalent alphabetic character. Specifies indirect addressing. Equivalent alphabetic character. Operand delimiter segment operator Plus sign addition operator Minus sign subtraction operator Multiplication operator Division operator Change operation order. Value location counter Comparison operator Indicates start comment. Indicates start comment macro. Label delimiter Indicates start character constant. Comparison operators Specifies immediate data. Specifies concatenation character strings macro. Used immediately before macro parameter indicate transfer value. Equivalent eight spaces. Statement terminator Normally ignored assembler. Main
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Symbol Field
When data address used instruction pseudo instruction written using numeric value numeric expression, AS6133 recognizes this being error. data address, name which enables easy recognition. name assigned data address called symbol. symbol entered symbol field. This referred defining symbol. symbol used program appear anywhere program provided that declared before use. scope symbol depends where declared. Symbols having same name cannot used module. They can, however, used different modules because symbols basically used locally within module. symbol globally more than module, symbol must declared being public. Symbols classified labels names according their purpose they defined. Names symbols defined pseudo instructions called names. Numeric data addresses assigned names. These names used program instead numeric data addresses. Thus, numeric data used indirectly assigning name. [Example] DATA1 name DATA1 defined numeric data
Labels Labels symbols which assigned address instruction (mnemonic) ORG, pseudo instruction. label used reference program memory address (value location counter) assigned instruction pseudo instruction which label assigned. Thus, label written address routine, with name indicating processing routine, thus causing branch from another routine routine reference routine. [Example] LOOP:MOV A,@R0H
LOOP
this example, LOOP label.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
2.5.1 Rules governing writing symbols following rules applied writing symbols: Symbols 8-bit codes shift codes other than single-byte special characters (except underscore question mark). symbol cannot begin with single-byte digit. symbol between characters length (for single-byte characters). symbol exceeds characters length, error (syntax) error occurs. Each shift code character consists bytes. label must terminated with single-byte colon (3AH). single-byte space code inserted between label colon.) When using EQU, SET, MACRO pseudo instruction, name must entered symbol field. name must terminated with single-byte space code. symbol cannot defined more than once. Otherwise, error (symbol duplication error) occurs. This does apply symbols declared being global. declared public, symbols having identical names used different modules; system regards them being different symbols. Reserved words cannot defined symbols. possible define symbols containing reserved words. Symbols case-sensitive. [Example Valid FIF4: LABEL: HERE: ANH: ENDX: [Example Invalid 1F4F:.Begins with digit. LABEL .Does with colon (for label). RE:.A blank embedded symbol. ANL:.Instructions cannot used symbols. END:.Pseudo instructions cannot used symbols.
Note
defined pseudo instruction those defined macros that
same data assigned both XYZ. Note value symbol defined pseudo instruction changed. change value, pseudo instruction.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Mnemonic Field
Enter instruction, pseudo instruction, control instruction mnemonic field. instruction requiring operand, blank (one more single-byte spaces code) required delimit mnemonic field from operand field. [Example] Valid LOOP SCAF Invalid JMPLOOP. blank inserted between mnemonic operand fields. blank inserted mnemonic field. instruction supported µPD6133.
Operand Field
operand field, enter data (operand) necessary execute instruction. Some instructions require operands while others require operands. When operands required, delimit operands with comma ",". blank required between mnemonic operand fields. 2.7.1 Operand field entry types Constant Constants include numeric constants that consist digits, character constants that consist characters. Numeric constants include binary, octal, decimal hexadecimal constants, consisting single-byte digits. Binary constant single-byte character must added binary string. Octal constant single-byte must added octal string. Decimal constant single-byte must added decimal string. omitted. Hexadecimal constant single-byte must added hexadecimal string. constant begins with singlebyte character other than must added beginning constant.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Character constant character constant string 8-bit character codes (except code) shift character codes, enclosed single-byte quotation marks ('). With AS6133, character constants used TITLE INCLUDE pseudo instructions only. result assembly, characters enclosed single-byte quotation marks converted 8-bit shift codes. single-byte quotation mark character constant, must enclosed quotation marks. operations performed character constants. [Example] (Single byte) 8260H (Double byte) '''' (Single byte) When quotation marks written, single-byte quotation mark reserved constant. 'A''' 4127H (Single byte) (Single-byte space) 203CH 93FAH 93FA967B93648B43H
(location counter) indicates value location counter. other words, indicates program memory address instruction which used. [Example] Address LOOP: A,R11 $+20H
"JNC $-1" indicates address 103H. Consequently, indicates address 102H. "JMP $+20H" indicates address 105H. "JNC $-1" equivalent "JNC LOOP" where LOOP label.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Symbol When symbol entered operand field, value assigned symbol (label name) assumed operand value. [Example A,R10
[Example VALUE A,#VALUE
"MOV A,#VALUE" equivalent "MOV A,#1H". Expression expression (character numeric expression) consists constants, symbols that combined with operators. There seventeen operators MOD, NOT, AND, XOR, SHR, SHL, <=). priorities these operators predetermined. details, Section 2.9.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Comment Field
comment field begins with single-byte semicolon (;), followed comment itself. Comments assist programmer understanding program when refers assembly listing. While they displayed assembly listing, assembler ignores them. comment written 8-bit codes (except code) shift codes. When consecutive semicolons (;;) used macro definition, assembler handles comment comment within macro definition. does print comment during macro expansion. comment must terminated with code. comment long line, start next line with semicolon (;).
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
Expressions Operators
2.9.1 Expressions expression (character numeric expression) consists constants, symbols, operators operand field. 2.9.2 Overview operators Overview operators AS6133 assembly language divided into five types. priorities these operators predetermined. Arithmetic operators Logical operators AND, XOR, Comparison operators Shift operators Others (operation order specifiers) (replacement operator)
Operator priorities priorities operators predetermined listed table. Enclosing operator allows order which operations performed changed. When multiple operators having same priority exist single expression, they executed order, from left right. table below, highest priority indicated Table 2-1. Operator Priorities
Priority Operators (Operation order specifiers) MOD, SHL,
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
2.9.3 Arithmetic operators Addition operator Adds operands together. [Example] Address 0010 Symbol START: Mnemonic Operand
instruction causes jump address 16H. Subtraction operator Subtracts operand from another. [Example] Address 0020 Symbol BACK: Mnemonic Operand BACK-6
instruction causes jump address 1AH. Multiplication operator Multiplies operands. [Example] Address Symbol Mnemonic Operand A,#(2*3)
instruction causes (2*3) loaded into Acc. Division operator Divides operand another. remainder, any, truncated. [Example] Address Symbol Mnemonic Operand A,#(256/50)
instruction causes (256/50) loaded into Acc. operator Finds remainder resulting from operand division. [Example] Address Symbol Mnemonic Operand A,#MOD
instruction causes (remainder division 256/50) loaded into Acc.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
2.9.4 Logical operators operator Finds operands. [Example] Address Symbol MDFY1: Mnemonic Operand A,#(0AH
instruction causes loaded into Acc. operator Finds operands. [Example] Address Symbol MASK: Mnemonic Operand A,#(1AH 0FH)
instruction causes loaded into Acc. operator Finds exclusive operands. [Example] Address Symbol MDFY2: Mnemonic Operand A,#(9AH 9DH)
instruction causes loaded into Acc. operator Finds complement value operand. [Example] Address Symbol COMPL: Mnemonic Operand A,#(NOT 0FH)
instruction causes (when 0FFFCH, 0FH) loaded into Acc.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
2.9.5 Comparison operators (EQual) operator Returns 0FFFFH values right left sides equal; otherwise, returns "EQ" replaced "=". [Example] Address Symbol COMP1: Mnemonic Operand A,#(ONE
instruction causes loaded into other than (Not Equal) operator Returns 0FFFFH value left side equal that right side; otherwise, returns "NE" replaced "<>". [Example] Address Symbol COMP2: Mnemonic Operand A,#(ONE
instruction causes loaded into loads (Less Than) operator Returns 0FFFFH value left side less than that right side; otherwise, returns "LT" replaced "<". [Example] Address Symbol COMP3: Mnemonic Operand A,#(MINI
instruction causes loaded into MINI less than MINI equal greater than (Less Than Equal) operator Returns 0FFFFH value left side equal less than that right side; otherwise, returns "LE" replaced "<=". [Example] Address Symbol COMP4: Mnemonic Operand A,#(MINI
instruction causes loaded into MINI equal less than MINI greater than
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
(Greater Than) operator Returns 0FFFFH value left side greater than that right side; otherwise, returns "GT" replaced ">". [Example] Address Symbol COMP5: Mnemonic Operand A,#(MAX
instruction causes loaded into greater than equal less than (Greater Than Equal) operator Returns 0FFFFH value left side equal greater than that right side; otherwise, returns "GE" replaced ">=". [Example] Address Symbol COMP6: Mnemonic Operand A,#(MAX
instruction causes loaded into equal greater than less than 2.9.6 Shift operators (Shift Right) operator Shifts value left side right value right side. result shift, [Example] Address 01FA Symbol FIELD: Mnemonic Operand A,#($
(address: 01FAH) shifted right five bits. result, loaded into Acc. (Shift Left) operator Shifts value left side left value right side. result shift, [Example] Address 0021 Symbol FLY: Mnemonic Operand
(address: 0021H) shifted left bits. result, control jumps address 0084H.
User's Manual U10115EJ3V0UM
PART CHAPTER CODING SOURCE PROGRAMS
2.9.7 Other operators (operation order specifiers) Indicate that operation(s) enclosed within parentheses should performed first, irrespective operator priorities. parentheses nested levels. [Example] 5+8-6*2/4 5+(8-6)*2/4 (5+8-6)*2/4 2*(0FH-(0BH (0AH 0FH))) 2*0FH-0BH (replacement) operator Used macro definition statement concatenate characters sides during macro expansion. itself replaced with NULL code. [Example] MOVI MACRO A,#&X ENDM MOVI A,#1
User's Manual U10115EJ3V0UM
CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Outline Pseudo Instructions Control Instructions
basic function assembler convert instructions into machine language. Pseudo instructions control instructions provided enhance assembler's ease use, well readability output listings. Pseudo instructions control instructions converted machine language. Instead, they used direct operation assembler. exception this, however, built-in macro pseudo instructions which converted machine language.
Pseudo Instructions
AS6133 mnemonic field contain pseudo instruction. Location counter control pseudo instruction Symbol definition pseudo instruction Symbol definition pseudo instructions used define arbitrary numeric, data memory address, flag, label. Values assigned symbol definition pseudo instructions cannot changed. However, symbol that already been defined pseudo instruction changed using another pseudo instruction. Therefore, pseudo instruction used define variable that significant only assembly time. External definition external reference pseudo instructions External definition external reference pseudo instructions define reference symbol that used more than module. PUBLIC-BELOW-ENDP (external definition pseudo instruction) EXTRN (external reference pseudo instruction) Data definition pseudo instruction Data definition pseudo instructions used define data table area. Defines 8-bit data. Defines 10-bit timer table data.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Conditional assembly pseudo instruction effective conditional assembly pseudo instruction enables efficient programming and, furthermore, allows library source programs created. IF-ELSE-ENDIF Repetitive pseudo instruction effective repetitive pseudo instruction enables efficient programming. REPT-(EXITR)-ENDR Macro definition pseudo instruction When particular routine used several times within single program, subroutine usually used save number program steps. When there several similar processing routines having different parameters, such that subroutine cannot applied, macro function used improve programming efficiency. macro definition pseudo instruction used define such macro. Section details. MACRO-ENDM Global declaration pseudo instruction symbols macro GLOBAL Assembly termination pseudo instruction assembly termination pseudo instruction indicates source (program) module. (10) Mask option specification pseudo instruction OPTION-ENDOP
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Control Instructions
With AS6133, mnemonic field contain control instruction. Control instructions converted machine language. Instead, they control output list format source input after assembly. Control instructions valid only within modules which they used. Output list control instructions Output list control instructions used enhance readability assembly listing. TITLE: Prints title assembly listing.
EJECT: Invokes page change. Source input control instruction When program (source module) file becomes overly large, such that programmer decides divide file, source input control instruction used. source input control instruction also used enable previously created program program library). INCLUDE file referenced using INCLUDE control instruction with relevant file name specified.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Pseudo Instructions Control Instructions
This section explains each pseudo instructions control instructions listed below. Table 3-1. Pseudo Instructions Control Instructions
Instruction Pseudo instructions PUBLIC-BELOW-ENDP EXTRN IF-ELSE-ENDIF REPT-(EXITR)-ENDR MACRO-ENDM GLOBAL OPTION-ENDOP USEPOC/NOUSEPOC USECAP/NOUSECAP Control instructions TITLE EJECT INCLUDE Source input control instruction Output list control instructions Conditional assembly pseudo instruction Repetitive pseudo instruction Macro definition pseudo instruction Global declaration pseudo instruction symbols macro Assembly termination pseudo instruction Mask option specification pseudo instruction External definition pseudo instruction External reference pseudo instruction Data definition pseudo instruction Name Location counter control pseudo instruction Symbol definition pseudo instruction Page p.46 p.47 p.48 p.49 p.51 p.52 p.53 p.54 p.55, p.56 p.57 p.59 p.60 p.61 p.62 p.63 p.64 p.65 p.66
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Symbol [label:] Mnemonic Operand <expression>
ORIGIN
Comment [;comment]
[Function] Sets value location counter. [Usage] pseudo instruction specifies start address program memory. instruction beginning each segment. pseudo instruction specifies start address table area. When this instruction specified, change made before table area address effect table area address. [Explanation] Before symbol used expression operand field, that symbol must have been defined. Unless address specified with pseudo instruction beginning program, assembler assigns address 0000 location counter. address value specified with pseudo instruction smaller than previous location counter value, error (address specification error) occurs. such error occurs, evaluation value coded operand ignored, with consecutive value next location counter value that existed immediately before instruction being assumed. previous location counter value assigned label added pseudo instruction. [Example] 015D 015E 0200 0200 200H A,#1 Code pseudo
STRT:
Label STRT assigned 15FH. operand pseudo instruction 200H, instruction assigned address 200H.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Symbol name Mnemonic Operand <expression>
EQUATE
Comment [;comment]
[Function] Assigns value expression specified operand name coded symbol field. [Usage] This instruction used define data memory address. [Explanation] Before symbol coded operand field, symbol must first defined. Delimit symbol field, mnemonic field, operand field with blank. symbol mnemonic field contains error, specified name registered. Accordingly, statement referencing that name becomes invalid. operand contains error, assigned name. name defined using pseudo instruction, redefinition within module which name defined possible. attempt made redefine name, error (duplicate symbol definition) occurs. When name defined using pseudo instruction, name referenced instruction prior definition only when name specified operand instruction. defined expression value converted µPD6133 code; value assigned [Example] P3_INIT P3_MOD P3_INIT P3,#P3_MOD
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Symbol name Mnemonic Operand <expression>
Comment [;comment]
[Function] Assigns value expression coded operand field name symbol field. operand field, memory name R1F, coded addition expression. [Usage] This instruction used formal parameter conditional assembly pseudo instruction (IF-ELSE-ENDIF) repetitive operation pseudo instructions (REPT-ENDR, EXITR). [Explanation] Delimit symbol field, mnemonic field, operand field with blank. symbol mnemonic field contains error, specified name registered. Accordingly, statement referencing that name becomes invalid. operand contains error, assigned name. name defined with pseudo instruction, different value redefined. value defined with pseudo instruction remains valid until next pseudo instruction encountered. When name defined using pseudo instruction, name referenced instruction prior definition only when name specified operand instruction. defined expression value converted µPD6133 code; value assigned [Example] IMMED A,#IMMED A,#IMMED
;IMMED=5
IMMED
;IMMED=6
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
PUBLIC BELOW ENDP
Format Symbol [label:] Mnemonic PUBLIC Operand
PUBLIC BELOW PUBLIC
PUBLIC BELOW ENDP
Comment [;comment]
<symbol-group>
Format Symbol [label:] [name Mnemonic PUBLIC ENDP Operand BELOW <expression (EQU-type)>] Comment [;comment] [;comment]
[Function] external definition pseudo instruction coded either formats. Format used declare that symbols coded operand field referenced other modules. Format used declare that symbols defined block enclosed between PUBLIC BELOW ENDP referenced other modules. [Usage] external definition pseudo instruction declares symbols being referenced other modules. [Explanation] external definition pseudo instruction coded anywhere within source program. When format used, symbols specified public declaration module must defined using symbol definition pseudo instruction within same module. symbol coded external definition pseudo instruction format defined same module, error (Undefined Symbol) occurs. format block enclosed between PUBLIC BELOW ENDP contains instruction other than symbol definition pseudo instructions, error (Syntax Error) occurs. Each statement terminated code. there many symbols line, declare PUBLIC again next line. ENDP corresponding PUBLIC BELOW missing, error ENDP Statement) occurs pseudo instruction. symbol declared PUBLIC referenced external module, warning (Unreference Symbol) occurs link time.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
PUBLIC BELOW ENDP
[Example] PUBLIC PUBLIC ENDP VAL1,VAL2
PUBLIC BELOW PUBLIC
PUBLIC BELOW ENDP
VAL1 VAL2
VAL3 VAL4
BELOW
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
EXTRN
Symbol [label:] Mnemonic EXTRN Operand
EXTERN
Comment [;comment]
EXTRN
<symbol-group>
[Function] Declares that symbols coded operand field (for which public declaration performed other modules) referenced module. [Usage] When symbols declared public symbols other modules needed module, EXTRN pseudo instruction used enable these symbols module. [Explanation] module, symbols declared with EXTRN pseudo instruction cannot referenced before EXTRN been specified. symbol which EXTRN declaration performed module defined same module, error (Symbol Multi Defined) occurs.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Symbol [label:] Mnemonic Operand
DEFINE WORD
Comment [;comment]
<expression>
[Function] Sets expression characters coded operand field location indicated current location counter value (program memory address) 8-bit object code. [Usage] This instruction used define 8-bit data table area. [Explanation] single expression that represented eight bits coded <expression>. value expression exceeds bits, error (invalid value) occurs. either warning message generated. this case, bits object code more than expression coded operand field, error (the number operands invalid) occurs. undefined symbol coded operand field, error (Undefined Symbol) occurs. expression coded operand field invalid, (E0E0H) generated object code. Caution instruction used reference table areas other than timer table area (MOV T,@R0). perform timer table area reference, instruction. [Example] LOC. OBJ. E2E0 E4E0 SOURCE STATEMENT 340H
;<1>
<1>, warning generated, value which bits object code.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Symbol [label:] Mnemonic Operand
DEFINE TIMER
Comment [;comment]
<expression>
[Function] Sets expression characters coded operand field location indicated current location counter value (program memory address), 10-bit object code. [Usage] This instruction used define timer data table area. [Explanation] single expression that represented using bits coded <expression>. value expression exceeds bits, error (invalid value) occurs. more than expression coded operand field, error (invalid number operands) occurs. undefined symbol coded operand field, error (Undefined Symbol) occurs. expression coded operand field invalid, (E0E0H) generated object code. Caution instruction causes object code conversion reference timer table area (MOV T,@R0). Therefore, never instruction ordinary table reference instruction. (For ordinary table reference instructions, instruction.) [Example] LOC. OBJ. F8F7 F1F7 SOURCE STATEMENT TIME DATA 21FH 05FH
;CARRY ;CARRY
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
ELSE ENDIF
Symbol [label:] [statement [statement ENDIF Mnemonic [ELSE] Operand <expression>
ELSE ENDIF
Comment [;comment] [;comment] [;comment]
ELSE ENDIF
[Function] value operand field statement other than (false), statements enclosed between ELSE assembled. statements between ELSE ENDIF assembled. evaluation value operand field statement (false), statements enclosed between ELSE assembled. statements between ELSE ENDIF assembled, however. [Usage] This instruction used arbitrary routine program select statements expanded according condition routine. [Explanation] statements between corresponding ENDIF defined IF-ENDIF block. ELSE optional. need specified. When ELSE specified, however, used only once IF-ENDIF block. ELSE specified more than once single IF-ENDIF block, error (syntax error) occurs second subsequent ELSEs. Before symbol coded operand field statement, symbol must first defined. levels nesting, including macro reference statements REPT statements, possible. ELSE ENDIF statements cannot have label. [Example] ZZZ0 HALT HALT ENDIF
ELSE #ZZZ0
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
REPT ENDR
Symbol [label:] [statement [statement ENDR Mnemonic REPT [EXITR] Operand
REPEAT REPEAT
Comment [;comment] [;comment] [;comment]
REPT ENDR
<expression (EQU-type)>
[Function] Expands statement enclosed between REPT ENDR many times value <expression (EQUtype)>. EXITR encountered between REPT ENDR, expansion terminated, assembly performed from statement next ENDR. [Usage] This instruction used repeat same statement. disable repetitive pseudo instruction temporarily interrupt during debugging, insert EXITR. [Explanation] eight levels nesting possible. When macro reference statements statements included, levels possible. Before symbol coded <expression (EQU-type)>, symbol must have already been defined. coded symbol defined defined previous page, error (Undefined Symbol) occurs. symbol operand pseudo instruction specified REPT-ENDR block must have already been defined. symbol defined after appearance symbol, symbol defined, error (Undefined Symbol) occurs. ENDR corresponding REPT missing, error ENDR Statement) occurs pseudo instruction which appears module. [Example] REPT ENDP ;Repeat instruction three times.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
EXITR
Symbol Mnemonic EXITR Operand
EXIT REPEAT
Comment [;comment]
EXITR
[Function] EXITR REPT statement ends expansion, performs assembly from statement subsequent ENDR. [Explanation] EXITR pseudo instruction used only between REPT ENDR. EXITR coded outside REPT-ENDR block, error (invalid EXITR statement) occurs.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
MACRO ENDM
Symbol name Mnemonic MACRO ENDM Operand
MACRO MACRO
Comment [;comment]
MACRO ENDM
<formal-parameter-group>
[statements (macro-body)
[Function] Assigns macro name, indicated name, sequence statements (macro body) enclosed between MACRO ENDM. name used definition name macro reference time. [Usage] This instruction used macro definition. [Explanation] Macro body macro body consists symbols, instructions, pseudo instructions (except MACRO ENDM), comments, other macro statements including their macro bodies. Formal parameter group formal parameters, delimited comma (,), coded, using characters. Formal parameters used only within macro body. Actual parameters assigned formal parameters, coded macro body, when macro referenced. Formal parameters coded symbol field, mnemonic field, operand field. When semicolons (;;) appear successively macro body, subsequent character string treated comment macro. expanded when macro referenced.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
MACRO ENDM
[Example Macro having parameter ADDR01 MACRO ENDM
MACRO MACRO
MACRO ENDM
;Macro definition A,R01 R01,A
[Example Macro having parameter ADDRNO MACRO A,RNO RNO,A ENDM ADDRNO (Expansion) A,R10 R10,A ;Macro definition
;;RNO+1 ;Macro reference
[Description] shown above example, when parameter coded operand field macro, parameter replaced parameter specified time macro reference. parameter macro definition statement called formal parameter. assigned formal parameter RNO. successive semicolons (;;) followed comment macro. This comment expanded time reference.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
GLOBAL
Symbol [label:] Mnemonic GROBAL Operand
GLOBAL
Comment [;comment]
GLOBAL
<symbol-group>
[Function] Declares symbols used macro symbols that referenced outside macro. [Usage] Before symbols used macro used outside that macro, GLOBAL pseudo instruction must first specified. [Explanation] GLOBAL pseudo instruction used only inside macro definition (within block enclosed between MACRO ENDM). GLOBAL pseudo instruction used outside macro definition, error (Invalid Mnemonic) occurs. global declaration symbol must coded before that symbol defined. GLOBAL declaration performed after symbol defined, error (Symbol Multi Defined) occurs. When symbol declared global symbol source module program, symbol used same source module program. more symbol names specified operand field GLOBAL pseudo instruction, provided they line (255 characters maximum). length statement exceeds characters, error (Syntax Error) occurs, statement ignored. [Example] OBJ. SOURCE STATEMENT STMAC MACRO GLOBAL SYMA SYMA SYMA ENDM STMAC SYMA
;Macro definition ;Global declaration
0000
;Macro reference local symbol referenced outside macro.
0000
[Description] When global declaration performed symbol macro, symbol value used upon completion macro expansion.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Symbol [label:] Mnemonic Operand
Comment
[Function] Directs assembler terminate source (program) module. [Usage] Code this instruction last line source (program) module. [Explanation] pseudo instruction followed code (8-bit code: 0AH), error occurs. When screen editor used programming, modules cataloged even code missing. Therefore, particularly careful forget code. followed code other than CR/LF code, such comment, warning message generated. Such statement ignored. source file does with statement, statement followed valid code, such code, preventing assembler from recognizing pseudo instruction, error (END statement missing) occurs. such error occurs, assembler generates object file, assuming statement placed file. [Example]
[Description] above example, pseudo instruction placed last line source program module.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
OPTION ENDOP
Symbol [label:] Mnemonic OPTION ENDOP Operand
OPTION ENDOP
Comment [;comment]
OPTION ENDOP
mask-option-pseudo-instruction
[Function] block enclosed between OPTION ENDOP called mask option definition block. mask option definition block, mask option pseudo instruction coded. depending device. [Explanation] OPTION pseudo instruction must terminated ENDOP pseudo instruction. pseudo instruction appears between OPTION ENDOP pseudo instructions, error OPTION Directive) occurs. instruction that generates object code placed between OPTION ENDOP pseudo instructions, warning generated. this case, object code instruction between OPTION ENDOP pseudo instructions generated. OPTION ENDOP pseudo instruction pair coded only once within source program. they coded more than once, error (Duplicated OPTION Directive) occurs second OPTION pseudo instruction. this time, object code between OPTION ENDOP generated. OPTION ENDOP pseudo instructions cannot coded separately different modules. source program device which requires mask option contains OPTION pseudo instruction, error (Not Found Mask Option Block) occurs link time. [Example] OPTION USEPOC ENDOP ;Include low-voltage detection circuit. mask option pseudo instruction varies
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
USEPOC NOUSEPOC
Symbol Mnemonic Operand USEPOC NOUSEPOC
USEPOC NOUSEPOC
Comment [;comment]
USEPOC NOUSEPOC
[Function] Specifies whether low-voltage detection circuit used mask option. USEPOC specifies that low-voltage detection circuit used, NOUSEPOC specifies that circuit used. [Caution] error occurs unless either USEPOC NOUSEPOC specified.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
USECAP NOUSECAP
Symbol Mnemonic Operand USECAP NOUSECAP
USECAP NOUSECAP
Comment [;comment]
USECAP NOUSECAP
[Function] Specifies whether capacitor oscillator used mask option. USECAP specifies that capacitor used, NOUSECAP specifies that capacitor used. [Caution] error occurs unless either USECAP NOUSECAP specified. This option specified with products D67, D68, D69.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
TITLE
Symbol [label:] Mnemonic TITLE Operand 'character-string'
TITLE
Comment [;comment]
TITLE
[Function] Causes page feed assembly listing, outputs character string specified operand field header line assembly listing. [Usage] This instruction used print title assembly listing enhance readability. [Explanation] characters (8-bit code) coded character string. character string longer than characters, error (invalid data length) occurs. When TITLE control instruction appears, assembler performs page feed, then prints specified title (characters) header. When TITLE control instruction appears first line, however, assembler does perform page feed. When page feed performed TITLE control instruction, TITLE control instruction output first line page. character string enclosed quotation marks ('), error (syntax error) occurs. [Example] Source program listing TITLE
'SUBROUTINE'
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
EJECT
Symbol [label:] Mnemonic EJECT Operand
EJECT
Comment [;comment]
EJECT
[Function] Causes page feed assembly listing. [Usage] This instruction used change page beginning routine. When page feed performed, readability assembly listing enhanced. [Explanation] When EJECT control instruction appears, assembler performs page feed. When page feed performed EJECT control statement, EJECT control statement printed page before page feed. [Example] Source program listing DEF:
EJECT
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
INCLUDE
Symbol [label:] Mnemonic INCLUDE Operand 'file-name'
INCLUDE
Comment [;comment]
INCLUDE
(For details file naming conventions, "Preface.") [Function] Reads source program specified file name, processes part source program. [Usage] This instruction used include another split file. [Explanation] source module specified INCLUDE contain another INCLUDE statement. eight levels INCLUDE nesting possible. nesting performed more than eight levels, nest overflow error occurs. file specified INCLUDE control statement must with statement. specified, warning generated. extension specified file name, extension assumed ASM. file connected INCLUDE control instruction split module. Therefore, symbols original source program referenced file name enclosed quotation marks ('), error (syntax error) occurs, this specification ignored. path name used file name. characters coded file name.) file specified file name does exist, error (the include file cannot opened) occurs.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
INCLUDE
[Example Source program INCLUDE INCLUDE
INCLUDE
INCLUDE
'SUB1.ASM'
'SUB2.ASM'
SUB1.ASM
SUB2.ASM
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
INCLUDE
[Example Source module INCLUDE 'MACROFILE.ASM'
INCLUDE
INCLUDE
Source module INCLUDE 'MACROFILE.ASM'
INCLUDE files coded source module. total length INCLUDE file names coded source module must exceed characters. Caution When /HOST option specified, source file name contain neither drive name directory name. MACROFILE.ASM MAC1 MACRO ENDM MACRO ENDM A1,A2
MAC2
B1,B2
[Description] Only macros that used multiple modules placed file. Then, file included using INCLUDE control statement. macros shared source modules without having PUBLIC EXTRN pseudo instructions. When PUBLIC EXTRN pseudo instructions used, however, names macros used must declared each module.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Macro Function
When particular routine used several times within single program, subroutine generally used save number program steps. When similar processing routines with different parameters exist, subroutine cannot applied, macro function used enable efficient programming. 3.5.1 Macro definition applicable range Macro definition define macro, macro definition pseudo instruction (MACRO, ENDM). When macro defined, formal parameters used. Table details macro definition pseudo instruction. Applicable range macros types symbols defined macro: local symbols that used only within macro, global symbols that used both macro other routines. symbols global symbols, perform global declaration macro using GLOBAL pseudo instruction. Symbols that declared global symbols handled local symbols used only within macro. Table details GLOBAL pseudo instruction. When macro used, program readability improved assigning easily remembered name sequence blocks that represents procedure performed those blocks. addition, macro used much same library. this, create separate file containing macro definition statements only. Then, specify INCLUDE statement beginning source program read contents file. Local symbols Symbols defined macro assumed local symbols unless declared otherwise. Local symbols used only within macro which they defined. this case, macro reference statements macro INCLUDE statement macro also included. Therefore, even when same symbol name that local symbol macro defined outside macro, when particular macro referenced more than once, such that similar statements generated, assembler does regard them duplicate definition. Global symbols symbol defined macro sometimes needs referenced from outside that macro. this, symbol must declared global symbol enable symbol referenced from statement module which symbol used. (See Table explanation global declaration method example use.) Note, however, that when symbol defined other than pseudo instruction references macro declared being global fixed manner more than once, such that sequence statements generated, duplicate definition error occurs that symbol. value defined symbol with pseudo instruction outside macro, same symbol inside macro, symbol treated local symbol macro. Then, that symbol relationship with symbol having same name which outside macro. When symbol outside macro needs assigned value macro, global declaration required.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
Using macro macro requires that definition reference performed. Assigning macro name sequence instructions pseudo instructions referred macro definition. [Example ADDR01 MACRO ENDM ;Macro definition A,R01 R01,A
above example, macro name ADDR01 assigned following three instructions: A,R01 R01,A
arbitrary macro name specified. However, specified macro name must neither existing symbol name reserved word. When macro defined module, used from that module number times after being defined. Specifying macro name contents macro definition referred macro reference. Code macro reference statement mnemonic field. When macro referenced, assembler expands instructions pseudo instructions assigned macro order which they defined. This referred macro expansion. [Example ADDR01 (Expansion) A,R01 R01,A ;Macro reference
following lists macro-related pseudo instructions: MACRO-ENDM GLOBAL REPT-EXITR-ENDR
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
3.5.2 Macro reference [Function] macro body defined with MACRO ENDM statements referenced. [Format] Symbol [label:] Mnemonic name Operand <actual-parameter-group> Comment [;comment]
[Explanation] name, specify macro name coded symbol field MACRO statement. name must defined before referenced. following five forms coded actual parameters. They evaluated 16-bit data. Expression Character constant (8-bit code shifted code string, enclosed quotation marks) Space blank coding, comma only) Symbol Constant Formal parameters replaced actual parameters one-to-one basis order which they coded, starting from left. number actual parameters exceeds number formal parameters, error (Operand count error) occurs. number actual parameters smaller than number formal parameters, NULL code assigned remaining formal parameters which corresponding actual parameters exist. this case, error occurs macro reference time. However, error caused NULL code occur macro expansion. When blank, comma, quotation mark, semicolon, coded actual parameter, must enclosed quotation marks that handled character string. macro body contain macro reference statements. levels nesting, including repetitive pseudo instructions, macro reference statements, statements, possible. nesting depth exceeds levels, error (Nesting overflow) occurs, illegal nesting assembled. Alternatively, error (Macro area overflow) occurs, macro expanded. [Example] ADMAC
ADMAC macro name defined with macro definition pseudo instruction, actual parameters required when ADMAC referenced.
User's Manual U10115EJ3V0UM
PART CHAPTER PSEUDO INSTRUCTIONS CONTROL INSTRUCTIONS
3.5.3 Macro expansion assembly source programs using macros consists following steps: When macro definition encountered, macro body stored internal memory area assembler (macro registration). When macro reference found, symbol table searched corresponding macro body, after which macro body inserted macro name position. expanded program assembled. When successive semicolons (;;) appear macro body, portion between that line regarded comment, such that that portion expanded macro reference. [Explanation] Macro expansion performed path module assembly phase. Before symbol defined outside macro referenced operand pseudo instruction coded macro, symbol must defined prior macro reference. symbol defined defined after macro reference, error (Symbol undefined) occurs. [Example] HTIMER MACRO HALT ENDM HTIMER TIMEVAL,HALTVAL T,#TIMEVAL #HALTVAL
100H,0101B
<1>: macro named HTIMER defined. TIMEVAL HALTVAL formal parameters. <2>: macro named HTIMER referenced. 100H 0101B actual parameters. They correspond formal parameters TIMEVAL HALTVAL, respectively. result reference HTIMER, expansion performed follows: HALT T,#100H #0101B
User's Manual U10115EJ3V0UM
PART OPERATION
User's Manual U10115EJ3V0UM
CHAPTER PRODUCT OVERVIEW
Product Description
Program Name Assembler File Name AS6133.EXE File Type Command file
command file first file read into memory when program execution begins.
Supported Debugger
following debugger when using AS6133 assembler. NEC's SM6133 V1.02 V1.06 cannot used. Manufacturer: Naito Densei Machida Mfg.
Product name: EB-6133 emulator
System Configuration
This section describes operating environment necessary AS6133. Host machine "Preface" personal computers which this assembler run. Operating system "Preface" operating systems which this assembler run. User memory size larger Files necessary AS6133 Source file This file source program assembled. Sequence file This file information necessary specify device file name, assembly options, source file name start assembler. When more than source module file assembled, necessary specify source file names sequence file beforehand. MS-DOS environment file (CONFIG.SYS) Setting: files more) buffers more)
User's Manual U10115EJ3V0UM
CHAPTER BEFORE EXECUTION
Creating Backup File
Before using AS6133, create backup copy copying contents original assembler disk work disk. This prepare disruption contents floppy disk disk itself. Keep original disk safe place. Procedure create backup file Start MS-DOS. Insert MS-DOS system disk into drive floppy disk into drive Format floppy disk drive using FORMAT command copy system A>FORMAT B:/S
Remove MS-DOS system disk from drive insert AS6133 original disk into drive Enter COPY command transfer AS6133.EXE from disk drive disk drive A>COPY A:*.* B:/V
contents disk drive have been transferred disk drive A>DIR B:/W AS6133.EXE
Install
Copy file (AS6133.EXE) supplied medium install destination. example, supplied medium floppy disk drive install destination C:\nectools\bin, execute copy command follows: copy A:*.* C:\nectools\bin directory install destination environmental variable PATH. above example, following line AUTOEXEC.BAT. PATH C:\nectools\bin;%PATH%
User's Manual U10115EJ3V0UM
CHAPTER SEQUENCE FILE
Overview
When starting assembler assembling program, necessary specify target device file, source module file, assembly options.
Note
(This information generically called assembly condition.)
assembly condition specified sequence file. Using sequence file makes possible specify many assembly conditions under sequence file name. During debugging, source module files deleted added simply changing contents sequence file. Effective sequence file make debugging efficient, described above. Note assembly option specifies, example, whether output assembly listing. Section details.
Sequence File Format
sequence file created using editor COPY command. file extension sequence file must always ".SEQ". 3.2.1 Overall format [;comment] device-name /option[/option/option/././.] source-file-name source-file-name [;comment] [;comment] [;comment] [;comment]
[Description] Specify device name <1>. Specify assembly options <2>. Only assembly option placed between adjacent slashes (/). specify more than assembly option, write them succession separate them with slash. more lines used specify assembly options, each line must begin with slash. Assembly options specified effective when source file assembled. Specify source module file <3>. sequence file, begin comment with semicolon same source program. comment placed anywhere sequence file. device name, assembly options, source file name must specified stated order. Otherwise, error detected.
User's Manual U10115EJ3V0UM
PART CHAPTER SEQUENCE FILE
3.2.2 Device name format [;comment] device-name
[;comment]
[Function] device name product that target assembly specified. [Description] Usually, sequence file should begin with device name. However, comment precede device name. file extension used. unspecified device name used, following error detected during assembly, assembly aborted. FOUND DEVICE STATEMENT device name written place where should error will detected during assembly. Table shows correspondence between device names that described sequence file devices. Table 3-1. Device Name That Described Supported Device
Device Name D6133 D6134 D6135 D6604 D6605 D63A D64A D62A D6132 D6132A Supported Device
µPD6133 µPD6134 µPD6135 µPD6604 µPD6605 µPD63 µPD63A µPD64 µPD64A µPD62 µPD62A µPD65 µPD6132 µPD6132 µPD67 µPD68 µPD69
Caution device name corresponding version device when using µPD61P34B, 66P04B, 6P4B, 6P5, 6P9.
User's Manual U10115EJ3V0UM
PART CHAPTER SEQUENCE FILE
[Example] When µPD6133 target product D6133 µPD6133
Note Leave "µP" from product name. 3.2.3 Assembly option format [/option] [/option] [/option] [/.] [/.] [/option] [/option] [;comment]
[Function] Assembly options specified. [Description] Usually, specification assembly options should begin line immediately after device name file. However, comment precede specification assembly options. Each assembly option must prefixed with slash (/). specify more than assembly option, separate them with slash. more space characters allowed between assembly options. Assembly options written over more than line. characters, each continuation line must begin with slash. mutually exclusive assembly options specified, last appear effective. Assembly options omitted. Section details assembly options. assembly option specified place where should error detected during assembly. 3.2.4 Source file name format source-file-name [;comment] source-file-name [;comment] source-file-name [;comment] Each line must with pair CR/LF
[Function] name source file assembled specified. [Description] More than source file name cannot specified line. Caution /HOST option specified, neither drive name directory name specified source file name.
User's Manual U10115EJ3V0UM
PART CHAPTER SEQUENCE FILE
Example Sequence File Description
example describing sequence file (SAMPLE.SEQ) given below. ;DEVICE NAME D6134 ;OPTION /HOST /WORK=B: ;SOURCE MODULE INIT.ASM MAIN.ASM SUB1.ASM SUB2.ASM DATA.TBL
[Description] name device that target assembly. specification assembly options. source module assembled. sequence file created using either editor running MS-DOS COPY command (MS-DOS system command). COPY command sufficient sequence file created small. However, necessary correct sequence file create large sequence file, editor will more convenient. Caution /HOST option specified, neither drive name directory name specified source file name.
User's Manual U10115EJ3V0UM
CHAPTER ASSEMBLER FUNCTIONS
Overview
AS6133 reads specified source module file creates files such object file assembly list file from statements source module file. AS6133 uses two-pass assembly method. first pass, symbol table created, mnemonics converted machine words. Symbols left undefined, area reserved them. second pass, symbol area reserved first pass allocated machine words. After second pass ends, intermediate object module file created. When intermediate object module file created, address information about branches extending over more than module file been resolved. Next, AS6133 links intermediate object module files create object file. This linkage processing started automatically. AS6133 assembly time reduction function make assembly efficient. When intermediate object module file created second pass, date/time creation added intermediate object module file. When source module file partly corrected reassembled, creation date/time source module file compared with that existing intermediate object module file that same file name that source module file. source module file assembled only when creation date/time more recent than that intermediate object module file. creation date/time object module file more recent than that corresponding source module file, AS6133 assumes that source module file been changed need reassembled. this case, existing object module file used linkage editing.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
Assembly Input/Output Files
AS6133 uses following input files.
Input File Name Source file Sequence file Source file created using editor File which device name, specification assembly options, source module file saved. sequence file eliminates necessity specify device name, assembly options, source module file each time assembler started, thus making assembly efficient. Description File Type .ASM .SEQ
Remark
underlined file extension changed.
AS6133 uses following output files.
Output File Name PROM file Description File holding object code Intel format, IFL/DFL. IFL/DFL followed code Intel format. object code IFL/DFL written time downloading file PROM writer. File holding assembly list source module file. File holding cross-reference list source module file. list output, file extension .XRF. File holding error warning messages output console during assembly. name this file fixed "AS6133.LOG." Intermediate file created each source file during assembly During linkage, intermediate object module file used input file. File Type .PRO
Assembly list file Cross-reference list file file
.PRN .PRN
.LOG
Intermediate object module file
.OBJ
Remark
underlined file extension changed.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
Assembler Functions
4.3.1 Intermediate object module file output function source module file (.ASM) specified start assembly converted machine words, which then output intermediate object module file (.OBJ) having same name source module file. intermediate object module file added with date/time created. 4.3.2 Linkage function AS6133 absolute assembler, linkage function that source file split into modules assembled. When source module files assembled, intermediate object module file created each source module file, linkage automatically carried later accepting intermediate object module files input. 4.3.3 file output function file created linking intermediate object module files. file consists object part IFL/DFL part. PROM data file ordering masked chip. Chapter details. 4.3.4 Assembly time reduction function AS6133 assembly time reduction function make debugging efficient. Before source module file assembled, creation date/time compared with creation date/time intermediate object module file having same name source module file there one). creation date/time intermediate object module file more recent than that source module file, AS6133 assumes that source module file been changed need reassembled. creation date/time intermediate object module file earlier than that source module file having same file name, that source module file source module files specified after that source module file assembled unconditionally. order which source module files specified changed, source module file added deleted, source module file changed after latest assembly, source module files that follow will assembled unconditionally. make most assembly time reduction function, place debugged source module files before those which currently being debugged.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
Figure 4-1. Processing Flow Assembly Time Reduction Function (1/2)
Start AS6133
Read sequence file.
Generate object file name from source file name.
there object file having same name source file?
What assembler used create object file?Note AS6133
Other than AS6133
same device name options specified?Note
next module
source file created more recently than object file?
include file specified source file created more recently than object file?Note
order which source file specified changed?Note
device same?Note Skip assembling source file.
Assemble source file create object file.
Were source files assembled?
Assemble source files described after that source file sequence file.
next page.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
Figure 4-1. Processing Flow Assembly Time Reduction Function (2/2)
file created same time after object file?
Linkage editing
AS6133
Notes object file created using AS6133 begins with "AS61" string. device name options specified sequence file checked with those specified object file. name include file acquired from object file. name immediately preceding source file acquired from object file. device information acquired from object file. 4.3.5 Assembly list file output function assembly list file output after assembly. assembly option controls whether output assembly list file. Chapter details.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.3.6 Cross-reference list file output function AS6133 creates cross-reference list file. Chapter details. Figure 4-2. AS6133 Input/Output File Configuration
Sequence file (.SEQ) device name, assembly option, source module file specified. Source module file (.ASM)
Temporary fileNote
Host machine AS6133
file (.PRO) Intermediate object module file (.OBJ)
Assembly list file (.PRN) Cross-reference file (.XRF) file (AS6133.LOG)
Note temporary file will deleted assembly.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
Assembler Start-Up Procedure
4.4.1 Input files needed when assembler starts following files necessary start assembler. Sequence file (.SEQ) This file holds device name, assembly options, source program file name that required during assembly. Source module file (.ASM) This file contains source program. Section details. 4.4.2 Starting assembler This section describes actual procedure start assembler. assembler started either following procedures. Input methods
current drive name Cautions omit [directory] AS6133, necessary specify PATH environment variable. sequence file source file must same directory. operation assembler described below above input methods separately. Starting
Insert assembler disk into drive disk holding sequence source files drive Change prompt drive where disk holding sequence source files inserted, enter follows: "A:AS6133" B>A:AS6133 assembler will loaded into memory started run. After started, assembler searches current directory sequence file (.SEQ) follows: there sequence file current directory sequence file read automatically, assembly carried according contents sequence file. there more than sequence file current directory sequence file names numbered sequentially starting listed display screen. user should select sequence file subjected assembly. there sequence file selected assembler stops running. Re-set entry.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
[Example] Starting assembler under MS-DOS B>A:AS6133 µPD6133 SERIES ASSEMBLER Vx.xx Copyright Corporation 1995, 2000 FILE LIST CURRENT DIRECTORY TEST1.SEQ TEST.SEQ TEST2.SEQ TEST3.SEQ
Enter sequence file number: TEST.ASM assembly started HH:MM:SS
MM/DD/YY
Starting assembler under B>A:AS6133 µPD6133 SERIES ASSEMBLER Vx.xx Copyright Corporation 1995, 2000 FILE LIST CURRENT DIRECTORY TEST1.SEQ TEST.SEQ TEST2.SEQ TEST3.SEQ
FILE (SELECT NUMBER) TEST.ASM ASSEMBLY START HH:MM:SS
MM/DD/YY
Starting assembler
Insert assembler disk into drive sequence source file disk into drive Enter "AS6133B:SAMPLE.SEQ" response prompt (A>). A>AS6133B:SAMPLE.SEQ This entry causes assembler loaded into memory according SAMPLE.SEQ sequence file drive ".SEQ" extension left from sequence file name. left out, assigned automatically. specified sequence file missing, assembler ends running. Enter correct sequence file name.
4.4.3 Aborting assembly abort assembler, enter control+C (^C) from console. receiving assembler closes files stops running. After assembler stops, MS-DOS prompt (A>) appears.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
Assembly Options
Assembly options used specify files output during assembly, their types, related variables, work drive. Assembly options specified when they written sequence file. Section details. assembly option specified, default assembly options (previously specified assembler) used. Table 4-1. Assembly Options
Option HOS[T] NOH[OST] OBJ[=<directory>] NOO[BJ] PRO[=file-name[.PRO]] NOPRO LIS[T][=file-name[.PRN]] NOL[IST] XREF[=file-name[.XRF]] NOX[REF] ROW[=n] HOST (disabled) DefaultNote Description Controls EB-6133 emulator output. Controls object output. Reference p.89
p.90
(disabled)
Controls load module output.
p.91
LIST (disabled)
Controls assembly list output.
p.92
XREF (NOX)
Controls cross-reference list output.
p.93
(enabled)
Specifies number lines output page list output 250). Specifies number columns output line list output 256). Controls option information output.
p.94
COL[UMN][=n]
(col 132)
p.94
NOS[EQ] NOT[AB][=n] FOR[M] NOF[ORM] ZZZn WOR[K] drive-name:
(NOS)
p.95
NOTAB (enabled)
Controls tabs 255).
p.95
FORM (enabled)
Controls form feed.
p.96
ZZZn (enabled) Current drive (enabled) HEAD (HEAD)
Controls assembly variables. Specifies work drive.
p.96 p.97
HEAD NOHEAD HEL[P]
Controls list header output.
p.97
Displays help messages.
p.98
Note Information enclosed parentheses corresponds setting used when /HOST specified. "Disabled" means that default value fixed. Only currently "enabled" value used. Caution EB-6133 emulator, always necessary specify HOST option.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.1 Option control EB-6133 emulator information output [Format]
HOS[T] NOH[OST] Default value./HOST
[Function] This option specifies whether output information necessary EB-6133 emulator (µPD6133 Series development tool). [Description] HOS[T] information about EB-6133 emulator output object file. following assembly options specified forcibly: /OBJ/PRO/LIST/NOXREF/COL 132/NOSEQ files related above assembly options output directory where sequence file Caution When /HOST selected, related input files (source files) must same directory sequence file. NOH[OST] information about EB-6133 emulator output. Caution option specified, /HOST specified default assumption.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.2 Option control object file output [Format]
OBJ[=<directory>] NOO[BJ] Default value./OBJ When /HOST specified.disabled
[Function] This option specifies whether output intermediate object file. option specifies output intermediate object file, also specifies directory which file output. specified directory contains intermediate object file having same name source module file, creation date/time more recent than source module file, assembly will carried out. [Description] /OBJ[=<directory>] intermediate object file will output. /NOO[BJ] intermediate object file will output. option specify only directory which intermediate object file output. cannot specify name intermediate object file. intermediate object file output (/NOO specified), /PRO option disabled. This option disabled, /HOST option (EB-6133 emulator information output) specified. this case, intermediate object file always output directory where sequence file
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.3 Option control load module file (PRO file) output [Format]
PRO[=file-name[.PRO]] NOP[RO] Default value./PRO When /HOST specified.disabled
[Function] This option specifies whether output load module file (PRO file). option specifies output load module file, also specifies name load module file. [Description] PRO[=file-name] file output. Specifying file name load module file output directory where sequence file named after sequence file, that sequence-file-name.PRO Specifying file name load module file created under specified file name. file names that used include: AUX, CON, PRN, NUL. These files directed following devices. AUX: RS-232C CON: Console (usually CRT) PRN: Printer NUL: file output file name must specified format: file extension omitted, ".PRO" used. NOP[RO] load module file output. This option disabled, /HOST option (EB-6133 emulator information output) specified. this case, file always output directory where sequence file
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.4 Option control assembly list file output [Format]
LIS[T][=file-name[.PRN]] NOL[IST] Default value./LIST When /HOST specified.disabled
[Function] This option specifies whether output assembly list file. option specifies output assembly list file, also specifies name assembly list file. [Description] LIS[T] assembly list file output. destination output specified either following ways. Specifying file name assembly list file created under same name source file directory where source file source program split into several modules, assembly list file corresponding specific source module file created under same name that source module file directory where that source module file file extension ".PRN" used assembly list file. Specifying file name assembly list file created under specified file name. file names that used include: AUX, CON, PRN, file name must specified format: file extension omitted, ".PRN" used. NOL[IST] assembly list file output. This option disabled, /HOST option (EB-6133 emulator information output) specified. this case, assembly list file always output under same name source file directory where sequence file file extension ".PRN" used.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.5 Option control cross-reference list file output [Format]
XRE[F][=file-name[.XRF]] NOX[REF] Default value.XREF When /HOST specified./NOX
[Function] This option specifies whether output cross-reference file. option specifies output cross-reference file, also specifies name cross-reference file. output cross-reference file specified, cross-reference file output each source module file one-to-one basis. [Description] XRE[F] cross-reference file output. destination output specified either following ways. Specifying file name assembly list output, cross-reference list output same file assembly list. this case, file name specified here must same assembly list file. assembly list output, that specified, cross-reference file created under same name source file directory where source file this case, file extension ".XRF" used cross-reference file. Specifying file name cross-reference file created under specified file name. This method used specify that cross-reference list output file different from assembly list file. file names that used include: AUX, CON, PRN, file name must specified format: file extension omitted, ".XRF" used. NOX[REF] cross-reference file output.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.6 Option control number lines output list output page (ROW NO.) [Format]
Default value./ROW When /HOST specified.enabled
ROW=n
[Function] This option specifies number lines page list files (such assembly list cross-reference list files). [Description] number lines page. decimal number, range between (inclusive). 4.5.7 Option control number columns output list output line [Format]
Default value./COL When /HOST specified./COL
COL[UMN]=n
[Function] This option specifies number columns line list files (such assembly list, memory map, crossreference list files). [Description] number lines page. decimal number, range between (inclusive).
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.8 Option control option information output [Format]
NOS[EQ] Default value./SEQ When /HOST specified./NOS
[Function] This option specifies whether output following information first page assembly list each source module. Sequence file name specified when assembler started, contents sequence file (SEQ=) [Description] Information (described under [Function]) about options output first page assembly list file. NOSEQ Information about options output first page assembly list file. This information cannot output separately from assembly list. This option disabled /NOLIST specified assembly list file output control option. 4.5.9 control option [Format]
NOTAB[=n] Default value.NOT When /HOST specified.enabled
[Function] This option specifies whether characters assembly list. [Description] characters used assembly list. this selected, assembly speeded, memory capacity required store files becomes smaller. NOT[AB] characters used assembly list. character there one) replaced with space characters that character next character column that multiple counted from beginning line). decimal number, range between (inclusive). this range, error detected, assembler aborted. This option should used printer that cannot recognize character.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.10 Form feed control option [Format]
FOR[M] NOF[ORM] Default value./FOR When /HOST specified.enabled
[Function] This option specifies whether form output list form feed character (0CH 8-bit code) sets CR/LF characters. [Description] FOR[M] form output list form feed character. NOF[ORM] form output list outputting CR/LF character sets repeatedly until value specified option (option control number lines output list page) reached. This option should used printer that cannot recognize form feed character. FOR[M] selected, assembly speeded, memory capacity required store files becomes smaller. 4.5.11 Option control assembly-time variables [Format]
0FFFFH Default value.ZZZn When /HOST specified.enabled
ZZZn
[Function] This option initializes ZZZn assembly-time variable value [Description] evaluated value must fall range between 0FFFFH. greater than 0FFFFH, assumed binary, octal, decimal, hexadecimal number. character string specified error (invalid option) reported, assembler aborted. option specified when assembly started, assembly-time variables initially This value remains effective until changed pseudo instruction.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.12 Option control work drive [Format]
Default value.current drive When /HOST specified.enabled
WOR[K] drive-name:
[Function] This option specifies name drive which assembly work files prepared. [Description] Drive name specification Only drive name specified. Example: WORK work files deleted assembly. 4.5.13 Option control list header output [Format]
HEAD NOHEAD Default value.HEAD When /HOST specified.HEAD
[Function] This option specifies whether output headers lists such assembly list cross-reference file list. [Description] /HEAD header output each page list. /NOHEAD header output only first page list. output other pages. This option applicable following lists. Assembly list file Cross-reference list file
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLER FUNCTIONS
4.5.14 Help message display [Format]
HEL[P]
[Function] This option displays description AS6133. [Description] This option cannot specified sequence file. specified only format: AS6133/HEL[P]
User's Manual U10115EJ3V0UM
CHAPTER ASSEMBLY OUTPUT LISTS
Types Assembly Output Lists
AS6133 output following lists after assembly. Table 5-1. Output Lists
Output File Output File Extension Assembly Option Whether List Output When/HOST Specified
Object file file Assembly list Option information list Cross-reference list file
.OBJ .PRO .PRN .PRN .XRF .PRN AS6133.LOG
/OBJ /PRO /LIS[T] /SEQ /XRE[F]
output list mentioned Table 5-1, specify corresponding assembly option when starting assembler. Section specify unnecessary output list, prefix corresponding assembly option with "NO" /NOLIST /NOSEQ.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLY OUTPUT LISTS
Controlling Each List Output Format
Number lines page number lines page determined assembly option (where 250). defaulted Number columns line number columns line determined assembly option (where 255). specified list output exceeds this value, excess portion from listing. full-size character falls position, position shifted place backward. defaulted /HOST specified, however, fixed 132. Form feed control form according FORM/NOFORM assembly option. FORM. page selected when character detected (default). NOFORM. form advanced outputting CR/LF characters repeatedly until form advanced many lines specified assembly option. Note (form feed) character 8-bit code (line feed) character 8-bit code (carriage return) character. 8-bit code control control carried according TAB/NOTAB assembly option. NOTAB character replaced with space characters that character next character column whose number (counted from beginning line) equals multiple defaulted characters output.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLY OUTPUT LISTS
Header Output
Lists other than document list have header (printed each page) consisting following information: Assembler name version Device name Listing title Assembly date/time page (module sequence number page number within module) Module name Example: UPD6133.ASM assembly option specify whether output header. /HEAD (default) specifies that header printed each assembly list page. /NOHEAD specifies that header output first page only.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLY OUTPUT LISTS
Assembler's Check Functions
assembler checks each instruction source program minimize errors that occur when object program executed. 5.4.1 Error check instructions exceeding allowable number bits assembler outputs message instruction source program exceeds allowable number bits. Instructions specifying immediate data STTS #data Error number bits greater than #data Error number bits greater than #data Error number bits greater than #data Error number bits greater than warning message output, bits reset #data Error number bits greater than #data Error number bits greater than warning message output, bits reset #data Error number bits greater than #data Error number bits greater than #data Error number bits greater than #data Error number bits greater than
instructions instruction instruction instruction Error number bits greater than Error number bits greater than warning message output, bits reset
5.4.2 Check prevent program crash supply voltage fluctuates during operation, power-on reset fails take place, program counter become undefined, possibly resulting program crash. program counter points address which there programmed instruction, code that address happens match operation code jump HALT instruction, endless loop result. prevent program crash, object code pointed program counter happens match operation code branch HALT instruction, assembler outputs warning message displays instruction that will generated. instructions generated this case include: JMP, JNC, JNF, CALL, RET, HALT. warning message output, check instruction that will generated. instruction cause endless loop, program should corrected.
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLY OUTPUT LISTS
5.4.3 Check destination branch instruction (automatic check BANK0 BANK1) This check made device which number words greater than 1,024. branch execution without BANK number branch destination described mnemonic, describe follows: Object code CALL0 branch BANK0 1,023 instructions) Object code CALL1 branch BANK1 (1,024 2,047 instructions) Object code CALL2 branch BANK2 (2,048 3,071 instructions) Object code CALL3 branch BANK3 (3,072 instructions more) CALL0, CALL1, CALL2, CALL3 described with BANK number, error occurs. Branch instruction JMP0 JMP1 JMP2 JMP3 JNC0 JNC1 JNC2 JNC3 JNF0 JNF1 JNF2 JNF3 addr addr addr addr addr addr addr addr addr addr addr addr addr addr addr addr addr addr addr addr Source instruction
addr
addr
addr
addr
addr
Subroutine instruction CALL0 CALL1 CALL2 CALL3 addr addr addr addr
Source instruction
CALL
addr
User's Manual U10115EJ3V0UM
PART CHAPTER ASSEMBLY OUTPUT LISTS
5.4.4 Check output input-only port output instruction coded input-only port, error message output. Input-only port (KI3 KI0) (S1/LED,S0)
Output instruction P11, P01, #data
5.4.5 Check input/output instructions nonexisting ports warning message output input output instruction coded nonexisting port.
Port Device D6133 D6134 D6135 D6603 D6604 D6605 D63A D64A D62A D6132 D6132A
Note Note
(KI/O7 KI/O4)
(KI/O0 KI/O3)
(KI3 KI0)
S1LED
I/OPull I/OMode
(I/O3 I/O0)
warning message output. Caution
warning message output.
Refer device name supported mask version device when using
µPD61P34B, 66P04B, 6P4B, 6P5, 6P9.
Notes D6603 does have KI/O7 KI/O5 warning message output. D6603 does have warning message output.
User's Manual U10115EJ3V0UM
CHAPTER ERROR MESSAGES
Errors Detected Start-Up Time
parameter specified start-up incorrect, error occur time, AS6133 displays error messages, then stops prematurely.
Message text Cause System action User response Message text Cause System action User response Message text Cause System action User response Message text Cause System action User response file found file specified start-up found specified directory specified drive AS6133 stops running. Specify correct file. invalid option specified option invalid (such invalid option name parameter). invalid option indicated, assembly aborted. Specify correct option. invalid option value value specified option invalid value describable range specified). invalid option indicated, assembly aborted. Specify correct option. memory memory capacity insufficient. Assembly aborted. Decrease number options used, increase memory, change /WORK drive specification.
following case, message displayed, assembly aborted.
Message text Cause System action User response HALT table overflow HALT area overflowed. There more than HALT instructions, information about HALT instructions preserved. Decrease number HALT instructions.
User's Manual U10115EJ3V0UM
PART CHAPTER ERROR MESSAGES
Error message format error message includes source statement which error occurred. displayed source statement line followed line containing source file name, line number, error type, error number, error message text. error message ends with numbers errors warnings. [Example]
DIRTEST.ASM (3):
error-number 058: Undefined symbol
Source statement which error detected Source file name, line number, error message text
Total numbers errors warnings
Number errors
<1>: <2>: <3>: Source file name Line number Error type
Number warnings
area overflow location program memory referenced. Addressing error Include file open error Invalid operand value pseudo instruction Invalid data strength Error related INCLUDE file MACRO management file error Memory area overflow Invalid instruction Nest stack overflow Mask option definition block error Duplicate mask option specification Invalid operand Invalid pseudo instruction Invalid statement REPT area overflow statement written program memory area. reserved word used where should Duplicate symbol definition undefined symbol Symbol area overflow Syntax stack overflow Format syntax error Invalid operand Undefined symbol Invalid operand value count Warning
User's Manual U10115EJ3V0UM
PART CHAPTER ERROR MESSAGES
<4>: <5>:
Error number Error message text warning messages described Section 5.4.2 include source statement which error detected.
Caution
Code
Message text Cause User response
Illegal first operand type first operand invalid. Correct expression. Illegal second operand type second operand invalid. Correct expression. Illegal first operand value first operand value incorrect. Make sure that operand value acceptable device model interest. Unreference symbol symbol been referenced. Check whether symbol necessary. symbol unnecessary, delete symbol necessary, reference directive statement missing. Write statement correct position. Symbol define error symbol definition incorrect. Correct symbol define pseudo instruction operand. OPTION statement OPTION statement missing. OPTION statement,

Other recent searches


S9015 - S9015   S9015 Datasheet
RFU5TF6S - RFU5TF6S   RFU5TF6S Datasheet
MT6L55FS - MT6L55FS   MT6L55FS Datasheet
IDB45E060 - IDB45E060   IDB45E060 Datasheet
IDP45E060 - IDP45E060   IDP45E060 Datasheet
8mA23405F - 8mA23405F   8mA23405F Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive