When assembling IS65 source files with ISAS
When changing the source file for IS65 for ISAS
When assembling ISDMG source files with ISAS
When changing the source file for ISDMG for ISAS
Notes on specifying hexadecimal constants
div/divu/mul/mulu/not/sub instructions
Suppressing the DOS/4GW Banner
Changing the Switch Mode Setting
The ISAS.ISLK User's Manual consists of the following contents.
ISAS and ISLK are assemblers and linkers that can develop programs for the Super Nintendo 65816 processor, SPC700 processor, Game Boy DMG processor, etc. under the environment of Windows 95, Windows NT 4.0, Linux, MS-DOS, PC DOS, etc.
ISAS is a 2-pass cross assembler, and is a relocatable assembler that can assemble source files by dividing them into files for each module.
ISAS has the following features.
ISLK has the following features.
ISAS and ISLK are currently available in MS-DOS , DOS/4GW , Windows , and Linux editions. The editions of ISAS and ISLK differ depending on the product configuration. If you would like an edition not included in the product, please contact us.
The MS-DOS version runs on conventional memory. Therefore, the buffer capacity of symbols, macros, etc. is considerably limited, but it can be operated on any computer that uses MS-DOS or PC DOS as the OS as long as it has available conventional memory. I will.
File | Explanation |
---|---|
ISAS.EXE | MS-DOS version assembler. |
ISLK.EXE | MS-DOS version linker. |
The DOS/4GW version uses DOS extender DOS4GW.EXE from Rational Systems, Inc. to operate on the extended memory of MS-DOS. DOS/4GW requires some time to load the ISAS or ISLK main unit into the extended memory, but the time required for assembling and linking is processed faster than the MS-DOS version. In addition, restrictions such as available buffer capacity are greatly reduced.
File | Explanation |
---|---|
ISAS4G.EXE | It is a DOS/4GW version assembler. |
ISLK4G.EXE | DOS/4GW version linker. |
DOS4GW.EXE | It is a DOS extender of Rational Systems, Inc. It is automatically loaded when ISAS4G.EXE and ISLK4G.EXE are started. For DOS / 4GW, Appendix 3 DOS / 4GW Please refer to. |
The Windows version is a version that can be run on the MS-DOS prompt of Windows 95 or the command prompt of Windows NT 4.0. You can use the MS-DOS version at the MS-DOS prompt or command prompt, but it is recommended to use the Windows version that is fast and has few restrictions such as available buffer capacity.
File | Explanation |
---|---|
ISAS32.EXE | It is a Windows version assembler. |
ISLK32.EXE | Windows version linker. |
You can run it on Linux Kernel 2.30.
File | Explanation |
---|---|
isas | It is a Linux version assembler. |
islk | Linux version linker. |
In order to operate ISAS and ISLK, it is necessary to prepare the following environment.
The operating environment when using the MS-DOS version is as follows.
item | Explanation |
---|---|
Computer | Equipped with CPU of Intel Corp. 8086 or higher, and MS-DOS or PC DOS must work. |
memory | Available memory of 500K bytes or more is reserved for conventional memory. |
disk | Requires at least 1 Mbyte free space for installation and 500 Kbytes free space for temporary. |
OS | MS-DOS or PC DOS version 5.0 or higher. |
The operating environment when using the DOS/4GW version is as follows.
item | Explanation |
---|---|
Computer | MS-DOS or PC DOS runs on IBM-PC/AT compatibles equipped with Intel 80386 or higher CPU, or MS-DOS runs on NEC's PC-9800 series and Fujitsu's FMR-70 To do. |
memory | 200K bytes or more available for conventional memory and 2M bytes or more available for extended memory. It is recommended to prepare 4M bytes or more of expansion memory. |
disk | Requires at least 1 Mbyte free space for installation and 500 Kbytes free space for temporary. |
OS | MS-DOS or PC DOS version 5.0 or higher. |
DOS/4GW versions of ISAS and ISLK use extended memory by DPMI (Dos Protected Mode Interface) of DOS extender DOS4GW.EXE. Therefore, if the EMS (Expanded Memory Specification) or other DPMI server cannot secure the free space of the XMS (eXtended Memory Specification) memory, the DOS/4GW version of ISAS or ISLK cannot be started. Check the available extended memory again and change the settings of the memory manager such as HIMEM.SYS and EMM386.EXE. For details on HIMEM.SYS and EMM386.EXE, refer to MS-DOS or PC DOS manuals.
The operating environment when using the Windows version is as follows.
item | Explanation |
---|---|
Computer | Equipped with Intel 80486 or higher CPU, and Microsoft Windows 95 or Microsoft Windows NT 4.0 can operate normally. |
memory | 32 MB or more is recommended. |
hard disk | 20 MB or more free space is required. |
The operating environment when using the Linux version is as follows.
item | Explanation |
---|---|
Computer | Linux Kernel 2.30 must work properly. (However, it works only on Debian 1.3) |
memory | 16MB or more is recommended. |
hard disk | Free space of 10 Mbytes or more is required. |
In the case of Linux environment, it may not work depending on the environment settings. In such a case, please feel free to contact us.
Before using ISAS and ISLK, the following minimum setup is required.
First, copy the system files from the system disk to your hard disk. Copy edition please so as to copy all of the system files listed in the items in the same directory. After copying, keep the system disk in a safe place. This work is permitted for backup purposes only, and copying for any other purpose is prohibited.
The ISAS and ISLK, ISAS , ISLK , ISINC , ISLIB , ISTMP / TEMP / TMP , and PATH , but of environment variables are provided, the inner PATH directory where you copied the system files of ISAS.ISLK in the search list on the command Please add. For example, specify the following when copying the ISAS and ISLK system files to the ISAS directory on the C drive.
C:\>path=%path%;c:\isas
Set other environment variables as needed. For details on environment variables , refer to Environment Variables .
ISAS and ISLK provide some environment variables to make assembly and linking work easier.
program | Environment variable |
---|---|
ISAS | ISAS , ISINC , ISTMP/TEMP/TMP , PATH |
ISLK | ISLK , ISLIB , ISTMP/TEMP/TMP , PATH |
You may want to set these environment variables in your AUTOEXEC.BAT file as needed. You can specify environment variables in either uppercase or lowercase.
Specify the parameters for starting ISAS.
Parameters have start options and source file names, but in many cases the start options specified during assembly are often the same. By specifying the ISAS environment variable in such a case, you can save the trouble of inputting the parameters to specify when ISAS starts.
For example, if you want to set the number of symbol tables to 8000, specify as follows.
set isas=-s8000
With this setting , 8000 symbol tables can be secured by default without specifying the -s option when starting ISAS . However, if the same parameter as the ISAS environment variable is specified on the command line when starting ISAS, the specification on the command line will be valid. For details on the ISAS parameters, see Chapter 6, Assembler (ISAS) .
Specify the parameters for starting ISLK.
There are startup options and object file names in the parameters, but the startup options specified when linking are often the same. By specifying the ISLK environment variable in such a case, you can save the trouble of inputting the parameters to specify when starting ISLK.
For example, if you want to set the number of symbol tables to 8000, specify as follows.
set islk=-s8000
With this setting , 8000 symbol tables can be secured by default without specifying the -s option when starting ISLK . However, if the same parameter as the ISLK environment variable is specified on the command line when starting ISLK, the specification on the command line becomes valid. For details on ISLK parameters, refer to CHAPTER 7 LINKER (ISLK) .
Specifies the directory path to search for files read by the LIB/FILE/INCLUDE directive and LIBBIN directive .
If the file specified by the LIB/FILE/INCLUDE directive or LIBBIN directive cannot be found, ISAS searches for the file according to the directory path specified by the ISINC environment variable. For example, to search the INCLUDE directory on the C drive, specify:
set isinc=c:\include
Also, when specifying multiple directories, you can specify the search paths sequentially by separating each with a semicolon (;).
set isinc=c:\include1;c:\include2
Even if the ISINC environment variable is specified, if the -I option is specified when ISAS is started , the directory specified by the -I option is searched first and the directory specified by the ISINC environment variable is searched when the target file is not found. Will be searched.
Specifies the directory path to search for object files to link.
If the object file is not found at link time, ISLK will search for the file according to the directory path specified by the ISLIB environment variable. For example, to search the LIB directory on the C drive, specify:
set islib=c:\lib
Also, when specifying multiple directories, you can specify the search paths sequentially by separating each with a semicolon (;).
set islib=c:\lib1;c:\lib2
Even if the ISLIB environment variable is specified, if the -L option is specified when ISLK is started , the directory specified by the -L option is searched first and the directory specified by the ISLIB environment variable is searched when the target file is not found. Will be searched.
Specifies the directory path for temporary files output by ISAS and ISLK.
ISAS and ISLK search for environment variables in the following order: ISTMP, TEMP, TMP. If these environment variables are not found, ISAS and ISLK will output temporary files in the current directory. Since the directory specified by this environment variable is only used temporarily, it is better to specify the directory where a RAM disk etc. is allocated in order to shorten the assembly and linking time.
For example, specify the following to set the output destination directory of the temporary file to the root directory of the D drive.
set istmp=d:\
Specifies the directory path where the ISAS.ISLK system files are stored.
If the system file ISAS.ISLK is not in the current directory, or the directory where these files are stored is not specified in the PATH command, ISAS or ISLK cannot be started normally. For example, when preparing these files in the ISAS directory of C drive, add "C:\ISAS" to the PATH command as follows.
path=%path%;c:\isas
For details on the PATH command, refer to the Windows 95, Windows NT, MS-DOS, or PC DOS manuals.
To develop a program using ISAS and ISLK, proceed as follows.
Create source file |
↓ |
Assembled by ISAS |
↓ |
Creating an object file |
↓ |
Link by ISLK |
↓ |
Creating an ISX file |
The source file is a text file that describes the program. Chapter 3 source file of the format of the program and in the reference, create it using a commercially available text editor.
Source files can be divided into one or more. Generally, except for creating a small program, create it by dividing it into multiple source files for each module.
The source file name can be any file name. However, ISAS considers the extension of source files as ".S" by default, so it is good to set the extension to ".S". By doing this, you do not need to specify the extension when starting ISAS. Of course, if you give a file name with an extension other than ".S", please also describe the extension in the source file name. The object files with the extension ".O" are output by default when assembling, and the ISX files with the extension ".ISX" are output by default when linking, so the extensions ".O" and ". It is better to give a file name other than ".ISX".
Assemble the user-created source file using ISAS. For details on how to use ISAS , refer to Chapter 6, Assembler (ISAS) .
When there are multiple source files, repeat this assembly process to assemble all the source files. If necessary, you can load another source file at the time of assembling with the LIB/FILE/INCLUDE pseudo instruction . In such cases, it is not necessary to assemble the source files to be read individually.
Upon successful completion of assembly, ISAS outputs the object file read by ISLK.
The object file created by ISAS is a temporary file with a default extension ".O" and an undefined external reference symbol value.
To solve this undefined value, link with ISLK.
Use ISLK to link one or more object files created by ISAS. For the usage of ISLK , refer to Chapter 7 Linker (ISLK) .
In the link processing, the external reference symbols that were undefined at the time of assembly are resolved, the object file is placed at the real address, and the ISX file is output.
The ISX file created by ISLK has the default extension ".ISX" and can be loaded by the debugger.
In addition to the program code, this ISX file contains the symbol information and range information necessary for symbolic debugging. The symbol information is the information that shows the address and data value of the symbol, and the range information is the information that shows the area where the data is defined, the accumulator, and the bit mode area of the index. With this information, you can perform symbolic debugging on the debugger.
In addition, since the debug information for source level debugging can be stored in the extended ISX file, reading this file enables source level debugging in the debugger.
This section explains the information required when changing from IS65 to ISAS.
When assembling a source file created for IS65 with ISAS, specify the -is65 option when starting ISAS . When this option is specified, ISAS can internally specify the following pseudo-instruction, and ISAS can assemble the file for IS65 normally.
opti 1; Absolutely prioritizes addressing when symbols are not resolved. ; In order of suit, direct, long isprefix; Use INTELLIGENT SYSTEMS for prefix onbankgroup; Bank address is included in the group designation offpolish; ignore operator precedence evalbits 16 ;Sets 16 valid bits during constant evaluation is65bin; Make parameter specification of BINSET pseudo-instruction compatible with IS65
For details of these quasi directives, refer to each quasi directive item in Chapter 5, Pseudo Instructions .
In order to use the ISAS function effectively, it is necessary to change the source file for ISAS. When changing the source file for IS65 for ISAS, pay attention to the following items and proceed.
IS65 evaluates expressions in order from the left regardless of operator precedence , whereas ISAS evaluates expressions according to operator precedence .
Since ISAS evaluates expressions in 32 bits, specify 16 in the EVALBITS directive when handling expressions as 16 bits .
By default, it is not necessary to assign a bank address to the group, so specify an address including the bank address with the ORG pseudo-instruction . If the ONBANKGROUP directive is specified, it can be specified in the same way as IS65.
If addressing is not specified, long addressing is determined by default. Also, since the operation is processed in 32 bits, even if the address processing has no effect on the IS65, the ISAS may affect the bank address. For example, lda #>label-1
Pay close attention to the calculation, as the result may be different from.
When the memory required to secure the symbols is insufficient, ISAS does not dynamically increase the memory, so increase the symbol table with the -s option . At this time, the larger the value in the specified symbol table and the more prime the value, the faster the assembly.
By default, error information is printed to standard output by default. Note that the ERRTAG pseudo-instruction can output error information to the specified file.
This section explains the information required when changing from ISDMG to ISAS.
When assembling a source file created for ISDMG with ISAS, specify the -isdmg option when starting ISAS . When this option is specified, ISAS can internally specify the following pseudo-instruction and ISAS can assemble the file for ISDMG normally.
isdmg; switch instruction set for DMG processor onbankgroup; Bank address is included in the group designation offpolish; ignore operator precedence evalbits 16 ;Sets 16 valid bits during constant evaluation
For details of these quasi directives, refer to each quasi directive item in Chapter 5, Pseudo Instructions .
In order to use the ISAS function effectively, it is necessary to change the source file for ISAS. When changing the source file for ISDMG for ISAS, pay attention to the following items and proceed.
ISDMG evaluates expressions from the left regardless of operator precedence , whereas ISAS evaluates expressions according to operator precedence .
When the memory required to secure the symbols is insufficient, ISAS does not dynamically increase the memory, so increase the symbol table with the -s option . At this time, the larger the value in the specified symbol table and the more prime the value, the faster the assembly.
By default, error information is printed to standard output by default. Note that the ERRTAG pseudo-instruction can output error information to the specified file.
The source file that can be assembled by ISAS must be described in the text file format in which CR (0DH) and LF (0AH) or only LF (0AH) is added at the end of each line.
The characters that can be used in the program in the source file are shown below.
English letters | A(41H) ~ Z(5AH) a(61H) ~ z(7AH) |
|
---|---|---|
Number | 0 (30H) ~ 9 (39H) | |
special character | Space (20H) ~ &(26H) ((28H) ~ /(2FH) :(3AH) ~ >(3EH) @(40H) ^(5EH) ~ _(5FH) | (7CH) ~(7EH) |
|
Control character | TAB(09H) CR(0DH) LF(0AH) |
|
Other | Characters with character codes other than the above can be described only within the character or character string (range enclosed in single or double quotes) and comment fields. |
In addition, the character code is shown in the parentheses in the above description.
The source file name can be any file name. However, ISAS considers the extension of source files as ".S" by default, so it is good to set the extension to ".S". This way, you do not need to specify the extension when starting ISAS. Of course, if you give a file name with an extension other than ".S", please also describe the extension in the source file name. The object files with the extension ".O" are output by default when assembling, and the ISX files with the extension ".ISX" are output by default when linking, so the extensions ".O" and ". Specify a file name other than ".ISX".
A source file line is divided into four fields: When writing a program, write according to each of these fields.
symbol lda $10; This is a test. ↑ ↑ ↑ ↑ ↑ Symbol Op-code Operand Comment
Field name | Description restrictions | |
---|---|---|
Symbol | Symbol field | From the first column up to 64 characters. |
Op-code | Opcode field | Up to 64 characters from the second column. |
Operand | Operand field | Up to 384 characters including the comment field from the second column. |
Comment | Comment field | Begins with a semicolon (;), can be from any column, up to 384 characters including the operand field. |
Not all of the above fields are required on one line in the source file. Also, when multiple fields exist on one line, separate each field with a space or tab. However, it doesn't matter if you don't insert a space or tab just before the comment field.
Up to 512 characters can be written in one line of the source file. However, if it is too long, it will be difficult to edit with an editor, so it is recommended to use a proper line break.
The part to be described from the first column is described, and the symbol name or macro name to be defined is described here. There are 64 characters in this symbol field, but note that the maximum number of characters that can be recognized as a symbol name is 32 for global symbols, 27 for local symbols, and 32 for macro names.
Immediately after the symbol, one colon (:) can be added to explicitly indicate that it is a symbol, but there is no functional difference from when the colon is not added. If a double colon is added immediately after the global symbol, it will be defined as an externally defined symbol and output to the ISX file as the symbol information required for symbolic debugging.
symbol1; normal symbol2:; normal symbol3::; Normal (judged as an externally defined symbol) symbol4; error (judged as opcode)
It should be noted that the symbol "Chapter 4, type" of " symbol ", "in the same chapter for the macro name name please refer to the item".
The part to be described for the first time from the second column onwards is shown, and the opcode, pseudo-instruction, and macro name for calling the macro are described. If a symbol is described in the symbol field, insert one or more tabs or spaces between the symbol field and opcode field.
rts; normal symbol rts; normal rts; error (judged not to be opcode but to symbol ;)
This field describes the operand for the operation code described in the operation code field, and the parameters for pseudo instructions and macros. Insert one or more tabs or spaces between the opcode field and the operand field.
lda #$10; normal lda#$10 ;Error (There is no delimiter between opcode and operand. ;)
This is a field for writing a comment. The comment field always begins with a semicolon (;) and extends to the end of the line. If a semicolon is surrounded by single quotation marks ('') or double quotation marks (" "), it is considered to be a character or a character string, so it must not be enclosed in them. Also, this field can start in any column.
This is a correct comment statement. lda #$10; This is also a valid comment statement. db "; This is data, not a comment."
Note that the TITLE directive cannot be commented on the line in which the TITLE directive is written because the parameter up to the end of the line in which the directive is written is used as a parameter .
There are global symbols that can be used globally and local symbols that can be used locally. The following characters can be used for these symbols: The character code is shown in parentheses.
English letters | A(41H) ~ Z(5AH) a(61H) ~ z(7AH) |
|
---|---|---|
Number | 0 (30H) ~ 9 (39H) | |
special character | $(24H) ?(3FH) @(40H) _(5FH) |
However, the first character of the symbol must be a letter, question mark (?), or underscore (_). Normally, if the first character of the symbol is an alphabetic character or question mark, it is judged as a global symbol, and if it is an underscore, it is judged as a local symbol. Up to 32 characters can be used for global symbols and 27 characters can be used for local symbols. Note that using a symbol that exceeds these characters will cause an error.
A symbol that is valid in all areas in the source file where the symbol is defined is called a global symbol. Also, by using pseudo instructions such as PUBLIC , EXTERN , GLOBAL , and PUBALL, you can refer to the symbol other than the source file in which the symbol is defined. Normally, a global symbol is defined at the start address and data area of a subroutine so that it can be easily referenced.
Global symbols start with a letter or a question mark by default and can be up to 32 characters long. However, the character specified as the prefix of the local symbol by the LPREFIX directive cannot be used.
For details on pseudo-instructions related to global symbols, see " PUBLIC ", " EXTERN ", " GLOBAL ", " PUBALL ", " PUBON ", " PUBOFF ", and " LPREFIX " in "Chapter 5 pseudo-instructions ". Please refer to each item.
A symbol that is valid only between the global symbol and the next global symbol is called a local symbol.
By default, local symbols start with an underscore, and you can write names up to 27 characters inclusive. The prefix indicating this local symbol can be changed to any letter or question mark by the LPREFIX directive . For details, refer to the " LPREFIX " item in "Chapter 5 Quasi-Instructions" .
Below is a simple example of using a local symbol.
aaa; Global symbol nop jp _xyz; Jump to local symbol 1 : _xyz; local symbol 1 ret : bbb; Global symbol nop jp _xyz; Jump to local symbol 2 : _xyz; Local symbol 2 ret ccc; Global symbol
In this example, local symbol 1 and local symbol 2 have the same name, but local symbol 1 is only valid between global symbols "aaa" and "bbb", and local symbol 2 is global symbols "bbb" and "ccc". Since it is valid between ", it can be assembled normally.
In this way, you can prevent shortage of the symbol area at the time of debugging by making the symbols that are not particularly necessary at the time of debugging local symbols.
The name has a macro name and a group name specified by the GROUP directive . The characters that can be used in the name are: The character code is shown in parentheses.
English letters | A(41H) ~ Z(5AH) a(61H) ~ z(7AH) |
|
---|---|---|
Number | 0 (30H) ~ 9 (39H) | |
special character | $(24H) ?(3FH) @(40H) _(5FH) |
The name can start with a letter, a question mark (?), or an underscore (_) and can be up to 32 characters long.
This section describes the numeric constants , floating-point constants , character constants , and string constants that you can use with ISAS .
Numeric constants can be handled in binary, octal, decimal, and hexadecimal formats. These formats can be specified by radix. To specify the radix of a numeric constant, write a radix character (radix operator) before or after the numeric constant.
In ISAS, when a radix operator is not added to a numeric constant, the numeric constant is usually treated as a decimal number. However, when the radix default value is changed by the RADIX directive , the specified radix value is referenced. When a radix operator is added to a numeric constant, the radix operator specification has priority regardless of the RADIX directive specification. It should be noted, RADIX directive For more information about, "Chapter 5, pseudo-instruction" of " RADIX please refer to the item".
radix | Prefix radix operator | Postfix radix operator | When ONCNUM directive is specified |
---|---|---|---|
Binary number | %10101100 | 10101100b | 0b10101100 |
Octal number | @one two Three | 123o | 0o123 |
Decimal number | 1234 | 1234d | 1234 |
Hexadecimal | $1234 | 1234h | 0x1234 |
After specifying the ONCNUM directive , constants can be written in C language like in addition to these specification methods. The radix operator may be written in either uppercase or lowercase.
Floating point constants can be used when using ISAS as the V810SF processor. When specifying a floating point constant, it is necessary to specify the ONCNUM pseudo instruction in advance . Immediately before the floating-point constant, write the radix operator 0f that represents the floating-point constant. Floating-point constants can be expressed in the following formats.
Numeric constants can have underscores (_) inserted in the middle of their numeric representation to improve readability. The underscore can be written anywhere within the numeric constant. For example, a binary numeric constant can be described in an easy-to-understand manner by separating each 4 bits with an underscore as follows.
lda #%0001001001001000 ;do not use delimiters lda #%0001_0010_0100_1000 ;Use delimiter
When specifying a hexadecimal numeric constant, if the first character of the numeric constant is a value from A to F and a postfix radix operator is added, 0 is added to the beginning of the numeric constant to clearly distinguish it from the symbol. Please attach. For example, depending on how 0 is added, whether to judge as a symbol or as a numerical constant changes as follows.
jmp abch; jump to symbol abch jmp 0abch ;jump to address 0abch
A character constant is a character enclosed by single quotes (''). A character constant can be specified as an operand of immediate addressing and a parameter of the DEFB/DB directive .
If you want to write a single quote in a character constant, write a single quote in succession.
db ``''
As a result, you can create the data "'".
A string constant is a string of two or more characters enclosed in double quotation marks (" "). A character string constant can be specified with the DEFB/DB directive parameter.
If you want to write double quotes in a character string constant, write double quotes consecutively.
db "This is ""test""."
As a result, you can create the data "This is a "test"."
ISAS provides a location counter that can obtain the address of the description position by writing an asterisk (*) instead of a constant. For example, to advance the location counter to address 6, use the ORG directive and an asterisk (*) to describe as follows.
org *+6 ;Advance location counter to address 6
When an asterisk (*) is written in the operand, the start address where the opcode for the operand is stored is acquired.
lda *; Get location counter
ISAS provides the following prefixes to support the special addressing of the 65816 processor. By writing these prefixes immediately before the symbol, you can specify specific addressing. There are two ways to specify the prefix, one for INTELLIGENT SYSTEMS and one for Western Design Center.
addressing | INTELLIGENT SYSTEMS | Western Design Center |
---|---|---|
direct | .(period) | < (less than sign) |
Absolute | !(Exclamation) | > (Greater than sign) |
long | ~(tilde) | ^ (Caret) |
When you use the prefix of INTELLIGENT SYSTEMS company ISPREFIX directive , and when you use the prefix of the Western Design Center company WDPREFIX directive Please specify. If you do not specify any pseudo-instruction, the prefix for INTELLIGENT SYSTEMS will be used. For details, refer to " ISPREFIX " and " WDPREFIX " in "Chapter 5 Quasi-Instructions" .
The 65816 processor manages pages with 256 bytes of memory as one page. Of these, 0 page (area from address 00H to FFH) is different from other pages, and the instruction to access this 0 page is generated as a 2-byte instruction. ISAS automatically determines the optimum instruction length by evaluating whether the address written in the operand is 0 page. However, for externally referenced symbols, ISAS cannot recognize whether the symbol is 0 page or not. In such a case, specify a prefix for direct addressing to clearly show that it is a 0-page symbol.
extern reg0; Cannot be automatically determined because it is externally referenced lda .reg0; Explicitly indicate that it is a page 0 symbol
In the item of direct addressing described above, in the ISAS, when the value of a symbol is 0 (00H) to 255 (FFH) in the 65816 processor, the object code is automatically set as direct addressing in the instruction that refers to the value of the symbol. I explained that to generate. However, if you want to generate an object code for absolute addressing even in such a case, specify the prefix for absolute addressing.
org $00 reg0 ds $01 ;0 page symbols lda !reg0; Absolute addressing specification
In the above example, the lda instruction originally outputs the object code of direct addressing, but since the prefix for absolute addressing is specified, the object code of absolute addressing is output.
The 65816 processor has a long addressing mode to access a memory area of 64 Kbytes or more. ISAS provides a prefix to specify this long addressing.
extern symbol lda ~ symbol; Specifying long addressing
ISAS provides the following various operators. Even if the operation results in overflow or underflow, it is ignored.
operator | function | Explanation |
---|---|---|
'b | Convert to 1 byte | When n'b, it takes the value of ((n)&$ff). |
'w | Convert to 2 bytes | When n'w, the value of ((n)&$ffff) is taken. |
'l | Convert to 4 bytes | When n'l, it takes the value of ((n)&$ffffffff). |
'lo | Get lower 2 bytes | When n'lo, it takes the value of (n)'w. |
'hi | Acquisition of upper 2 bytes | When n'hi, it takes the value of ((n)>>16)'w. |
'hi1 | Acquisition of upper 2 bytes + bit 15 | When n'hi1, it takes the value of (((n)>>16)'w+((n)>>15)&$1). |
The post-unary operators for'lo,'hi, and'hi1 are operators for the V810SF processor.
operator | function | Explanation |
---|---|---|
! | denial | When !n, it is false when n is true, and true when n is false. |
~ | One's complement | When ~n, n inverts 1 and 0 bit by bit. |
+ | Positive | +n takes a positive value for n. |
- | negative | When -n, it takes a negative value of n. |
: | Get high byte | When :n or ^n, it takes the value of ((n)>>16)'b. |
> | Get higher address | When >n, it takes the value of ((n)>>8)'b. For example, if >$1234, $12 is output as the result. |
< | Get lower address | When <n, it takes the value of (n)'b. For example, if <$1234, $34 is output as the result. |
operator | function | Explanation |
---|---|---|
* | Multiplication | When n1*n2, multiply n1 by n2. |
/ | division | When n1/n2, divide n1 by n2. |
% | Remainder calculation | When n1%n2, take the remainder of dividing n1 by n2. |
+ | Addition | When n1+n2, add n2 to n1. |
- | Subtraction | When n1-n2, subtract n2 from n1. |
: | bank | When n:m, it takes the value of ((n)<<16|(m)'w). For example, $80:$8000 indicates $8000 in the $80 bank. |
operator | function | Explanation |
---|---|---|
<< | Shift left | When n1<<n2, n1 is shifted left by n2 bits. When shifting, 0 is refilled from the lower bit. |
>> | Shift right | When n1>>n2, shifts n1 right by n2 bits. When shifting, 0 is refilled from the upper bit. |
operator | function | Explanation |
---|---|---|
< | small | True when n1 <n2 and n1 is less than n2. |
<= | Equal to or less than | True if n1<=n2 and n1 is less than or equal to n2. |
> | large | True when n1>n2 and n1 is greater than n2. |
>= | Equal to or greater than | True if n1>=n2 and n1 is greater than or equal to n2. |
== | equal | True if n1==n2 and n1 equals n2. |
!= | Not equal | True if n1!=n2 and n1 is not equal to n2. |
operator | function | Explanation |
---|---|---|
& | Bitwise AND | When n1&n2, the logical product (AND) of each bit of n1 and n2 is taken. |
^ | Bitwise exclusive OR | When n1^n2, bitwise exclusive OR (XOR) of n1 and n2 is taken. |
| | Bitwise OR | When n1|n2, the logical sum (OR) of each bit of n1 and n2 is taken. |
operator | function | Explanation |
---|---|---|
&& | Logical AND | When n1&&n2, it is true when both n1 and n2 are true, and false when either or both are false. |
|| | Logical sum | When n1||n2, it is true when n1 or n2 is true, and false when both are false. |
The operators have the precedence shown in the following table. There is also a combining rule that regulates the calculation direction when the priorities are the same.
Priority | operator | type | Join rule |
---|---|---|---|
1 | () | brackets | → |
2 | 'b'w'l'lo'hi'hi1 | Postfix unary operator | → |
3 | !~ + -: ^> < | Prefix unary operator | ← |
Four | */% | Binary operator | → |
Five | + -: | Binary operator | → |
6 | << >> | Shift operator | → |
7 | <<=> >= | Comparison operator | → |
8 | == != | Comparison operator | → |
9 | & | Bit operator | → |
Ten | ^ | Bit operator | → |
11 | | | Bit operator | → |
12 | && | Logical operator | → |
13 | || | Logical operator | → |
The "→" in the associative rule means that it is evaluated from left to right, and the "←" is evaluated from right to left. The post-unary operators for'lo,'hi, and'hi1 are exclusive to the V810SF processor.
You can use the following macro operators when defining and calling macros.
Macro operator | Explanation | Remarks |
---|---|---|
& | Concatenate arguments into a string | Used when defining macro |
! | Specifying a character literal | Used when defining macro |
% | Evaluation of actual argument | Used when defining macro |
<> | Explicit argument | Used when calling macro |
Concatenate the argument immediately after the upper sand (&) to the character string. Describe in the following format in the macro definition.
Below is an example of macro definition that uses & to define the symbol name arranged when the macro is expanded.
errmsg macro no,msg err&no db msg ;Specify concatenation of formal parameter no to character string err endm : errmsg 1,"Invalid format" ;Specify actual argument 1 to formal argument no errmsg 2,"Invalid data" ;Specify actual argument 2 for dummy argument no
Macros defined and called in this way are expanded to define new symbol names as follows.
err1 db "Invalid format" err2 db "Invalid data"
Specify a character literal. Describe in the following format in the macro definition.
For example, when you want to get the value of the upper 8 bits in the 65816 processor, use <, but when you want to specify the acquisition of the upper 8 bit value in the macro argument, you can use the character literal as follows to specify the actual argument. You can now use <.
test macro data lda #data endm : test !<symbol; Specify an argument that includes less than parentheses (<) lda #<sumbol; Macro expanded contents
The evaluated value of the actual argument is passed to the macro. Describe in the following format in the macro definition.
maxdata macro max ;macro definition db "Maximum No = %max" endm : maxno equ 1000 maxdata maxno ;macro call
Invoking such a macro will result in the following expansion:
db "Maximum No = $3e8"
The actual argument is made explicit and judged as one actual argument. When calling a macro, please describe according to the following format. Note that the outer <> indicates a macro operator.
For the actual argument given to the macro, the comma (,) is used to determine the separation of the actual argument. In addition, since the space () is determined as a field delimiter, you cannot specify a string containing these characters as an actual argument of the macro. In such a case, you can specify it as an actual argument by enclosing the character string in <> . Note that <> is removed when the actual argument is replaced by macro expansion .
Now, let's look at an example when a character string containing commas and spaces is specified as the actual argument of the macro as follows.
setstr macro str db "str" endm : setstr <INTELLIGENT SYSTEMS Co., Ltd.> setstr INTELLIGENT SYSTEMS Co., Ltd.
In the first macro call, the string is enclosed in <> , so it is expanded normally.
db "INTELLIGENT SYSTEMS Co., Ltd."
However, in the second macro call, we didn't enclose the string in <> , so the spaces were removed and the part after the comma wasn't expanded.
db "INTELLIGENTSYSTEMS Co."
The following pseudo-instructions can be used in ISAS. In addition to the following pseudo instructions, ISAS has pseudo instructions prepared as reserved words. This is a pseudo-instruction prepared for ensuring compatibility with IS65 and is ignored by ISAS. Of course, it has no adverse effect and no warning is output by default. However, if you specify the -w3 option when starting ISAS, the warning "[] Not yet support." is output. The pseudo instructions prepared as reserved words are IF1, IF2, KANJI, ERROR, NERROR, ONMEM, OFFMEM, FINAL, ON816, and OFF816.
This is a pseudo instruction that operates the location counter.
Pseudo instruction | Explanation |
---|---|
GROUP | Declare a group. |
ONBANKGROUP | Makes the location counter specified by the ORG directive belong to the bank group specified by the GROUP directive . |
OFFBANKGROUP | The location counter specified by the ORG directive does not belong to the current bank group. |
ORG | Specify the location counter with an absolute address. |
OFFSET | Specify the location counter with a relative address. |
EVEN | Aligns the location at assembly to a 2-byte boundary or 4-byte boundary. |
Pseudo-instruction related to symbol definition.
Pseudo instruction | Explanation |
---|---|
EQU | Define a value for the symbol. |
= | Define a value for the redefinable symbol. |
CAPSON | All alphabetic characters in the symbol are recognized as uppercase. (Default) |
CAPSOFF/SMALL | The lowercase letter and the uppercase letter are recognized as different characters for the alphabetic characters of the symbol. |
LPREFIX | Specify a prefix that indicates a local symbol. |
DEF | Define a string for the symbol. |
PUBLIC | Declare the symbol as externally defined. |
EXTERN | Declare the symbol as an external reference. |
GLOBAL | Declare the symbol as externally defined and externally referenced. |
LOCAL | Declare the symbol as internally defined. |
PUBALL | Declare all defined symbols in the source file as externally defined symbols. |
PUBON | The symbols defined after the PUBON directive are declared as externally defined symbols. |
PUBOFF | Undeclares the externally defined symbol specified by the PUBON directive . (Default) |
UNDEFEXT | Treat undefined symbols as external reference symbols. |
UNDEFERR | An error is output when an undefined symbol is found. (Default) |
Pseudo-instruction for allocating specific data or securing an area in memory.
Pseudo instruction | Explanation |
---|---|
DEFB/DB | Data is allocated to memory in 1-byte units. |
DEFH/DH | Data is allocated to memory in units of 2 bytes (lower byte, upper byte in this order). |
DEFW/DW | Data is allocated in memory in units of 2 bytes (lower byte first, upper byte in order) or 4 bytes (V810SF only). |
DEFD/DD | Data is allocated in memory in units of 2 bytes (upper byte, lower byte). |
DEFL/DL | Allocates data in memory in 3-byte units. |
DEFS/DS | Allocates an area of the specified size in memory. |
COMM | Allocate the shared area in memory. |
Pseudo-instruction for controlling ISAS.
Pseudo instruction | Explanation |
---|---|
END | Specifies the end of the program. |
ONRNG | Allows output of range information. (Default) |
OFFRNG | Prohibits output of range information. |
IS65 | Switch the instruction set for the 65816 processor. (Default) |
ISDMG | Switch the instruction set for the DMG processor. |
ISSFX | Switch the instruction set for the Super-FX processor. |
ISSND | Switch the instruction set for the SPC700 processor. |
ISV810 | Switch instruction set for V810SF processor. |
IS65BIN | Specify the parameters of the BINSET pseudo-instruction in the same way as the IS65 BINSET pseudo-instruction. |
ISASBIN | Uses the ISAS standard specification method for the parameter specification of the BINSET directive . (Default) |
LIB/FILE/INCLUDE | Inserts the specified source file at the position of the LIB/FILE/INCLUDE directive . |
BINSET | Specify the offset and size of the file to be read by the LIBBIN directive . |
LIBBIN | Inserts the specified binary file at the position of the LIBBIN directive . |
ONPOLISH | Evaluate expressions by operator precedence. |
OFFPOLISH | Expressions are evaluated from left to right, regardless of operator precedence. |
RADIX | Specify the radix when the radix operator is omitted in the constant. |
ONCNUM | Enables C language-like constant specification. |
OFFCNUM | Disables C language-like constant specifications. (Default) |
EVALBITS | Specifies the number of significant bits when evaluating a constant. |
MRADIX | Specify the radix when giving a numerical value using the macro operator % to the actual argument in the macro . |
Conditional directives are directives that specify whether to assemble a source file when a specific condition is met.
When writing a conditional pseudo instruction, be sure to write an ENDIF pseudo instruction that pairs with a pseudo instruction that begins with IF.
if flag; IF directive : endif; Be sure to write the ENDIF directive
When describing an ELSE pseudo-instruction, describe it between these pseudo-instructions.
if flag; IF directive : else ;ELSE directive is between the IF and ENDIF directives :; describe endif; ENDIF directive
You can also nest conditional directives.
if flag1; IF pseudo instruction if flag2; Nested IF pseudo-instruction : endif; Pairs with the second IF directive endif; Pairs with the first IF directive
Nesting can be written as long as the stack used by ISAS allows, that is, as long as no error is output during assembly.
Pseudo instruction | Explanation |
---|---|
IF/IFN | Evaluate when the assemble condition is true. |
IFE | Evaluate when the assembly condition is false. |
IFB | Evaluate when the assemble condition is blank. |
IFNB | Evaluate when the assemble condition is not blank. |
IFDEF | Evaluate when the assemble condition is defined. |
IFNDEF | Evaluate when the assemble condition is not defined. |
ELSE | Evaluate when the assemble condition of the pseudo instruction starting with IF is not evaluated. |
ENDIF | Ends the condition range specified by the pseudo instruction that begins with IF. |
A macro is a collection of a series of instructions. Also, registering a series of instructions in a macro is called macro definition, and the defined macro always has a name called macro name. By defining this macro name in the required place, you can easily expand the defined macro, so you can write a program with high visibility.
Pseudo instruction | Explanation |
---|---|
MACRO | Define a set of instructions in a macro. |
<macro name> | Macro Expands the defined macro. |
Pseudo-command for listing file output. Please note that the listing file will not be output if an error occurs during assembly.
Pseudo instruction | Explanation |
---|---|
PAGE | Specify the number of lines per page and the number of page breaks in the listing file. |
TITLE | Specify the header of each page of the listing file. |
LIST | Specify output to the listing file. (Default) |
NLIST | Suppress output to the listing file. |
DSPIF | Output all blocks of conditional directives to the listing file. (Default) |
NDSPIF | Only the blocks whose condition is true will be output to the listing file. |
DSPM | Output the contents of macro expansion to a listing file. (Default) |
NDSPM | Does not output the macro expansion contents to the listing file. |
ERRTAG | Output the error tag file. |
These pseudo-instructions are effective when ISAS is used as an assembler for the 65816 processor.
Pseudo instruction | Explanation |
---|---|
ASSUME | Notifies the assembler of the current DBR (data bank register) and DR (direct page register) values. |
ISPREFIX | Use the prefix for INTELLIGENT SYSTEMS. (Default) |
WDPREFIX | Use the prefix for Western Design Center. |
ON16A | Accumulator operations are processed in 16 bits. |
OFF16A | The operation of the accumulator is processed in 8 bits. (Default) |
ON16I | 16-bit index register operation is processed. |
OFF16I | The index register is processed with 8 bits. (Default) |
IF16A | Evaluate when the accumulator operation is in 16-bit mode. |
IFN16A | Evaluate when the accumulator operation is in 8-bit mode. |
IF16I | Evaluate when the operation of the index register is in 16-bit mode. |
IFN16I | Evaluate when the operation of the index register is in 8-bit mode. |
OPTI | Specify the operand length of the unresolved symbol when assembling the first pass. |
These pseudo-instructions are effective when ISAS is used as an assembler for the SPC700 processor. When using the SPC700 pseudo instruction , describe it after specifying the ISSND pseudo instruction .
Pseudo instruction | Explanation |
---|---|
ASSUME | Controls the direct page flag. |
These pseudo instructions are effective when ISAS is used as an assembler for the V810SF processor. When using the V810SF pseudo-instruction , describe it after specifying the ISV810 pseudo-instruction .
Pseudo instruction | Explanation |
---|---|
ASSUME | Notifies the assembler that offset calculation is performed for the displacement of the memory reference instruction. |
RSVREG | Specify whether V810SF instruction is expanded or not, and specify the general-purpose register used by the assembler when expanding the instruction. |
DECON | Informs the assembler that the conditional branch instruction will be expanded to a long branch. |
DECOFF | Cancels the specification of the DECON directive . (Default) |
function | Notifies the assembler of the current DBR (data bank register) and DR (direct page register) values. | |
Format |
ASSUME <DBR>[,DR] |
|
Explanation | The ASSUME pseudo-instruction enables the assembler to generate the minimum required addressing data when translating mnemonics such as data transfer instructions into machine language. For example, when translating an LDA instruction into a machine language, depending on the value of DBR and DR, it becomes an instruction of 2 bytes, 3 bytes or 4 bytes length, but this pseudo instruction can be set to the minimum required length. .. Specify the values of the data bank register and direct page register in <DBR> and [DR], respectively. [DR] can be omitted, and the value of DR is not changed at this time. |
|
reference | IS65 | |
Input example |
is65 assume $40,$0000; Specify $40 for DBR and $0000 for DR |
function | Controls the direct page flag. | |
Format |
ASSUME <P flag> |
|
Explanation | Specifies the value of the direct page flag in the program status word. A value of 0 or 1 can be specified for <P flag> . | |
reference | ISSND | |
Input example |
issnd assume 0; Specify 0 for direct page flag assume 1 ;Specify 1 for direct page flag |
function | Notifies the assembler that offset calculation is performed for the displacement of the memory reference instruction. | |
Format |
ASSUME <register>[,expression] |
|
Explanation | The memory reference instruction of the V810SF processor must give the displacement of a 16-bit value. Therefore, ISAS can automatically calculate the offset value using the ASSUME directive. When a symbol with an absolute address value is given to the displacement of a memory reference instruction (ld, st, in, out) and it is modified by the register specified by the ASSUME pseudo instruction, the expression defined by the ASSUME pseudo instruction from the symbol value. To calculate the offset address. For <register> , specify a character string reserved as a register or a register number. In [Expression], specify the runtime value of the <register> to be modified . For the value specified in this [expression], specify a value that can be resolved when assembling one pass. If it cannot be resolved at assembly time, it can be resolved at linking, but note that the instruction expansion generated at this time becomes redundant. For example, in the following description, the value of the expression has not been resolved when the ASSUME pseudo instruction is specified, so the ld.w instruction will expand redundantly. assume r4,abc; abc value is unresolved when ASSUME directive is specified abc equ 123 ;defines abc def equ 124 mov #abc,r4 ld.w def[r4],r2 To avoid such problems, describe the resolved expression when specifying the ASSUME directive as follows. abc equ 123 ;defines abc def equ 124 assume r4,abc; abc value is resolved when ASSUME directive is specified mov #abc,r4 ;mi ld.w def[r4],r2 If you want to cancel the specification of the ASSUME pseudo instruction, describe the ASSUME pseudo instruction without specifying [expression]. assume r4 ;Release r4 register ASSUME pseudo instruction | |
reference | ISV810 | |
Input example |
isv810 pubon DATA group org $05000000 base: symbol0:ds 4 symbol1:ds 4 TEXT group assume gp,base; ASSUME directive specification mov #base,gp; Assign base address to GP register ld.w symbol1[gp],r6; GP modified end If the ASSUME directive is not used, the ld.w instruction part must be described as follows, which makes the description complicated. ld.w #symbol1-base[zero],r6 When a pound sign (#) is added before the symbol, the symbol value is regarded as a constant and is not affected by the ASSUME directive. ld.w #symbol1[zero],r6 |
function | Specify the offset and size of the file to be read by the LIBBIN directive . | |
Format |
BINSET <offset>[,size] |
|
Explanation | Specifies the offset and size of the binary file read by the LIBBIN directive . For <offset> , specify the offset from the beginning of the binary file read by the LIBBIN directive . If a value greater than or equal to the file size is specified in <offset> , 0 is assumed to be specified in <offset> . In [Size], specify the read size of the binary file specified by the LIBBIN directive . If you specify 0 for [Size] or omit [Size], the file is read up to the end. However, if the IS65BIN pseudo-instruction is specified or the -is65 option is specified when ISAS is started, if 8000H bytes from <offset> or the size from <offset> of the binary file is less than 8000H bytes, <offset>. Read from to the end of the file. It should be noted, LIBBIN directive For more information about, " Chapter 5, pseudo-instruction " of " LIBBIN please refer to the item". |
|
reference | IS65BIN , ISASBIN , LIBBIN | |
Input example |
binset $0,$100; 100H bytes from the beginning of the binary file ; Specify to read minutes libbin char.bin; binary file to read |
function | The lowercase letter and the uppercase letter are recognized as different characters for the alphabetic characters of the symbol. | |
Format |
CAPSOFF Or SMALL |
|
Explanation | If the CAPSOFF directive or SMALL directive is specified, the uppercase and lowercase letters of the alphabetic part of the symbol are recognized as different characters. For example, the symbol name "ABC" and the symbol name "abc" are judged as different symbols. The CAPSOFF pseudo instruction and SMALL pseudo instruction differ only in spelling and the operation is the same. |
|
reference | CAPSON | |
Input example |
capsoff ABC ;Define the symbol name "ABC" : abc ;The symbol name "abc" is the symbol name "ABC" :; Since it is judged as a different symbol, :; no error occurs |
function | All alphabetic characters in the symbol are recognized as uppercase. (Default) | |
Format |
CAPSON |
|
Explanation | When the CAPSON pseudo-instruction is specified, the alphabetic part of the symbol is judged to be all uppercase, whether it is written in uppercase or lowercase. For example, the symbol name "ABC" and the symbol name "abc" are the same symbol. When neither the CAPSON pseudo-instruction nor the CAPSOFF/SMALL pseudo-instruction is specified, all the alphabetic characters of the symbol are judged as upper case, as when the CAPSON pseudo-instruction is specified. |
|
reference | CAPSOFF/SMALL | |
Input example |
capson ABC ;Define the symbol name "ABC" : abc ;Judge the symbol name "abc" as "ABC" :; causes an error |
function | Allocate the shared area in memory. | |
Format |
<name> COMM <size>[,alignment] |
|
Explanation | The area specified by the COMM directive is secured at the end of the group when linking. At this time, the area where the same <name> is specified in the same group by the COMM pseudo-instruction is judged to be the same and a shared area is secured. When the symbol indicating the area secured by the DEFS/DS directive is the same as <name> , this area is used and the COMM directive does not secure a new area. In this way, by using the COMM pseudo-instruction, memory can be used efficiently. Specify the symbol indicating the secured area in <name> and the size of the secured area in <size> in bytes. In [Alignment], enter the alignment value to relocate the secured area. Relocation means adjusting the specified area to be allocated from an even address or an address that is a multiple of 4. The COMM pseudo-instruction is an absolute location from the beginning of the group specified by the GROUP pseudo-instruction when linking. Relocate to. If you specify 2 for [Alignment], it will be relocated from an even numbered address, and if you specify 4 it will be relocated from an address that is a multiple of 4. If [Alignment] is omitted, relocation will not be performed. ISAS and ISLK do not check the size of the area shared by the COMM directive. Therefore, when the same <name> is specified in the COMM pseudo-instruction , or when the same <name> as the symbol indicating the area secured by the DEFS/DS pseudo -instruction is specified in the COMM pseudo-instruction, the size of each secured area Be careful to specify the same value for. |
|
reference | DEFS/DS | |
Input example |
Source file 1 work group temp comm 10,2 ;Securing shared area : Source file 2 work group temp comm 10,2 ;Securing shared area : In this example, the temp area specified in each file is judged as the same area, and only 10 bytes are reserved from the even address at the end of the work group. |
function | Cancels the specification of the DECON directive . (Default) | |
Format |
DECOFF |
|
Explanation | It cancels the specification of the DECON directive and notifies the assembler that instruction branching will not be performed so that a long branch is executed with a conditional branch instruction. If a conditional branch instruction after this pseudo instruction is used to branch from -256 to a relative address exceeding 255, or if the branch destination address is unknown in the first pass, the instruction expansion is not performed and "Out The error "of range.[] (range over. Unable to reach target address. [])" is output. If the DECON pseudo instruction or DECOFF pseudo instruction is not specified, the instruction is not expanded by default. |
|
reference | ISV810 , DECON | |
Input example |
isv810 decon branch : decoff; Cancels the specification of the DECON directive |
function | Informs the assembler that the conditional branch instruction will be expanded to a long branch. | |
Format |
DECON BRANCH |
|
Explanation | In the V810SF conditional branch instruction, only 9-bit displacement can be specified for the operand. By specifying the DECON directive, the instruction will be expanded when branching from -256 to a relative address exceeding 255, or when the branch destination address is unknown in the first pass. For example, the BGT instruction is expanded as follows. bgt abc ↓ ble _skip jr abc _skip: If a period (.) prefix is added before the symbol, instruction expansion will not be performed. |
|
reference | ISV810 , DECOFF | |
Input example |
isv810 decon branch; Specifies instruction expansion in conditional branch instruction |
function | Define a string for the symbol. | |
Format |
<name> DEF <string> |
|
Explanation | Defines the character string specified in <character string> in the symbol specified in <name> . Since <character string> regards the end of the line or the comment field as a character string, you can insert spaces or tabs in the middle of the character string. The DEF directive expands <string> when the defined <name> is referenced . In the EQU directive and = directive, it is necessary to define a known value for the symbol, but in the DEF directive it is sufficient if the symbol in <character string> is known at the time of expansion. Can be used for column> . Also, <name> can be redefined. For example, if the V810SF register name is defined as a symbol using the DEF pseudo-instruction as in the following input example, the readability of the program will be high and the modification will be easy. The symbol defined by the DEF directive can be used only in the opcode field and operand field. |
|
Input example |
_ram def r10 ;defines the string r10 to the symbol _ram push _ram; Expanded to "push r10" when assembling : _ram def r11 ;redefines the string r11 to the symbol _ram push _ram; Expanded to "push r11" when assembling |
function | Data is allocated to memory in 1-byte units. | |
Format |
DEFB <expression> [,expression] ... [,expression] Or DB <expression> [,expression] ... [,expression] |
|
Explanation | <expression> can be any constant, character, or string. The contents of <expression> are arranged in memory starting from the first data. When giving multiple <expressions> , separate each <expression> with a comma (,). The DEFB directive and the DB directive differ only in spelling and the operation is the same. |
|
reference | DEFH/DH , DEFW/DW , DEFD/DD , DEFL/DL | |
Input example |
defb $10; constant defb'a'; character defb "TEST"; string |
function | Data is allocated in memory in units of 2 bytes (upper byte, lower byte). | |
Format |
DEFD <expression> [,expression] ... [,expression] Or DD <expression> [,expression] ... [,expression] |
|
Explanation | 2 bytes of data can be given to <expression> , and the upper byte and the lower byte are arranged in memory in this order. The order of data to be allocated in memory is different from that of the DEFW/DW pseudo-instruction described above. When giving multiple <expressions> , separate each <expression> with a comma (,). The DEFD directive and DD directive differ only in spelling and the operation is the same. |
|
reference | DEFB/DB , DEFH/DH , DEFW/DW , DEFL/DL | |
Input example |
defd $1234; 12H and 34H are arranged in memory in this order. |
function | Data is allocated to memory in units of 2 bytes (lower byte, upper byte in this order). | |
Format |
DEFH <expression> [,expression] ... [,expression] Or DH <expression> [,expression] ... [,expression] |
|
Explanation | 2 bytes of data can be given to <expression> , and the lower byte and the upper byte are arranged in memory in this order. When giving multiple <expressions> , separate each <expression> with a comma (,). When assembling for the V810SF processor, the DEFW/DW pseudo instruction allocates data in memory in 4-byte units, so use this DEFH/DH pseudo-instruction when you want to allocate data in 2-byte units. The DEFH directive and the DH directive differ only in spelling and the operation is the same. |
|
reference | DEFB/DB , DEFW/DW , DEFD/DD , DEFL/DL | |
Input example |
defh $1234; 34H and 12H are arranged in the order of memory. |
function | Allocates data in memory in 3-byte units. | |
Format |
DEFL <expression> [,expression] ... [,expression] Or DL <expression> [,expression] ... [,expression] |
|
Explanation | 3 bytes of data can be given to <expression> , and they are arranged in memory in order from the lower byte to the upper byte. When giving multiple <expressions> , separate each <expression> with a comma (,). The DEFL directive and the DL directive differ only in spelling and the operation is the same. |
|
reference | DEFB/DB , DEFH/DH , DEFW/DW , DEFD/DD | |
Input example |
defl $123456; 56H, 34H, 12H are arranged in the order of memory. |
function | Allocates an area of the specified size in memory. | |
Format |
DEFS <size>[,expression] Or DS <size>[,expression] |
|
Explanation | Reserve an area of the size specified by <size> in the part where the DEFS/DS directive is written. For <size> , specify the size of the secured area in bytes. In [Expression], specify 1-byte data to be set in the reserved area. If [expression] is omitted, advance only the location counter. The DEFS directive and the DS directive differ only in spelling and the operation is the same. |
|
reference | COMM | |
Input example |
defs $10; Allocates 10 Hbyte area defs $20,$ff; Secures an area of 20H bytes and saves FFH data. :; |
function | Data is allocated in memory in units of 2 bytes (lower byte first, upper byte in order) or 4 bytes (V810SF only). | |
Format |
DEFW <expression> [,expression] ... [,expression] Or DW <expression> [,expression] ... [,expression] |
|
Explanation | When assembling for a processor other than V810SF, 2 bytes of data can be given to <expression> , and the lower byte and the upper byte are arranged in memory in this order. The order of allocating data in the memory is different from that of the DEFD/DD pseudo instructions described below. Also, when assembling for the V810SF processor, 4 bytes of data can be given, and they are arranged in memory in order from the lower byte. When giving multiple <expressions> , separate each <expression> with a comma (,). The DEFW directive and DW directive differ only in spelling, and the operation is the same. |
|
reference | DEFB/DB , DEFH/DH , DEFD/DD , DEFL/DL | |
Input example |
defw $1234; 34H and 12H are arranged in memory in this order. isv810 defw $12345678; 78H, 56H, 34H, 12H in this order in memory :; Place (at V810SF) |
function | Output all blocks of conditional directives to the listing file. (Default) | |
Format |
DSPIF |
|
Explanation | Output the contents of all blocks described in the conditional directive to the listing file. This directive is used to cancel the conditional output to the listing file specified by the NDSPIF directive . If neither DSPIF pseudo-instruction nor NDSPIF pseudo-instruction is specified, all blocks of the conditional pseudo-instruction are output to the listing file in the same way as when the DSPIF pseudo-instruction is specified. |
|
reference | NDSPIF | |
Input example |
dspif if 1 :; Output to listing file else :; Output to listing file endif |
function | Output the contents of macro expansion to a listing file. (Default) | |
Format |
DSPM |
|
Explanation | When the macro is called, the expanded contents of the macro are also output to the listing file. If you do not want to output the contents of macro expansion to the listing file, specify the NDSPM directive . If neither DSPM pseudo-instruction nor NDSPM pseudo-instruction is specified, the macro expansion contents are output to the listing file in the same way as when the DSPM pseudo-instruction is specified. |
|
reference | NDSPM | |
Input example |
sample macro ;macro lda #$10 endm : dspm ;Specify listing output of macro expansion contents sample; Macro expansion When assembling such a program, the following is output to the listing file. sample.s 94-01-01 00:00:00......PAGE 0001 LINE# LOC CODE LINE 5:00000000 sample macro 6:00000000 lda #$10 7:00000000 endm 8:00000000 9:00000000 dspm 10:00000000 sample 10:00000000 A910 1 lda #$10 |
function | Evaluate when the assemble condition of the pseudo instruction starting with IF is not evaluated. | |
Format |
ELSE |
|
Explanation | When the assemble condition of the pseudo instruction starting with IF described before the ELSE pseudo instruction is not evaluated , the blocks up to the next ENDIF pseudo instruction are assembled. The ELSE pseudo-instruction must be written between the pseudo-instruction starting with IF and the ENDIF pseudo-instruction . if <condition> :; Assemble when the assemble condition is evaluated : ;Bull else; Described between the IF and ENDIF directives :; If the assembly condition is not evaluated, :; be tumbled endif |
|
reference | IF/IFN , IFE , IFB , IFNB , IFDEF , IFNDEF , ENDIF | |
Input example |
ifn 1; IFN pseudo-instruction assemble condition is true lda #$10; This part will be assembled else lda #$20; this part is not assembled endif |
function | Specifies the end of the program. | |
Format |
END |
|
Explanation | ISAS assembles up to the END directive and does not assemble after the END directive. Normally, the END directive is written at the end of the source file. If the END directive is not written, the source file will be assembled to the end. |
|
Input example |
: rts end; End of source file |
function | Ends the condition range specified by the pseudo instruction that begins with IF. | |
Format |
ENDIF |
|
Explanation | After writing a directive that starts with IF, be sure to write a paired ENDIF directive. |
|
reference | IF/IFN , IFE , IFB , IFNB , IFDEF , IFNDEF , ELSE | |
Input example |
ifn 1; IFN pseudo-instruction lda #$00 endif; specifies the end of the assembly range |
function | Define a value for the symbol. | |
Format |
<name> EQU <expression> |
|
Explanation | <Name> <expression> symbol described in the portion of those assigned the value of the after-defined <name> by reference, the <expression> can obtain the value of. Note that the EQU directive cannot redefine <name> , but the = directive can redefine <name> . |
|
reference | = | |
Input example |
sample equ $10; Assign $10 to the symbol name sample Load lda #sample; 10H into register sample equ $20; error occurs because it cannot be redefined |
function | Output the error tag file. | |
Format |
ERRTAG |
|
Explanation | The message displayed on the screen when an error or warning occurs during assembly is also output to a file. This error tag file will be created in the same directory as the source file, with the file name with the extension of the source file name changed to ".ERR". |
|
Input example |
errtag ;Error tag file output specification bank group org $0 lda symbol; error occurs here end When assembling such a program, the following is output to the error tag file. test.s (4): ERROR Undefined symbol.[SYMBOL] fatal errors = 1 |
function | Specifies the number of significant bits when evaluating a constant. | |
Format |
EVALBITS <expression> |
|
Explanation | EVALBITS pseudo-instruction is a pseudo-instruction prepared for compatibility with IS65. The IS65 processes the effective number of bits of a constant at 16 bits while the ISAS processes it at 32 bits when performing arithmetic processing. For example, in address calculation, the IS65 did not affect the bank, but the ISAS affects the bank. In <expression> , specify the number of valid bits when evaluating a constant with a value from 0 to 32. Note that if you specify the -is65 option when ISAS is started, it will be EVALBITS 16, and if you do not specify the -is65 option , it will be EVALBITS 32. Therefore, it is usually not necessary to specify this directive. |
|
Input example |
is65 evalbits 16; Evaluate constants in 16 bits |
function | Align the assembling location on a 2-byte, 4-byte, 8-byte, 16-byte, 32-byte, or 64-byte boundary. | |
Format |
EVEN [expression] |
|
Explanation | The code or data location described immediately after the EVEN directive is aligned (aligned) with the boundary of 2 bytes, 4 bytes, 8 bytes, 16 bytes, 32 bytes, or 64 bytes. The EVEN directive is placed from the boundary specified for the relative location from the beginning of the group specified by the GROUP directive when assembling . Therefore, it is necessary to write the EVEN pseudo instruction immediately after writing the GROUP pseudo instruction . Note that if the GROUP directive is not described before the EVEN directive, the error "Undefined group." will occur. text group; GROUP directive specified even 4; Direct the EVEN directive immediately after the GROUP directive. Constant If an absolute address is specified by the ORG directive , it will be allocated to the location from that specified address. For Expression, specify a value of 2, 4, 8, 16, 32, or 64. Indicates that they are allocated from the boundaries of 2 bytes, 4 bytes, 8 bytes, 16 bytes, 32 bytes, and 64 bytes, respectively. A 2-byte boundary is allocated from an even address, and a 4-byte boundary is allocated from a multiple address of the specified number of bytes, such as from a multiple of 4 address. If [Expression] is omitted, it will be aligned from the 2-byte boundary in the same way as when 2 is specified. When an instruction that has been placed from an alignment other than the one specified by this pseudo instruction is relocated, the 00H code is inserted immediately before the instruction. |
|
reference | GROUP , ORG | |
Input example |
test group org $8000 db $00 ;1 byte data even 2; Arrangement specification on 2-byte boundary :; This instruction is relocated from an even address : ;Ru |
function | Declare the symbol as an external reference. | |
Format |
EXTERN <name> [,name] ... [,name] |
|
Explanation | Informs the assembler that the symbol referenced in the source file is defined in another source file. In <name> , describe the symbol name to be externally referenced. When giving multiple <names> , separate each <name> with a comma (,). |
|
reference | PUBLIC , PUBALL , PUBON , PUBOFF , GLOBAL , LOCAL | |
Input example |
Source file 1 public sample ;The defined symbol sample is accessed externally. :; declare externally defined symbol to be illuminated sample ds $55 Source file 2 extern sample; The referenced symbol sample is set externally. :; declare external reference symbol because it is defined lda sample |
function | Declare the symbol as externally defined and externally referenced. | |
Format |
GLOBAL <name>[,name] ... [,name] |
|
Explanation | Tells the assembler that a symbol defined or referenced in a source file is defined or referenced in another source file. For <name> , describe the symbol name that is externally defined or externally referenced. When giving multiple <names> , separate each <name> with a comma (,). Unlike the PUBLIC and EXTERN directives , this GLOBAL directive does not need to be used for external definition/reference, so it can be easily described. |
|
reference | PUBLIC , PUBALL , PUBON , PUBOFF , EXTERN , LOCAL | |
Input example |
Source file 1 global symbol,buf; collectively declares external definitions and external references symbol ;defines a symbol lda buf; see symbol Source file 2 global symbol,buf jsr symbol; see symbol : buf db $10 ;define symbol |
function | Declare a group. | |
Format |
<name> GROUP [expression] |
|
Explanation | A group is a unit that combines any programs. One group corresponds to one bank, and when linked, each group with the same name will be placed in a specific bank. For <name> , specify the group name. In [Expression], specify the bank address to allocate the group only when the ONBANKGROUP directive is specified. When the ONBANKGROUP directive is specified, the group is assigned to the bank address specified in [Expression]. If [expression] is omitted, it is regarded as 0 bank address. When the OFFBANKGROUP directive is specified, it is not necessary to specify [Expression]. The bank address is the address specified by the ORG directive . The GROUP directive is a directive that defines to which group the module divided for each source file is assigned. Write it at the beginning of each source file or where you want to divide the module for each module. |
|
reference | ONBANKGROUP , OFFBANKGROUP , ORG | |
Input example |
onbankgroup ;ONBANK GROUP designation bank7 group 7 ;Assign module to group name "bank7" : ;Ke, arrange in 7 banks : offbankgroup ;OFFBANK GROUP specification bank8 group; Specify only group name org 8:8000; Place at address 8000H in 8 banks |
function | Evaluate when the assemble condition is true. | |
Format |
IF <expression> Or IFN <expression> |
|
Explanation | When the <expression> of the assemble condition is true, that is, when the value of <expression> is not 0, the block up to the next ELSE directive or ENDIF directive is assembled. The IF directive and IFN directive differ only in spelling and the operation is the same. |
|
reference | IFE , IFB , IFNB , IFDEF , IFNDEF , ELSE , ENDIF | |
Input example |
if 1; Assemble because the assemble condition is true lda #$00; endif if 0; Assemble because the assemble condition is false sta #$00 endif |
function | Evaluate when the accumulator operation is in 16-bit mode. | |
Format |
IF16A |
|
Explanation | When the operation of the accumulator is in 16-bit mode by the ON16A pseudo instruction, the next ELSE pseudo instruction or ENDIF pseudo instruction is assembled. The ENDIF pseudo instruction is always required after the IF16A pseudo instruction description . |
|
reference | IS65 , ON16A , OFF16A , ON16I , OFF16I , IFN16A , IF16I , IFN16I | |
Input example |
is65 on16a; finger for 16-bit mode of accumulator :; Constant if16a ;As ON16A pseudo instruction is specified, lda srcbuf; is processed sta destbuf endif |
function | Evaluate when the operation of the index register is in 16-bit mode. | |
Format |
IF16I |
|
Explanation | When the index register is operated in 16-bit mode by the ON16I pseudo instruction , the next ELSE pseudo instruction or ENDIF pseudo instruction is assembled. The ENDIF pseudo instruction is always required after the IF16I pseudo instruction description . |
|
reference | IS65 , ON16A , OFF16A , ON16I , OFF16I , IF16A , IFN16A , IFN16I | |
Input example |
is65 on16i; 16-bit mode of index register :; specification if16i ;As the ON16I pseudo instruction is specified, ldx srcbuf; is processed stx destbuf endif |
function | Evaluate when the assemble condition is blank. | |
Format |
IFB <<expression>> (outer <> is required) |
|
Explanation | When the <<expression>> of the assemble condition is blank, the block up to the next ELSE directive or ENDIF directive is assembled. This directive is used to control conditional assembly within the macro definition. <<expression>> must be one of the names of the formal parameters declared in the macro definition. When <<expression>> passed at macro expansion is blank, that is, when no argument is passed, the block is macro expanded. |
|
reference | IF/IFN , IFE , IFNB , IFDEF , IFNDEF , ELSE , ENDIF | |
Input example |
test macro flag ifb <flag> ; Assemble when parameter is blank lda #$10 ;specify endif endm : test ;assembled because the argument is blank test 1 ;assembled because the argument is not blank : ; Absent |
function | Evaluate when the assemble condition is defined. | |
Format |
IFDEF <symbol> |
|
Explanation | When the <symbol> of the assemble condition is already defined, the block up to the next ELSE directive or ENDIF directive is assembled. |
|
reference | IF/IFN , IFE , IFB , IFNB , IFNDEF , ELSE , ENDIF | |
Input example |
symbol ifdef symbol; because the symbol name symbol is defined lda #$00; will be assembled endif |
function | Evaluate when the assembly condition is false. | |
Format |
IFE <expression> |
|
Explanation | When the <expression> of the assemble condition is false, that is, when the value of <expression> is 0, the block up to the next ELSE directive or ENDIF directive is assembled. |
|
reference | IF/IFN , IFB , IFNB , IFDEF , IFNDEF , ELSE , ENDIF | |
Input example |
ife 0; Assemble because the assemble condition is false lda #$00; endif ife 1; Assemble because the assemble condition is true sta #$00 endif |
function | Evaluate when the accumulator operation is in 8-bit mode. | |
Format |
IFN16A |
|
Explanation | When the operation of the accumulator is in 8-bit mode due to the OFF16A directive specified or the ON16A directive not specified, the next ELSE directive or ENDIF directive is assembled. The ENDIF pseudo instruction is always required after the IFN16A pseudo instruction description . |
|
reference | IS65 , ON16A , OFF16A , ON16I , OFF16I , IF16A , IF16I , IFN16I | |
Input example |
is65 off16a ;Specify 8-bit mode of accumulator ifn16a ;OFF16A pseudo instruction is specified, lda srcbuf ;assembled sta destbuf endif |
function | Evaluate when the operation of the index register is in 8-bit mode. | |
Format |
IFN16I |
|
Explanation | If the OFF16I directive is not specified or the ON16I directive is not specified and the index register operation is in 8-bit mode, the next ELSE directive or ENDIF directive is assembled. Note that the ENDIF pseudo instruction is always required after the IFN16I pseudo instruction description . |
|
reference | IS65 , ON16A , OFF16A , ON16I , OFF16I , IF16A , IFN16A , IF16I | |
Input example |
is65 off16i; Index register 8-bit mode : ;Specify ifn16i ;OFF16I pseudo-instruction is specified. ldx srcbuf; Assembled stx destbuf endif |
function | Evaluate when the assemble condition is not blank. | |
Format |
IFNB <<character>> (the outer <> is required) |
|
Explanation | If the <<expression>> of the assemble condition is not blank, the block up to the next ELSE directive or ENDIF directive is assembled. This directive is used to control conditional assembly within the macro definition. <<expression>> must be one of the names of the formal parameters declared in the macro definition. When <<expression>> passed at macro expansion is not blank, that is, when the argument is passed, the block is macro expanded. |
|
reference | IF/IFN , IFE , IFB , IFDEF , IFNDEF , ELSE , ENDIF | |
Input example |
test macro flag ifnb <flag> ; Assemble when the parameter is not blank lda #$10; specified as endif endm : test; argument will be blank and will not assemble test 1 ;assembled because the argument is not blank : ;Ru |
function | Evaluate when the assemble condition is not defined. | |
Format |
IFNDEF <symbol> |
|
Explanation | When the <symbol> of the assemble condition is not yet defined , the block up to the next ELSE directive or ENDIF directive is assembled. |
|
reference | IF/IFN , IFE , IFB , IFNB , IFDEF , ELSE , ENDIF | |
Input example |
ifndef symbol; the symbol name symbol is not defined Assembled with lda #$00; endif |
function | Switch the instruction set for the 65816 processor. (Default) | |
Format |
IS65 |
|
Explanation | 65816 Specify when using ISAS for the processor. If the IS65, ISDMG , ISSFX , ISSND , and ISV810 pseudo-instructions are not specified, ISAS functions as an assembler for the 65816 processor. |
|
reference | ISDMG , ISSFX , ISSND , ISV810 | |
Input example |
is65 :; 65816 Describe the processor instruction |
function | Specify the parameters of the BINSET pseudo-instruction in the same way as the IS65 BINSET pseudo-instruction. | |
Format |
IS65BIN |
|
Explanation | ISAS of BINSET directive , the following LIBBIN directive by the designation of BINSET pseudo-instruction parameters are cleared. In contrast, the IS65 BINSET pseudo-instruction reflects the parameter value in the LIBBIN pseudo-instruction until the BINSET pseudo-instruction is specified again. In this way, the ISAS and IS65 BINSET pseudo-instructions have different functions, but by specifying the IS65BIN pseudo-instruction, they can be made to function in the same way as the IS65 BINSET pseudo-instruction. This pseudo-instruction is specified only when the source file created for IS65 is assembled by ISAS. However, if the -is65 option is specified when ISAS is started , the IS65BIN pseudo instruction is automatically specified, so it is unlikely that you will normally specify this pseudo instruction. |
|
reference | BINSET , ISASBIN | |
Input example |
is65bin; Makes the BINSET pseudo-instruction the same as the IS65 BINSET pseudo-instruction binset $100,$200; libbin sample1.bin ;Read $200 bytes from file offset $100 libbin sample2.bin; Read $200 bytes from file offset $100 |
function | Uses the ISAS standard specification method for the parameter specification of the BINSET directive . (Default) | |
Format |
ISASBIN |
|
Explanation | ISAS of BINSET directive , the following LIBBIN directive by the designation of BINSET pseudo-instruction parameters are cleared. In contrast, the IS65 BINSET pseudo-instruction reflects the parameter value in the LIBBIN pseudo-instruction until the BINSET pseudo-instruction is specified again. In this way, the ISAS and IS65 BINSET directives have different functions, but when the ISASBIN directive is specified or the IS65BIN directive is not specified, it can function as the standard ISAS BINSET directive . |
|
reference | BINSET , IS65BIN | |
Input example |
isasbin; Makes the BINSET directive an ISAS standard function binset; libbin sample1.bin ;Read $200 bytes from file offset $100 libbin sample2.bin; Read file size from file offset 0 |
function | Switch the instruction set for the DMG processor. | |
Format |
ISDMG |
|
Explanation | Specify when using ISAS for DMG processor. However, if you specify the -isdmg option when starting ISAS , the ISDMG directive will automatically be specified. Therefore, by assembling the source file for ISDMG with ISAS, by specifying the -isdmg option , it is possible to assemble the source file without additional editing of the ISDMG directive. If IS65 , ISDMG, ISSFX , ISSND , and ISV810 directives are not specified, ISAS acts as an assembler for the 65816 processor. |
|
reference | IS65 , ISSFX , ISSND , ISV810 | |
Input example |
isdmg :; Describe the instruction for DMG processor |
function | Use the prefix for INTELLIGENT SYSTEMS. (Default) | |||||||
Format |
ISPREFIX |
|||||||
Explanation |
The prefix for INTELLIGENT SYSTEMS is used as a prefix to make direct addressing, absolute addressing, and long addressing explicit. Specific addressing can be specified by writing the following prefix immediately before the symbol.
If neither the ISPREFIX pseudo instruction nor the WDPREFIX pseudo instruction is specified, the prefix for INTELLIGENT SYSTEMS will be used. |
|||||||
reference | IS65 , WDPREFIX | |||||||
Input example |
is65 extern reg0, symbol isprefix lda .reg0; Direct addressing lda !reg0; Absolute addressing lda ‾ symbol; long addressing |
function | Switch the instruction set for the Super-FX processor. | |
Format |
ISSFX |
|
Explanation | Specify when using ISAS for Super-FX processor. When IS65 , ISDMG , ISSFX, ISSND , and ISV810 pseudo-instructions are not specified, ISAS functions as an assembler for the 65816 processor. |
|
reference | IS65 , ISDMG , ISSND , ISV810 | |
Input example |
issfx : ;Write Super-FX processor instructions |
function | Switch the instruction set for the SPC700 processor. | |
Format |
ISSND |
|
Explanation | Specify when using ISAS for SPC700 processor. When IS65 , ISDMG , ISSFX , ISSND, and ISV810 pseudo-instructions are not specified, ISAS functions as an assembler for the 65816 processor. |
|
reference | IS65 , ISDMG , ISSFX , ISV810 | |
Input example |
issnd : ;Write instructions for SPC700 processor |
function | Switch instruction set for V810SF processor. | |
Format |
ISV810 |
|
Explanation | Specify when using ISAS for V810SF processor. Note that if the IS65 , ISDMG , ISSFX , ISSND , and ISV810 pseudo-instructions are not specified, ISAS acts as an assembler for the 65816 processor. |
|
reference | IS65 , ISDMG , ISSFX , ISSND | |
Input example |
isv810 : ;Write instructions for V810SF processor |
function | Inserts the specified source file at the position of the LIB/FILE/INCLUDE directive. | |
Format |
LIB <filename> Or FILE <file name> Or INCLUDE <file name> |
|
Explanation |
The source file specified by <file name> is inserted at the position of the LIB/FILE/INCLUDE directive and assembled. In <file name> , specify the file name of the source file to read. You can add a drive or directory to this file name. If the extension of <file name> is omitted, ISAS considers it as the file name with the extension ".S" added. If the specified source file cannot be found, ISAS searches the source files sequentially according to the following order.
The LIB directive, FILE directive, and INCLUDE directive differ only in spelling, and the operation is the same. |
|
reference | LIBBIN | |
Input example |
lib sample.s ;Insert sample.s file in source |
function | Inserts the specified binary file at the position of the LIBBIN directive. | |
Format |
LIBBIN <file name> |
|
Explanation |
Reads the binary file specified by <file name> into the position of the LIBBIN directive. For <filename> , specify the filename of the binary file to read. You can add a drive or directory to this file name. If the extension of <file name> is omitted, ISAS considers it as the file name with the extension ".BIN" added. If the specified binary file cannot be found, ISAS searches sequentially for binary files according to the following order.
If the BINSET pseudo-instruction is specified immediately before, it will be read according to the parameter specified by the pseudo-instruction. Once the LIBBIN pseudo-instruction is used, the BINSET pseudo-instruction parameters are cleared (offset = 0, size = binary file size). If the BINSET directive is not specified immediately before, it will be read with the same parameters as in the clear state. |
|
reference | BINSET , LIB/FILE/INCLUDE | |
Input example |
binset $100; From the beginning +100H of the binary file Read all the rest libbin char.bin; binary file to be loaded |
function | Specify output to the listing file. (Default) | |
Format |
LIST |
|
Explanation | The contents described after the LIST directive are output to the listing file. This directive is used to cancel the output suppression to the listing file specified by the NLIST directive . If neither the LIST directive nor the NLIST directive is specified, the contents of the program will be output to the listing file as if the LIST directive was specified. |
|
reference | NLIST | |
Input example |
nlist; Prohibit output to listing file :: This part does not appear in the listing file :; not supported list; Allow output to listing file :; This part does not appear in the listing file :; Forced |
function | Declare the symbol as internally defined. | |
Format |
LOCAL <name>[,name] ... [,name] |
|
Explanation | Informs the assembler that the symbol is valid only in the source file in which the LOCAL directive is declared. In <name> , describe the internally defined symbol name. When giving multiple <names> , separate each <name> with a comma (,). There is no problem in internally defining a symbol with the same name as a symbol declared as an internal definition by the LOCAL directive in another source file. If it is described in the macro definition, it will be declared as a valid symbol only in that macro. |
|
reference | PUBLIC , PUBALL , PUBON , PUBOFF , EXTERN , GLOBAL | |
Input example |
Source file 1 local symbol; valid only in source file 1 symbol : jsr symbol Source file 2 local symbol; valid only in source file 2 symbol : jsr symbol |
function | Specify a prefix that indicates a local symbol. | |
Format |
LPREFIX <character> |
|
Explanation | ISAS normally considers a symbol starting with an underscore (_) character (this character is called a prefix) as a local symbol. The LPREFIX directive can change the prefix indicating this local symbol to a different character. For <character> , specify an alphabetic character or a question mark (?) character by enclosing it in single quotation marks. If you specify a space for <Character> , you can disable the use of local symbols. |
|
Input example |
lprefix'L'; symbols starting with'L' are local symbols Judge as; Ltest; this is a local symbol _test; this is a global symbol |
function | Define a set of instructions in a macro. | |
Format |
<macro name> MACRO [formal argument] [, dummy argument] ... [, dummy argument] [order] ENDM |
|
Explanation | In the macro specified in <macro name> , define a series of instructions described in the [Instruction] section. <macro name> is a keyword when expanding a macro. Therefore, the same name as a mnemonic or pseudo instruction cannot be given. Also, the characters and number of characters that can be used are the same as for symbols. By writing a formal parameter in [Dummy argument], you can give an argument to the macro. The given dummy argument assigns a value to the part with the same name as the dummy argument described in [Instruction]. If you specify multiple dummy arguments, separate each [formal argument] with a comma (,). In [Instruction], describe the mnemonic or pseudo instruction for which you want to define a macro. In addition, another macro can be called (nesting of macro definition) in [Instruction]. You can nest macro definitions up to 256 times. At the end of the [instruction], the ENDM pseudo-instruction that always pairs with the MACRO pseudo-instruction must be written. |
|
reference | <macro name> | |
Input example |
mov macro dest,src ;Macro definition lda src sta dest endm : mov symbol2,symbol1 ;Macro expansion |
function | Specify the radix when giving a numerical value using the macro operator % to the actual argument in the macro . | |
Format |
MRADIX <expression> |
|
Explanation | When giving a numeric value to the actual argument in the macro using the macro operator % , the radix is instructed to the assembler. For <expression> , specify either 10 or 16 and indicate decimal and hexadecimal respectively. When the MRADIX directive is not specified, the default is hexadecimal notation. |
|
reference | % | |
Input example |
set macro label db %label ;db 10 endm mradix 10; specify default radix as decimal assemble as set 10; db 10 |
function | Only the blocks whose condition is true will be output to the listing file. | |
Format |
NDSPIF |
|
Explanation | Of the blocks in the conditional directive, only the block part where the condition of the conditional directive is true is output to the listing file. This directive is used to suppress the unconditional output specification to the listing file specified by the DSPIF directive . If neither DSPIF pseudo-instruction nor NDSPIF pseudo-instruction is specified , all blocks of the conditional pseudo-instruction are output to the listing file in the same way as when the DSPIF pseudo-instruction is specified. |
|
reference | DSPIF | |
Input example |
ndspif if 1 :; The condition is true because it is a block part :; output to else :; The condition is false because it is a block part :; not output to endif |
function | Does not output the macro expansion contents to the listing file. | |
Format |
NDSPM |
|
Explanation | It is prohibited to output the expanded contents of the macro to the listing file at the part where the macro is called. If you want to output the contents of macro expansion to a listing file, specify the DSPM directive . If neither DSPM pseudo-instruction nor NDSPM pseudo-instruction is specified , the macro expansion contents are output to the listing file in the same way as when the DSPM pseudo-instruction is specified. |
|
reference | DSPM | |
Input example |
sample macro ;macro lda #$10 endm ndspm ;Specify listing output of macro expansion contents sample; Macro expansion When assembling such a program, the following is output to the listing file. sample.s 94-01-01 00:00:00......PAGE 0001 LINE# LOC CODE LINE 5:00000000 sample macro 6:00000000 lda #$10 7:00000000 endm 8:00000000 9:00000002 ndspm 10:00000002 A910 1 sample |
function | Suppress output to the listing file. | |
Format |
NLIST |
|
Explanation | The contents described after the NLIST directive are not output to the listing file. This directive is used to suppress output to the listing file specified by the LIST directive . It should be noted, LIST pseudo instruction when the NLIST directive is not specified together is, LIST pseudo instruction contents of the same as the program and when you specify will be output to the listing file. |
|
reference | LIST | |
Input example |
nlist; Prohibit output to listing file :: This part does not appear in the listing file :; not supported list; Allow output to listing file :; This part does not appear in the listing file :; Forced |
function | The operation of the accumulator is processed in 8 bits. (Default) | |
Format |
OFF16A |
|
Explanation | Notifies the assembler that the valid range of data is processed in 8 bits when processing the instruction to operate the accumulator written after the OFF16A pseudo instruction is specified. The specification of the OFF16A pseudo instruction can be canceled by the ON16A pseudo instruction . If neither the OFF16A pseudo instruction nor the ON16A pseudo instruction is written, the accumulator operation is processed as 8 bits. |
|
reference | IS65 , ON16A , ON16I , OFF16I , IF16A , IFN16A , IF16I , IFN16I | |
Input example |
is65 on16a lda #$1234; 16-bit accumulator processing : off16a lda #$12; Accumulator processed in 8 bits |
function | The index register is processed with 8 bits. (Default) | |
Format |
OFF16I |
|
Explanation | Notifies the assembler that the valid range of data is processed in 8 bits when processing the instruction to operate the index register described after the OFF16I pseudo instruction is specified. The specification of the OFF16I pseudo instruction can be canceled by the ON16I pseudo instruction . If the OFF16I pseudo instruction and ON16I pseudo instruction are not described, the index register operation is processed as 8 bits. |
|
reference | IS65 , ON16A , OFF16A , ON16I , IF16A , IFN16A , IF16I , IFN16I | |
Input example |
is65 on16i ldx #$1234; 16-bit index register processing : off16i ldx #$12 ;Process index register with 8 bits |
function | The location counter specified by the ORG directive does not belong to the current bank group. | |
Format |
OFFBANKGROUP |
|
Explanation | The location counter specified by the ORG directive is judged as a 3-byte long address. Therefore, the value specified by the ORG directive is always judged as an absolute address, and it is not necessary to specify the bank address by the GROUP directive . If the -is65 option is not specified when ISAS is started , the OFFBANKGROUP directive is specified by default. |
|
reference | GROUP , ONBANKGROUP , ORG | |
Input example |
offbankgroup bank3 group org $3:$8000; Modules are distributed from 3H bank at 8000H :; placed |
function | Disables C language-like constant specifications. (Default) | |
Format |
OFFCNUM |
|
Explanation | When representing a hexadecimal constant as in C, you cannot specify the "0x" radix operator immediately before the constant. Similarly, binary numbers cannot be represented by "0b" and octal numbers by "0o". However, you can still use the traditional radix operators. For details on the radix operator , refer to " Constant " in "Chapter 4 Expressions" . |
|
reference | ONCNUM | |
Input example |
offcnum sta #0x10 ;An error occurs stx #$10 ;Judge this as a hexadecimal constant |
function | Expressions are evaluated from left to right, regardless of operator precedence. | |
Format |
OFFPOLISH |
|
Explanation | When evaluating the expressions described in the operands, they are evaluated in order from the left regardless of the precedence of the operators . This quasi directive is used when assembling the source file described for the conventional IS65 assembler with ISAS. If the -is65 option is specified when starting ISAS , the OFFPOLISH directive is automatically specified. |
|
reference | ONPOLISH | |
Input example |
offpolish lda 10h+20h*30h; multiplication is performed after addition is performed |
function | Prohibits output of range information. | |
Format |
OFFRNG |
|
Explanation | The range information of the program after the description of the OFFRNG directive is not output to the object file output by ISAS. Range information is a record of whether the described content is a program or data. When the OFFRNG pseudo-instruction is specified, when debugging the part in which this pseudo-instruction is specified, it will be difficult to debug because the disassemble display will be displayed even in the data area, but the assembly time will be shortened. It is recommended to specify this directive at the end of debugging. If the OFFRNG directive is not specified, range information will always be output. |
|
reference | ONRNG | |
Input example |
onrng db $10,$20; disassemble like this when debugging :; will be offrng db $a9,$10; disassemble with "lda #$10" when debugging :; |
function | Specify the location counter with a relative address. | |
Format |
OFFSET <expression> |
|
Explanation | Advances the location counter by the address specified by <expression> from the current location counter . When the ONBANKGROUP directive is specified, specify a 2-byte absolute address in <expression> . When an address of 2 bytes or more is specified, only the lower 2 bytes are valid. If the OFFBANKGROUP directive is specified, specify a 3-byte long address including the bank address. If the bank address is omitted, it is regarded as 0 bank address. |
|
reference | GROUP , ONBANKGROUP , OFFBANKGROUP , ORG | |
Input example |
onbankgroup bank80 group $80; 80H Bank designation org $8000; Place at 8000H lda #$00 ;This is a 2-byte instruction offset $10: Located at address 8012 : offbankgroup bank81 group offset $00:$20; Bank when OFFBANKGROUP directive is specified : ;Specify with 3 bytes including address |
function | Accumulator operations are processed in 16 bits. | |
Format |
ON16A |
|
Explanation | Notifies the assembler that the valid range of data is processed in 16 bits when processing the instruction to operate the accumulator written after specifying the ON16A pseudo instruction. The specification of the ON16A pseudo instruction can be canceled by the OFF16A pseudo instruction . If neither the ON16A pseudo instruction nor the OFF16A pseudo instruction is written, the accumulator operation is processed as 8 bits. |
|
reference | IS65 , OFF16A , ON16I , OFF16I , IF16A , IFN16A , IF16I , IFN16I | |
Input example |
is65 on16a lda #$1234; 16-bit accumulator processing : off16a lda #$12; Accumulator processed in 8 bits |
function | 16-bit index register operation is processed. | |
Format |
ON16I |
|
Explanation | Notifies the assembler that the valid range of data is processed in 16 bits when processing the instruction that operates the index register described after the ON16I pseudo instruction is specified. The specification of the ON16I pseudo instruction can be canceled by the OFF16I pseudo instruction . When the ON16I pseudo instruction and OFF16I pseudo instruction are not described, the index register operation is processed as 8 bits. |
|
reference | IS65 , ON16A , OFF16A , OFF16I , IF16A , IFN16A , IF16I , IFN16I | |
Input example |
is65 on16i ldx #$1234; 16-bit index register processing : off16i ldx #$12 ;Process index register with 8 bits |
function | Makes the location counter specified by the ORG directive belong to the bank group specified by the GROUP directive . | |
Format |
ONBANKGROUP |
|
Explanation | The absolute address is determined from the bank address specified by the GROUP directive and the location counter specified by the ORG directive . Therefore, it is necessary to specify the bank address with the GROUP directive and the location counter with the ORG directive . It is usually used when creating a bank-managed program like 65816. If the -is65 option is specified when ISAS is started , the ONBANKGROUP pseudo instruction is specified by default. |
|
reference | GROUP , OFFBANKGROUP , ORG | |
Input example |
onbankgroup bank80 group $80; Bank specification org $8000 ;Specify address :; Module starts at address 8000H in 80H bank :; placed |
function | Enables C language-like constant specification. | |
Format |
ONCNUM |
|
Explanation | By specifying the ONCNUM pseudo-instruction, when expressing a hexadecimal constant as in C language, you can specify the "0x" radix operator immediately before the constant. Also, "0b" can be added to binary numbers and "0o" can be added to octal numbers. Of course, you can also use the traditional radix operators. For details on the radix operator , refer to " Constant " in "Chapter 4 Expressions" . |
|
reference | OFFCNUM | |
Input example |
oncnum sta #0x10; Judge as a hexadecimal constant stx #$10; This is also judged as a hexadecimal constant |
function | Evaluate expressions by operator precedence. | |
Format |
ONPOLISH |
|
Explanation | When evaluating the expression described in the operand, it is evaluated according to the priority order of the operators . Specify this pseudo-instruction when you want to write an expression that takes operator precedence into consideration, as in C language. If the -is65 option is specified when ISAS is started , the ONPOLISH quasi directive is automatically specified. For the priority of operators, refer to the " Priority of operators " in "Chapter 4 Expressions" . |
|
reference | OFFPOLISH | |
Input example |
onpolish lda 10h+20h*30h; addition is done after multiplication is done |
function | Allows output of range information. (Default) | |
Format |
ONRNG |
|
Explanation | The range information of the program after the ONRNG directive is written is output to the object file output by ISAS. Range information is a record of whether the described content is a program or data. By specifying the ONRNG pseudo-instruction, when debugging the part specified with this pseudo-instruction, the program area is disassembled and the data area is DEFB/DB , DEFH/DH , DEFW/DW , DEFD/DD. , DEFL/DL , or DEFS/DS directives . If the ONRNG pseudo instruction and OFFRNG pseudo instruction are not specified, range information is always output. |
|
reference | OFFRNG | |
Input example |
onrng db $10,$20; disassemble like this when debugging :; will be |
function | Specify the operand length of the unresolved symbol when assembling the first pass. | |||||||||||||||||||||||||||||
Format |
OPTI <expression> |
|||||||||||||||||||||||||||||
Explanation | If a symbol in the operand part that cannot be resolved is found during the first pass assembly, specify the operand length of the reserved symbol. By specifying a value from 0 to 5 in <expression> , you can specify the priority order that determines the operand length of unresolved symbols.
For example, when the <expression> of the OPTI directive is 1 as follows , opti 1 op_code symbol symbol dw 00H The addressing that can be specified by ope_code is checked according to the following order of priority and secured as the operand length of the unresolved symbol symbol.
The default value of the OPTI directive when the -is65 option is specified at ISAS startup is 1, and when it is not specified, the default value is 5. |
|||||||||||||||||||||||||||||
reference | IS65 | |||||||||||||||||||||||||||||
Input example |
is65 opti 2; absolute, long, direct :; optimize in order |
function | Specify the location counter with an absolute address. | |
Format |
ORG <expression> |
|
Explanation | Specify the location counter in <expression> with an absolute address. When the ONBANKGROUP directive is specified, specify a 2-byte absolute address in <expression> . When an address of 2 bytes or more is specified, only the lower 2 bytes are valid. If the OFFBANKGROUP directive is specified, specify a 3-byte long address including the bank address. If the bank address is omitted, it is regarded as 0 bank address. Multiple ORG directives may be specified, and it is not necessary to specify them in order from low address to high address. However, when modules overlap, they will be overwritten, and the module specified later will be valid. The location counter must always be specified at the beginning of the module placed at the beginning of the bank with this ORG pseudo-instruction. |
|
reference | GROUP , ONBANKGROUP , OFFBANKGROUP , OFFSET | |
Input example |
onbankgroup bank80 group $80; 80H Bank designation org $8000; Place at 8000H : offbankgroup bank81 group org $0:$9000; Place at 9000H in 0H bank |
function | Specify the number of lines per page and the number of page breaks in the listing file. | |
Format |
PAGE [number of lines] |
|
Explanation | In [Number of lines], specify the number of lines on one page of the listing file with a value from 10 to 255. Also, by specifying 0 for [Number of lines], you can prevent page breaks. If you want to break the page at an arbitrary place, describe the PAGE pseudo-instruction without specifying the [Number of lines] so that the page breaks immediately before the PAGE pseudo-instruction. The default number of lines when the PAGE directive is not specified is 66 lines. |
|
reference | TITLE | |
Input example |
page 50 ;Specify 50 lines per page : page; Break page just before this line |
function | Declare all defined symbols in the source file as externally defined symbols. | |
Format |
PUBALL |
|
Explanation | All symbols defined in the source file are notified to the assembler as externally defined symbols regardless of whether they are referenced in other source files. When the PUBALL directive is specified, it is not necessary to specify the PUBLIC , PUBON , and PUBOFF directives , and even if they are specified, they are ignored. However, if the PUBOFF pseudo-instruction is specified after the PUBALL pseudo-instruction is specified, the warning "Already PUBALL. (already in the PUBALL state)" is output. The PUBALL directive does not affect local symbols. |
|
reference | PUBLIC , PUBON , PUBOFF | |
Input example |
Source file 1 puball; Symbols sample1 and sample2 are externally defined : ;Proclaimed as nbol sample1 equ $10 sample2 equ $20 Source file 2 extern sample1, sample2; External reference is possible lda sample1 ldx sample2 |
function | Declare the symbol as externally defined. | |
Format |
PUBLIC <name> [,name] ... [,name] |
|
Explanation | Informs the assembler that the symbol defined in the source file is referenced in another source file. Describe the externally defined symbol name in <name> . When giving multiple <names> , separate each <name> with a comma (,). When the PUBALL directive is specified, it is not necessary to specify the PUBLIC directive. For symbols in areas with fixed addresses, such as work RAM , it is better to assemble and read a file with symbol definitions at the beginning of each source file with the LIB/FILE/INCLUDE pseudo-instruction than to externally define with the PUBLIC pseudo-instruction. Links are processed faster. |
|
reference | PUBALL , PUBON , PUBOFF , EXTERN , GLOBAL , LOCAL | |
Input example |
Source file 1 public sample ;The defined symbol sample is accessed externally. :; declare externally defined symbol to be illuminated sample ds $55 Source file 2 extern sample; The referenced symbol sample is set externally. :; declare external reference symbol because it is defined lda sample |
function | Undeclares the externally defined symbol specified by the PUBON directive . | |
Format |
PUBOFF |
|
Explanation | The PUBOFF directive releases the declaration of the externally defined symbol specified by the PUBON directive . If the PUBALL directive is described in the source file, the PUBOFF directive will be ignored. However, if the PUBOFF pseudo-instruction is specified after the PUBALL pseudo-instruction is specified, the warning "Already PUBALL. (already in PUBALL state)" is output. |
|
reference | PUBLIC , PUBALL , PUBON | |
Input example |
pubon sample1; declared as an externally defined symbol puboff; Release of PUBON directive sample2; not declared as an externally defined symbol |
function | The symbols defined after the PUBON directive are declared as externally defined symbols. | |
Format |
PUBON |
|
Explanation | The PUBON directive declares the symbols defined up to the PUBOFF directive as externally defined symbols. This is used when you want to declare multiple symbols described in a source file as an externally defined symbol collectively without separately declaring them as externally defined symbols. If the PUBALL directive is described in the source file, the PUBON directive will be ignored. |
|
reference | PUBLIC , PUBALL , PUBOFF | |
Input example |
pubon sample1; declared as an externally defined symbol puboff; Release of PUBON directive sample2; not declared as an externally defined symbol |
function | Specify the radix when the radix operator is omitted in the constant. | |
Format |
RADIX <expression> |
|
Explanation | Among the constants described after the RADIX directive, instruct the assembler the radix when the character indicating the radix (radix specifier) is not added to the constant. For <expression> , specify values of 2, 8, 10, and 16 to indicate binary, octal, decimal, and hexadecimal numbers, respectively. Even if the radix is specified by this RADIX directive, if the radix specifier is specified for the constant, the evaluation of the radix specifier takes precedence. |
|
Input example |
radix 16; default radix is hexadecimal lda #10; treated as hexadecimal 10 ldx #10b; Since the radix specifier is added, :; treated as 10 If the RADIX directive is not specified, ISAS treats the decimal number as the default radix value. For the radix specifier , see the item " Constant " in "Chapter 4 Expressions" . |
function | Specify whether V810SF instruction is expanded or not, and specify the general-purpose register used by the assembler when expanding the instruction. | |
Format |
RSVREG <register> |
|
Explanation | Specify a value from 0 to 31 for <register> . When 0 is specified for <Register> , instruction expansion is not performed. When a value from 1 to 31 is specified for <register> , the general-purpose register of r<register> is reserved as a register to be used for instruction expansion. The V810SF does not have an instruction code that assigns a 32-bit constant value to a register or an instruction code that refers to memory using a 32-bit displacement. For this reason, ISAS prepares these mnemonics, expands them to the existing V810SF instruction code when assembling, and assembles them. The RSVREG pseudo-instruction specifies the general-purpose register used by the assembler when this instruction is expanded. If a prefix of period (.) or slash (/) is added to the beginning of the operand that gives the immediate value, instruction expansion will not be performed. For details on instruction expansion, see " Appendix 2 V810SF Instruction Expansion ". |
|
reference | ISV810 | |
Input example |
isv810 rsvreg 1 ;Uses r1 register during instruction expansion |
function | Specify the header of each page of the listing file. | |
Format |
TITLE <title> |
|
Explanation | Specify the character string to be displayed in the header of each page of the listing file that is output when the -list option is specified when ISAS is started . For <Title> , use a character string up to the end of the line, or if more than 50 characters are entered, up to 50 characters. Therefore, note that you cannot write a comment in the line in which the TITLE directive is written. It becomes effective from the first page when the TITLE directive is specified in the first line of the source file, and from the next page when the TITLE directive is specified in the second and subsequent lines. If the TITLE directive is not specified, the source file name will be displayed in the header. |
|
reference | PAGE | |
Input example |
title This is sample program. When the TITLE directive is specified in this way, the header of the listing file is displayed as follows. This is sample program. 94-01-01 00:00:00......PAGE 0001 LINE# LOC CODE LINE 1:00000000 title This is sample program. 2:00000000 If the TITLE directive is not specified, the source file name will be displayed in the header as shown below. sample.s 94-01-01 00:00:00......PAGE 0001 LINE# LOC CODE LINE 1:00000000 page 66 2:00000000 |
function | An error is output when an undefined symbol is found. (Default) | |
Format |
UNDEFERR |
|
Explanation | Tells ISAS to output an "Undefined symbol." error when it encounters an undefined symbol. If the UNDEFEXT directive is specified, the UNDEFERR directive will be canceled. If the UNDEFEXT directive and the UNDEFERR directive are not specified, an error will be output for undefined symbols as if the UNDEFERR directive was specified. |
|
reference | UNDEFEXT | |
Input example |
undeferr lda sample; error because symbol name sample is undefined :; occurs |
function | Treat undefined symbols as external reference symbols. | |
Format |
UNDEFEXT |
|
Explanation | If the referenced symbol is not declared as an external reference symbol by the EXTERN directive or GLOBAL directive in the source file, it is automatically declared as an external reference symbol. If the UNDEFERR directive is specified, the UNDEFEXT directive will be canceled. If the UNDEFEXT pseudo instruction and the UNDEFERR pseudo instruction are not specified, an error is output for undefined symbols in the same way as when the UNDEFERR pseudo instruction is specified. |
|
reference | UNDEFERR | |
Input example |
undefext lda sample; symbol name sample is undefined, but automatically :; is regarded as an external reference symbol and an error occurs. :; not live |
function | Use the prefix for Western Design Center. | |
Format |
WDPREFIX |
|
Explanation | The prefixes for Western Design Center are used as the prefixes for explicit direct addressing, absolute addressing, and long addressing. Specific addressing can be specified by writing the following prefix immediately before the symbol.
If neither the WDPREFIX pseudo-instruction nor the ISPREFIX pseudo -instruction is specified, the prefix for INTELLIGENT SYSTEMS will be used. |
|
reference | IS65 , ISPREFIX | |
Input example |
is65 extern reg0, symbol wdprefix lda <reg0; Direct addressing lda >reg0; absolute addressing lda ^symbol; long addressing |
function | Define a value for the redefinable symbol. | |
Format |
<name> = <expression> |
|
Explanation | <Name> <expression> symbol described in the portion of those assigned the value of the after-defined <name> by reference, the <expression> can obtain the value of. Note that the = pseudo-instruction can redefine <name> , but the EQU pseudo-instruction cannot redefine <name> . |
|
reference | EQU | |
Input example |
sample = $10; Assign $10 to the symbol name sample Load lda #sample; 10H into register sample = $20; No error occurs because it can be redefined lda #sample; Load 20H into register |
function | Macro Expands the defined macro. | |
Format |
<macro name> [actual argument] [,actual argument] ... [,actual argument] |
|
Explanation | The defined macro is expanded by writing the <macro name> defined by the macro definition in the opcode field. For macro expansion, it is necessary to define the macro in advance. [Actual argument] corresponds to the formal argument specified in the macro definition in order from the left, and the value of [actual argument] is assigned to the part with the same name as the formal argument. Note that the number of actual arguments does not have to match the number of dummy arguments when the macro is defined, but if the number of actual arguments is greater than the number of dummy arguments, the extra actual arguments are ignored and In this case, the missing dummy argument is regarded as an empty character (character string of length 0). You can also specify no actual arguments for macros with dummy arguments. |
|
reference | MACRO | |
Input example |
mov macro dest,src ;Macro definition lda src sta dest endm : mov symbol2,symbol1 ;Macro expansion |
To start ISAS, enter it from the MS-DOS prompt of Windows 95, the command prompt of Windows NT, or the command line of MS-DOS or PC DOS according to the following format. Note that commands and file names other than startup options can be specified in either uppercase or lowercase.
C:\>isas [-options] source-file(.s)
Specifies ISAS startup options.
The start option is a character string that starts with a hyphen (-), and you can omit it or specify one or more options. When specifying multiple options, separate each option with a space. For more information, see " Startup Options " below.
Specify the source file name.
Specify the source file name to assemble. If the extension is omitted, the file name is determined by adding the extension ".s". When assembling a file with an extension other than ".s", specify the extension as well.
For example, when assembling the source file with the file name "sample1.s", it is not necessary to specify the extension as follows.
C:\>isas sample1
When assembling a source file with the file name "sample2.x65", be sure to specify the extension because the extension is not ".s".
C:\>isas sample2.x65
You can specify the drive and directory path for the source file name. For example, to assemble the "sample3.s" file in the "source" directory under the current directory, type:
C:\>isas source\sample3.s
If the startup option is specified incorrectly or if the source file name is not specified, the ISAS usage information will be displayed as shown below.
C:\>isas INTELLIGENT SYSTEMS Assembler Version X.XXX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. Usage: isas [-options] source-file(.s) options: -s <n> symbol tables.default:65521 -w <n> warning level.(1-3) default:2 -b <n> buffer for access files.default:32768 -m <n> [m] macro tables (and text buffer).default:4096 (65536) -o <xxx> output file name. -D <symbol>[=value] define symbol with value. -e <xxx> switch error output file.default:stdout -is65 is65 compatible mode. -isdmg isdmg compatible mode. -nologo no logo. -I <xxx> include path -list out listing file.[.PRN] -t print assemble time. -g source line debug. environments: ISAS=[default options] ISINC=[include path] ISTMP>TEMP>TMP=[temporary directry] C:\>
When the assembly is completed normally, the object file is generated in the current directory or the directory specified by the -o option. You can create an ISX file that can be read by the debugger by linking this object file with ISLK.
This section explains the details of ISAS boot options. Note that the start option specification is case-sensitive, so be careful when describing it.
Specify the number of symbol tables secured in memory.
When assembling, ISAS expands all symbols into the table secured in memory. The -s option is used when changing the number of symbol tables. For <n> , the number of symbol tables up to 65535 can be specified as a decimal value. You can also specify a hexadecimal value by adding "$" or "0x" immediately before the value. The default number of symbol tables is 4091 for MS-DOS version and 65521 for other than MS-DOS version. When the "Not enough symbol tables." error message is output during assembly, you can increase the number of symbol tables with this -s option to deal with it.
For example, to increase the number of symbol tables to 8000, specify as follows.
C:\>isas -s 8000 ...
Specify the warning level to be generated during assembly.
For <n>, the warning level can be specified with a value from 1 to 3. The default value when this option is omitted is 2.
<n> | Content | Warning level |
---|---|---|
1 | No warning message is displayed when a warning occurs. | |
2 | When a warning occurs, only warning messages of high importance are displayed. | Warning level 2 only |
3 | When a warning occurs, all warning messages will be displayed. | Warning levels 2 and 3 |
For example, specify 3 when you want to output all the warnings that occur strictly in the assembly.
C:\>isas -w 3 sample
Specifies the buffer size for input/output files in bytes.
ISAS uses two buffers, an input buffer to read the source file and an output buffer to write the object file and temporary file. The buffer size for each of these can be specified by specifying the -b option.
For example, to change the size of each file buffer for the input file and the output file to 8192 bytes, specify as follows.
C:\>isas -b 8192 ...
Increasing this buffer size will reduce the time it takes to assemble, but it will require more memory. Check the operating environment of the user and specify a value that does not output the "Not enough memory." error. The default buffer size value when the -b option is not specified is 16384 bytes for MS-DOS version and 32768 bytes for non-MS-DOS version.
Specify the number of macros to be defined and the size of the macro buffer.
<n> specifies the number of macros to be defined. The number of macros indicates the number of macros that are actually defined, and the value of <n> must specify the number of macros or more. When "Macro table overflow." error occurs, specify an appropriate number of macros in <n>. The default number of macros that can be specified is 512 for MS-DOS version, 4096 for non-MS-DOS version, and the maximum is 8192.
In [m], specify the size of the buffer that stores the contents of the defined macro in bytes. When specifying [m], insert a space before [m]. Also, [m] can be omitted. When the error "Macro text buffer overflow." occurs, specify an appropriate buffer size in [m]. The default size of the macro buffer that can be specified is 32768 bytes for MS-DOS version and 65536 bytes for non-MS-DOS version.
For example, to change the number of macros and size of macro buffer to 1000 and 50000 bytes respectively, specify as follows.
C:\>isas -m 1000 50000 ...
However, if you increase the size of these buffers, the error "Not enough memory." may occur, so specify a value that does not output an error.
Specifies the object file name output by ISAS.
If the file name is described without an extension, it will be output with the extension name ".o" automatically added. If an extension is added, it will be output with the specified file name. Of course, you can also specify the drive name or directory path as the file name. When the -o option is omitted, the file name with the source file name extension changed to ".o" is output as an object file.
For example, specify the following to set the output object file name to "sample.obj".
C:\>islk -o sample.obj ...
Declares the symbol specified by <symbol> and defines the value specified by [value] for that symbol.
Normally, a symbol must be defined in the same source file or externally defined in another source file, but its value can be defined at assembly time by using the -D option. Therefore, you can easily set the address and constant value without changing the contents of the source file.
For example, when using the symbol temp that is not defined in the source file as follows,
lda temp; use a symbol that is not defined in the source file :
You can assemble normally by defining the symbol temp with the -D option and specifying the value.
C:\>isas -D temp=$8000 ...
Note that the symbols declared with the -D option are declared as case-sensitive symbols. Therefore, please note that the symbol must be written according to the upper/lower case distinction state of the symbol by the CAPSOFF/SMALL directive or the CAPSON directive in the part that refers to the symbol.
capsoff lda temp; Judge as "temp" by the CAPSOFF pseudo instruction
In this case, the CAPSOFF directive determines that the symbol is a lowercase symbol "temp", so specify the -D option in lowercase, such as "-D temp=$8000".
capson lda temp; Judge as "TEMP" by CAPSON directive
Also, in this case, the CAPSON pseudo-instruction determines that it is an uppercase symbol "TEMP", so you must specify "-D TEMP=$8000" in uppercase.
Specify the output device of the error.
Outputs an error or warning message to the device specified by <xxx>. The following devices can be specified for <xxx>.
<xxx> | device |
---|---|
stdout | Standard output (default) |
stderr | Standard error output |
Other than stdout and stderr | File |
For example, to output an error to the standard error output device, specify as follows.
C:\>isas -e stderr test.s C:\>
When the ERRTAG pseudo instruction is written in the source file , the ERRTAG pseudo instruction is given priority and the error tag file is output.
Start ISAS in IS65 compatibility mode.
This is specified when assembling the source file created for the conventional assembler (IS65) with ISAS without changing it. Be sure to specify this option when assembling the IS65 source file because the IS65 source file and the ISAS source file have some differences such as operators and pseudo-instructions.
For example, when assembling the source file "sample.x65" created for IS65 with ISAS, specify as follows.
C:\>isas -is65 sample.x65
Specifying this option changes the default values of the following pseudo instructions.
option | When -is65 is specified | -is65 omitted |
---|---|---|
Default pseudo instruction |
OFFPOLISH ONBANKGROUP OPTI 1 EVALBITS 16 IS65BIN |
ONPOLISH OFFBANKGROUP OPTI 5 EVALBITS 32 ISASBIN |
If you want to use the full functionality of ISAS, you need to change the source file for IS65 for ISAS. In such a case, refer to " Changing the IS65 source file for ISAS " in "Chapter 2 Development Procedure" and proceed. Also, when assembling the modified source file, it is not necessary to specify this -is65 option.
Start ISAS in ISDMG compatibility mode.
Specify it when assembling the source file created for the conventional assembler (ISDMG) with ISAS without changing it. The source file for ISDMG and the source file for ISAS have some differences such as operators and pseudo-instructions, so be sure to specify this option when assembling the source file for ISDMG.
For example, when assembling the source file "sample.dmg" created for ISDMG with ISAS, specify as follows.
C:\>isas -isdmg sample.dmg
Specifying this option changes the default values of the following pseudo instructions.
option | When -isdmg is specified | -isdmg omitted |
---|---|---|
Default pseudo instruction |
ISDMG OFFPOLISH ONBANKGROUP EVALBITS 16 |
IS65 ONPOLISH OFFBANKGROUP EVALBITS 32 |
If you want to use the full functionality of ISAS, you need to change the source files for ISDMG for ISAS. In such a case, refer to " Changing the source files for ISDMG for ISAS " in "Chapter 2 Development Procedure" and proceed with the work. Also, when assembling the modified source file, this -isdmg option need not be specified.
Does not display the title, version, or copyright displayed on the screen when ISAS is started.
If the -nologo option is not specified, the following titles will be displayed.
C:\>isas sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. C:\>
By specifying the -nologo option, the title etc. will not be displayed. However, error and warning messages are displayed even when -nologo is specified.
C:\>isas -nologo sample sample.s (8): ERROR Undefined symbol.[LOOP] fatal errors = 1 C:\>
Specifies the directory path to search for files read by the LIB/FILE/INCLUDE directive and LIBBIN directive .
If the file specified by the LIB/FILE/INCLUDE directive or LIBBIN directive is not found, ISAS searches for the file according to the directory path specified by the -I option. For example, to search the INCLUDE directory on the C drive, specify:
C:\>isas -I c:\include sample
Also, when specifying multiple directories, you can specify the search paths sequentially by separating each with a semicolon (;).
C:\>isas -I c:\include1;c:\include2 sample
Even if the ISINC environment variable is specified, the directory specified by the -I option is searched first, and if the target file is not found, the directory specified by the ISINC environment variable is searched.
Specify the output of the listing file.
When this option is specified, a listing file with the file name extension changed to ".prn" is created in the same directory as the source file. You can also output the listing file by specifying -l (lowercase letter L) instead of -list.
C:\>isas -list sample.s
If an error occurs during assembly, the listing file will not be output.
The time used for assembling is displayed.
In the example below, you can see that it took 30 seconds to assemble.
C:\>isas -t sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. assemble time = 00:00:30 C:\>
Outputs the debug information necessary for source level debugging in assemble source to an object file.
By assembling with the -g option specified and loading the linked ISX file into the debugger, source level debugging using the assemble source is possible on the debugger.
C:\>isas -g sample
Displays error and warning messages in Japanese.
C:\>isas -jp sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. sample.s (8): ERROR Symbol is not found. [LOOP] fatal errors = 1 C:\>
If the -jp option is not specified, the message will be displayed in English.
Displays error and warning messages in English.
C:\>isas -us sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. sample.s (8): ERROR Undefined symbol.[LOOP] fatal errors = 1 C:\>
By default, messages are displayed in English.
ISAS returns 0 in the exit status only when the assembly is completed normally.
To start ISLK, enter it from the MS-DOS prompt of Windows 95, the command prompt of Windows NT, or the command line of MS-DOS or PC DOS in the following format. Note that commands and file names other than startup options can be specified in either uppercase or lowercase.
C:\>islk [-options] object-file(.o) ...
Specifies the ISLK startup option.
The start option is a character string that starts with a hyphen (-), and you can omit it or specify one or more options. When specifying multiple options, separate each option with a space. For more information, see " Startup Options " below.
Specify the object file name.
Specify the object file name output by ISAS. If the extension is omitted, the file name is determined by adding the extension ".o". For example, when linking the object file with the file name "sample1.o", specify as follows.
C:\>islk sample1
The object file output by ISAS has a ".o" extension by default, so it is not usually necessary to specify the extension.
When linking an object file with an extension other than ".o", specify the extension as well. For example, when linking an object file with file name "sample2.obj", the extension is not ".o", so be sure to specify the extension as well.
C:\>islk sample2.o
To specify multiple object files, insert one or more spaces between each object file name. When linking multiple object files, the order in which the object files are specified becomes a problem when addresses are not specified in the object files. ISLK links object files in ascending address order for each bank. If no address is specified in the object file, the object files specified at linking are arranged in order.
If the startup option is specified incorrectly or the object file name is not specified, the usage of ISLK will be displayed as follows.
C:\>islk INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. Usage: islk [-options] object-file(.o) ... options: -s <n> symbol tables.default:65521 -b <n> buffer for access files.default:32768 -o <xxx> output file name. -D <symbol>[=value] define symbol with value. -G <symbol>[=value] define group with address. -e <xxx> switch error output file.default:stdout -nologo no logo. -v verbose mode. -n no debug information. -t print linkage time. -x24 24bit symbol debug. -L <xxx> library path. environments: ISLK=[default options] ISLIB=[library path] ISTMP>TEMP>TMP=[temporary directry] C:\>
When the link ends normally, an ISX file is generated in the current directory or the directory specified by the -o option . By loading this file into the debugger, symbolic debugging is possible.
This section explains the details of the ISLK boot options. Note that the start option specification is case-sensitive, so be careful when describing it.
Specify the number of symbol tables secured in memory.
ISLK expands the symbol to be externally referenced at the time of linking into the table secured in memory. The -s option is used when changing the number of symbol tables. For <n> , the number of symbol tables up to 65535 can be specified as a decimal value. You can also specify a hexadecimal value by adding "$" or "0x" immediately before the value. The default number of symbol tables is 4091 for MS-DOS version and 65521 for other than MS-DOS version. If you get a "Not enough symbol tables." error message when linking, you can increase the number of symbol tables with this -s option to handle it.
For example, to increase the number of symbol tables to 8000, specify as follows.
C:\>islk -s 8000 ...
Specifies the buffer size for input/output files in bytes.
ISAS uses two buffers, an input buffer for reading object files and an output buffer for writing ISX and temporary files. The buffer size for each of these can be specified by specifying the -b option.
For example, to change the size of each file buffer for the input file and the output file to 8192 bytes, specify as follows.
C:\>islk -b 8192 ...
Increasing this buffer size will reduce the link time, but will require more memory. Check the operating environment of the user and specify a value that does not output the "Not enough memory." error. The default buffer size value when the -b option is not specified is 16384 bytes for MS-DOS version and 32768 bytes for non-MS-DOS version.
Specify the ISX file name or object file name output by ISLK.
If the file name is described without an extension, the ISX file with the extension name ".isx" is automatically output. If you add an extension other than ".o", an ISX file will be output with the specified file name. Of course, you can also specify the drive name or directory path as the file name. When the -o option is omitted, the object file name specified at the beginning of the link will be output as an ISX file with the extension changed to ".isx".
For example, specify the following to set the output ISX file name to "sample.isx".
C:\>islk -o sample.isx ...
If you add the ".o" extension to the file name, you can combine multiple object files into one object file.
C:\>islk -o sample.o sub1.o sub2.o
In this example, two object files "sub1.o" and "sub2.o" are combined into one object file "sample.o".
Declares the symbol specified by <symbol> and defines the value specified by [value] for that symbol.
Normally, an external reference symbol must be externally defined in another source file, but you can declare the symbol at link time by using the -D option. Therefore, you can easily set the address and constant value without changing the contents of the source file.
For example, when using the symbol temp which is not defined in any source file as follows,
extern temp; defines symbol temp as an external reference symbol lda temp; use a symbol that is not defined in any source file :
By defining the symbol temp with the -D option and specifying a value, you can link normally.
C:\>islk -D temp=$8000 ...
Note that the symbols declared with the -D option are declared as case-sensitive symbols. Therefore, please note that the symbol must be written according to the upper/lower case distinction state of the symbol by the CAPSOFF/SMALL directive or the CAPSON directive in the part that refers to the symbol.
capsoff lda temp; Judge as "temp" by the CAPSOFF pseudo instruction
In this case, the CAPSOFF directive determines that the symbol is a lowercase symbol "temp", so specify the -D option in lowercase, such as "-D temp=$8000".
capson lda temp; Judge as "TEMP" by CAPSON directive
Also, in this case, the CAPSON pseudo-instruction determines that it is an uppercase symbol "TEMP", so you must specify "-D TEMP=$8000" in uppercase.
Declare the start address of the group specified by <symbol> with [value].
The groups with the same name are arranged in the order of the object files specified at the time of linking, and are grouped into one module for each group. Therefore, the absolute address must always be specified by the ORG directive at the beginning of the group that appears for the first time . However, by using the -G option, this address can be specified at linking without writing the absolute address in the source file.
For example, if you want to place the group common from the address $1000 when linking, write it in the source file as follows.
common group $00; declare group common :; Do not write the ORG directive :
Then, by specifying the -G option when linking, you can relocate the group to an absolute address.
C:\>islk -G common=$1000 ...
Also, the group specified by this -G option automatically checks whether there is an area that overlaps the address of the group specified by another -G option. At link time, if a group is found that overlaps another group, ISLK will issue a warning as follows:
C:\>islk4g sample.o -G text=$ffff0000 -G data=$ffff2000 -G bss=$05000000 INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. Area of [text] group = FFFF:0000-FFFF:2BA5 conflict WARNING! 1 group(s) conflict area detected. C:\>
In such a case, you can easily check which group the address overlaps with by specifying the -v option as follows. However, note that groups not specified by the -G option of ISLK are not checked.
C:\>islk4g sample.o -G text=$ffff0000 -G data=$ffff2000 -G bss=$05000000 -v INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. output file: sample.isx *** phase 1 *** sample.o *** phase 2 *** sample.o symbol:167 Area of [text] group = FFFF:0000-FFFF:2BA5 conflict Area of [data] group = FFFF:2000-FFFF:22C7 Area of [bss] group = 0500:0000-0500:9157 End of [vec] group = FFFF:0017 WARNING! 1 group(s) conflict area detected. range:23 C:\>
The group name declared with the -G option is declared as a case-sensitive name. Therefore, please note that the group name must be described according to the case distinction of the group name by the CAPSOFF/SMALL directive or the CAPSON directive in the part that refers to the group name.
capsoff temp group; Judge as "temp" by the CAPSOFF pseudo instruction
In this case, the CAPSOFF directive determines the group name to be lowercase "temp", so specify the -G option in lowercase as "-G temp=$8000".
capson temp group; Judge as "TEMP" by CAPSON directive
In this case, the group name "TEMP" in uppercase is determined by the CAPSON directive, so you must specify "-G TEMP=$8000" in uppercase.
Specify the output device of the error.
Outputs an error or warning message to the device specified by <xxx>. The following devices can be specified for <xxx>.
<xxx> | device |
---|---|
stdout | Standard output (default) |
stderr | Standard error output |
Other than stdout and stderr | File |
For example, to output an error to the standard error output device, specify as follows.
C:\>islk -e stderr test.o C:\>
The title, version, and copyright displayed on the screen when ISLK starts up are not displayed.
If the -nologo option is not specified, the following titles will be displayed.
C:\>islk sample INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. C:\>
By specifying the -nologo option, the title etc. will not be displayed. However, error and warning messages are displayed even when -nologo is specified.
C:\>islk -nologo sample sample.s ERROR Unresolved external.[LOOP] fatal errors = 1 C:\>
Displays the progress of link processing.
Normally, this option is not used, just specify it when you want to check the operating status of ISLK.
C:\>islk -v sample INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. output file: sample.isx *** phase 1 *** sample.o *** phase 2 *** sample.o symbol:167 End of [BANK00] group = 0000:3063 End of [BANK01] group = 0001:1250 range:23 C:\>
Does not output debug information to the ISX file.
The ISX file contains symbol and range information for symbolic debugging, as well as debug information for source level debugging. The -n option suppresses outputting these debug information to the ISX file. This is used when outputting a compact ISX file in a short time, because information for debugging is unnecessary when only checking the operation.
Note that symbolic debugging and source level debugging are not possible even if the ISX file created by specifying the -n option is loaded into the debugger.
C:\>islk -n sample
Displays the time used for the link.
In the example below, you can see that the link took 43 seconds.
C:\>islk -t sample INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. linkage time = 00:00:43 C:\>
Create an ISX file for a traditional SHVC debugger.
ISLK outputs the extended ISX file by default. This is an ISX file that contains debug information for source level debugging and cannot be loaded by traditional SHVC debuggers. When loading an ISX file into a traditional SHVC debugger, you must specify the -x24 option when launching ISLK.
C:\>islk -x24 sample
Specifies the directory path to search for object files to link.
If the object file is not found at link time, ISLK will search for the file according to the directory path specified by the -L option. For example, to search the LIB directory on the C drive, specify:
C:\>islk -L c:\lib ...
Also, when specifying multiple directories, you can specify the search paths sequentially by separating each with a semicolon (;).
C:\>islk -L c:\lib1;c:\lib2 ...
Even if the ISLIB environment variable is specified, the directory specified by the -L option is searched first, and if the target file is not found, the directory specified by the ISLIB environment variable is searched.
Displays error and warning messages in Japanese.
C:\>islk -jp sample INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. sample.s ERROR Symbol is not resolved. [LOOP] fatal errors = 1 C:\>
If the -jp option is not specified, the message will be displayed in English.
Displays error and warning messages in English.
C:\>islk -us sample INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. sample.s ERROR Unresolved external.[LOOP] fatal errors = 1 C:\>
By default, messages are displayed in English.
A warning is output when a program is created that exceeds the bank area size.
When developing a program for the 65816 processor, it is not permissible to place the program across banks. The -w bank-over option tells ISLK to output a warning when the program is placed across banks.
When this option is specified and the program exceeds the bank, the following will be displayed.
C:\>islk -w bank-over sample INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. WARNING Bank over. [00:FFFE==>01:0002] warnings = 1 C:\>
When developing a program for the 65816 processor, it is a good idea to specify this option for safety.
ISLK parameters can be specified using a response file.
If you have many object files to link and cannot describe them all on the command line of MS-DOS or PC DOS, you can solve them by using this response file.
The response file is a text file and the parameter part of ISLK is described with an editor.
-o sample.isx main sub1 sub2 sub3
Prepare the response file described in this way with the file name "sample.lnk", for example. The prepared response file can be linked by using as follows.
C:\>islk @sample.lnk
Also, the response file may be written over multiple lines.
-o sample.isx main sub1 sub2 sub3
ISLK returns 0 as the exit status only when the link is successfully completed.
The message has an error and a warning. An error occurs when processing cannot be executed continuously, and the processing is immediately stopped when an error occurs. Also, warnings occur when the source files need modification, but the process runs uninterrupted.
For example, when ISAS finishes the assemble process normally, it terminates the process without displaying any error or warning message and returns to the MS-DOS or PC DOS prompt as follows.
C:\>isas sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. C:\>
When an error occurs, the file name, line number, error message, and number of errors in which the error occurred are displayed as follows.
C:\>isas sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. sample.s (19): ERROR Undefined symbol.[LOOP] fatal errors = 1 C:\>
In this example, you can see that the LOOP symbol used in line 19 of the sample.s file is undefined.
Also, when a warning occurs, it will be displayed like an error.
C:\>isas -w3 sample INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. sample.s (2): WARNING [KANJI] not yet support. warnings = 1 C:\>
Note that in the case of ISLK, error and warning messages are output as in ISAS. However, the line number is not displayed.
You can specify whether to display warnings output by ISAS according to their importance. This importance is called the warning level. In the message explanation, the value indicating the warning level is described in the parentheses of "Warning()". To specify whether to display the warning according to the warning level, use the -w option when starting ISAS .
The relationship between the warning level and the parameter <n> of the -w option is as follows.
<n> | Content | Warning level |
---|---|---|
1 | No warning message is displayed when a warning occurs. | |
2 | When a warning occurs, only warning messages of high importance are displayed. | Warning level 2 only |
3 | When a warning occurs, all warning messages will be displayed. | Warning levels 2 and 3 |
By default,
This section explains the messages output by ISAS. In the message explanation, the English message and the type of error or warning are written on the first line, the Japanese message is written on the second line, and the message explanation and the action to be taken are written on the third and subsequent lines. Note that English messages are displayed by default, or the -us option is specified when ISAS is started , and Japanese messages are displayed when the -jp option is specified.
Already PUBALL. | :Warning(2) |
It is already in PUBALL state. | |
The PUBOFF directive is specified after the PUBALL directive . When the PUBALL directive is specified, all symbols except local symbols are declared as externally defined symbols, so the PUBOFF directive cannot be specified to cancel the declaration of externally defined symbols. |
An alignment has available only at next-line of first-group. | :Warning(2) |
The alignment is valid only immediately after the first group. | |
The EVEN directive for adjusting location alignment is not written in the correct position. The EVEN directive must be written from the time the GROUP directive is written in the module until the first opcode is written, or after the ORG directive is written.
rom0 group 0 even 2; correct description ld a,$10; First opcode since GROUP directive : rom0 group 0 : ret org $2000; ORG directive even 2; correct descriptionIf the EVEN pseudo-instruction is written in any part other than the above, this warning will be output because it cannot be guaranteed that the alignment will be adjusted correctly. |
An operand includes uncertain symbol. | :Error |
Unresolved symbols cannot be evaluated. | |
The symbols used in the expression must be known at the time of assembly. When you get this error, you may be using an externally defined symbol in the expression. |
Binary file read failure. | :Error |
Failed to read the binary file. | |
LIBBIN pseudo-instruction error occurred while reading a binary file with the . This is because the size of data specified by the BINSET directive could not be read. Check the size of the binary file and specify the correct value with the BINSET pseudo-instruction . |
Can not create temporary.[] | :Error |
Cannot create temporary file. [] | |
ISAS is the current directory during assembly, or creates a temporary file with the file name displayed in [] in the the environment variable of ISTMP, TEMP TMP is specified, Error occurs when this file cannot be created due to lack of disk space. Check the free disk space. |
Can not declare to external.[] | :Warning(2) |
An already-defined symbol cannot be declared as an external reference. [] | |
It is declared as an external reference by the EXTERN directive with the same name as a previously defined symbol . The symbol with the same name as the external reference symbol is displayed in [].
symbol equ $10 : extern symbol; error occurs here :Change the name of either the external reference symbol or the defined symbol. |
Can not define external symbol.[] | :Warning(2) |
External reference symbols cannot be defined. [] | |
The EXTERN directive has redefined a symbol with the same name as a symbol already declared as an external reference. The symbol with the same name as the external reference symbol is displayed in [].
extern symbol : symbol lda #$00; error occurs here :In such a case, change the name of either the external reference symbol or the defined symbol. |
Can not define macro in macro. | :Warning(1) |
You cannot define a macro inside a macro. | |
Another macro is defined within the macro definition. No other macro can be defined within the macro definition. |
Can not devide by 0. | :Error |
It cannot be divided by zero. | |
I have an expression that divides by zero. It cannot be divided by zero. |
Can not open file.[] | :Error |
The file cannot be opened. [] | |
The file displayed in [] cannot be opened because it cannot be found. Check the specified file name and its directory path. |
Can not redefine symbol.[] | :Warning(2) |
It cannot be redefined. [] | |
A symbol with the same name is defined in more than one place. Change the symbol name displayed in []. Also, when this message is displayed, the following cases are possible.
|
Can not write file. | :Error |
Cannot output to file. | |
The file output by ISAS (object file, list file, error tag file) could not be output normally to the disk. Check the free space on the output destination disk for the file, as there may be insufficient disk space. |
Conflict register. | :Warning(2) |
Register conflict during instruction expansion. | |
The same general-purpose register that the assembler uses when expanding the V810SF instruction is already used. For example,
isv810 rsvreg 1 cmp 65536,r1; Instruction expanded partAt this time, the cmp instruction part is expanded as follows, so the contents of the already used R1 register will be changed by the expansion. movhi 65536'hi1,r0,r1 movea 65536'lo,r1,r1 cmp r1,r1 ;r1 of the right operand to be compared has already been changedThe register used by instruction expansion can be specified by the RSVREG pseudo instruction . For details , refer to the item " RSVREG (for V810SF) " in " Chapter 5 Pseudoinstructions ". |
Duplicate symbol in macro.[] | :Warning(3) |
The symbol is duplicated in the macro. [] | |
The symbol with the same name is used in the parameter substitution symbol and local symbol in the macro definition. Change the symbol name of the same name displayed in []. |
Expression stack over flow. | :Error |
You have run out of stacks needed for calculations. | |
It occurs when formulas such as arithmetic operations are too long in the source file. In such a case, shorten the calculation formula. |
File create failure.[] | :Error |
Failed to create the file. [] | |
The file displayed in [] could not be created. Check the file name and directory path. Also, this error may occur when the value of MS-DOS or PC DOS environment variable FILES is small, so please check if the value of environment variable FILES is too small. |
File read failure.[] | :Error |
Failed to read the file. [] | |
The file displayed in [] cannot be read normally. Check the existence of the file, the file name and the directory path. |
Fit to correct range.[] | :Warning(3) |
I adjusted it to the correct range. [] | |
Even if there is a limit to the range of values that can be written in a particular instruction, when the limit is written, it is masked to fit within the limit. For example, the LD instruction of the V810SF processor allows you to specify a displacement of 16 bits, but if you specify a value outside this 16-bit range, ISAS automatically masks it with 16 bits and displays a warning at the same time. |
Forward reference. | :Error |
Forward reference is not possible. | |
An unknown symbol is used in the operand operation description. The symbol is not defined, or it is a forward-referenced or externally-referenced symbol. |
GROUP symbol error. | :Error |
A symbol defined by a group. | |
The group name declared by the GROUP directive is redefined as a symbol. Change either the group name or the symbol name. |
Ignore character []. | :Warning(3) |
I ignored the character. [] | |
This is displayed when sharp, exclamation (!), or tilde (~) is described after sharp (#) in the immediate addressing specification. |
Illegal operand type.[] | :Error |
Illegal operand type. [] | |
The operand of the mode that the mnemonic does not support is described. For example, it occurs when immediate data is written in an operand with a JMP instruction that does not have immediate addressing.
jmp #$10; This is an error |
Improper addressing. | :Warning(2) |
Improper addressing. | |
The addressing mode of the unresolved operand and the addressing mode supported by the opcode do not match. Specify the prefix to confirm the addressing. |
Improper operand type. | :Warning(2) |
Illegal operand type. | |
Occurs when an operand finds an addressing type that the opcode does not support. Describe the correct addressing mode supported by the opcode. |
Improper range.[] | :Warning(3) |
Inappropriate range. [] | |
This occurs when the addressing value determined by the second pass assembly differs from the addressing value specified by the first pass. For example, the following cases are possible.
lda .ABSADRS; Direct addressing specification : ABSADRS equ 0ffh+1; The effective range of direct addressing is exceeded. : ;RuIn the first pass, direct addressing is specified for the symbol ABSADRS, so the code area is secured as a 2-byte instruction. However, an error occurs because the 2-byte instruction cannot be generated in the second pass because the value that exceeds the valid range (1 byte) of direct addressing is specified in the EQU pseudo instruction . |
Improper scope. | :Warning(1) |
Inappropriate hierarchy. | |
This is a warning that is not normally output. If this message is output, please contact us. |
Incorrect alignment op-code. | :Warning(2) |
Opcode alignment is incorrect. | |
When used for the V810SF processor, some instructions have opcodes allocated from odd addresses. Use the ORG pseudo-instruction and the OFFSET pseudo-instruction to allocate the opcode from even addresses. |
Incorrect alignment pointer. | :Warning(2) |
Some pointers are misaligned. | |
There is an instruction that addresses a symbol at an odd address when using it for the V810SF processor. Use the ORG directive and the OFFSET directive to allocate the symbol being addressed from even addresses. |
Long expression. | :Error |
The formula is too long. | |
The number of characters in the operand exceeds 384 characters. Up to 384 characters can be described in the operand field. |
Macro reference limit over. | :Error |
No more macros can be expanded. | |
The macro cannot be expanded because it has been nested more than 256 times. Make sure your own macro is not nested in the macro definition. Macro definition can be nested up to 256 times. |
Macro table overflow. | :Error |
The macro table is full. | |
It is not possible to register all in the macro table because there are too many macros defined. Define only the required macros, or increase the first value (number of registered macros) of the -m option specified when starting ISAS . The default number of macros that can be defined is 512 and the maximum is 8192. |
Macro text buffer overflow. | :Error |
The macro text buffer is full. | |
The defined macro contents are too large to be registered in the macro text buffer. Register only the necessary macros or shorten the length of symbols described in the macros. Note that deleting a comment in a macro does not affect the text buffer of the macro. Also, increase the second value (macro buffer size) of the -m option specified when starting ISAS . Note that the size of the macro buffer that can be defined is 32768 bytes by default, and the maximum size can be specified only for the amount of memory. |
Missing operand.[] | :Error |
The calculated value or symbol is incorrect. [] | |
It occurs when the operator displayed in [] is described in the part where the calculated value or symbol should be described. |
Missing operator.[] | :Error |
The operator is incorrect. [] | |
It occurs when an operator (operation value or symbol) other than the operator displayed in [] is described in the part where the operator should be described. |
Missing symbol.[] | :Error |
You cannot specify a number as the initial letter of the symbol. [] | |
A number is used as the initial letter of the symbol displayed in []. Use the letters "@", "$", "_", "A" to "Z", and "a" to "z" as the initials of the symbols. |
No macro name. | :Error |
There is no macro name. | |
The macro name is not described in the symbol field of the line that describes the MACRO directive . When defining a macro, you must always specify the macro name. |
Not defining macro.[] | :Error |
Not in macro definition. [] | |
Although the macro definition is not started by the MACRO pseudo instruction , the pseudo instruction displayed in [] used during macro definition is used. For example, it occurs when the ENDM directive is used outside the macro definition. |
Not enough memory. | :Error |
Not enough memory. | |
There is not enough memory to run ISAS. In order to run ISAS, 500K bytes or more is required as the conventional memory of the computer that can execute the application. Also, reduce the -s (symbol table size specification) , -b (input/output file buffer size specification) , and -m (macro number, macro buffer size specification) options that are specified when ISAS is started. Use a smaller memory size. |
Not enough symbol tables. | :Error |
Not enough symbol table. | |
Unable to register all in the symbol table because there are too many global and local symbols in use. Define only the necessary symbols or increase the value of the -s option specified when starting ISAS . The default number of symbols that can be defined is 4091, and the maximum is 65535. |
[] not yet support. | :Warning(3) |
[] is not supported yet. | |
A reserved word specified by ISAS was used. Use a name other than the reserved words shown in []. Reserved words are pseudo-instructions prepared for ensuring compatibility with IS65 and for the future.IF1, IF2, KANJI, ERROR, NERROR, ONMEM, OFFMEM, FINAL, ON816, and OFF816 are reserved words. It has been. |
Op-code decoded. | :Warning(3) |
Instruction expanded. | |
Instruction expansion of specific instruction of V810SF. ISAS performs instruction expansion by default when used as an assembler for the V810SF processor. The expanded instructions are mov , ld/in , st/out , add , addi , cmp , div/divu/mul/mulu/not/sub , movea , and/or/xor , andi/ori/xori , and jmp. This is an instruction , and the presence or absence of expansion can be specified by the RSVREG pseudo instruction . In addition, the DECON directive can be used to specify whether the conditional branch instruction is expanded. See " Chapter 5 Pseudo Instructions " for details on how to use each pseudo instruction, and " Appendix 2 V810SF Instruction Expansion " for details on instruction expansion rules . |
Op-code redefine.[] | :Warning(3) |
[] is already defined. | |
The name of an instruction that already exists is used in the macro name when defining the macro. Change to a macro name other than the name displayed in []. |
Operand is misleading.[] Parenthesis was ignored. | :Warning(3) |
Operand type that is easy to misunderstand. [] Brackets are ignored. | |
Since the parentheses (( )) described as the operator parentheses in the operand are meaningless, ISAS ignores the parentheses and assembles them. For example, assemble the file described as follows with the LD instruction of the DMG processor.
iddmg ld hl,$10; correct description ld hl,($10); Even if you remove the parentheses, you will be warned that the output code is the same.Since the description of the instruction on the second line is the same as the code that is output even if the parentheses are taken, a warning is output and the parentheses are ignored and the instruction is assembled. C:\>isas -w3 test.s INTELLIGENT SYSTEMS Assembler Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. test.s :3: WARNING Operand is misleading.[($10)] Parenthesis was ignored. warnings = 1 C:\> |
Out of range.[] | :Error |
The range is over. I can't reach the destination address. [] | |
The address of the relative instruction exceeds the range of -128 bytes to +127 bytes. Relocate so that it falls within this range. |
Redeclare external symbol.[] | :Warning(2) |
Redeclared the external reference symbol. [] | |
Already EXTERN directive the symbol that is external reference declaration by, EXTERN directive has been declared by the global definition pseudo instructions other than. Please correct the symbol displayed in []. |
Some parameters were not assigned. | :Warning(3) |
Some parameters are missing. | |
There are not enough macro-referenced parameters than the macro-defined parameters. When referencing a macro, be sure to specify as many parameters as there are macro definitions. |
Symbol definition failure in macro. | :Error |
Failed to define symbol in macro. | |
The symbol buffer cannot be defined in the macro because all the symbol buffers provided for macro definition are used. Parameter substitution symbols and local symbols can be used in the macro definition, but all buffers reserved for these symbols have been used. As for the buffer, the number of symbols is 256 and the symbol buffer is 1024 bytes. Reduce the number of symbols or shorten the symbol name. |
Syntax error.[ELSE] | :Error |
Syntax error. [ELSE] | |
The ELSE pseudo-instruction was found outside of the IF and ENDIF pseudo-instructions . Check if the IF - ELSE - ENDIF directives are written in the correct order. |
Syntax error.[ENDIF] | :Error |
Syntax error. [ENDIF] | |
An ENDIF pseudo-instruction was found that is not compatible with the IF pseudo-instruction . Check if the IF directive and ENDIF directive are paired. |
Tempolary file write failure. | :Error |
Failed to write the intermediate code. | |
ISAS outputs a temporary file of intermediate code when assembling, but this file was not written normally. |
Terminate character not found.["] | :Error |
The quotation mark indicating the end of the string cannot be found. | |
There is no double quotation mark (") to specify at the end of the character string. Be sure to describe the character string so that it is enclosed in double quotation marks. If you want to write double quotation marks in the character string, write double quotation marks consecutively. To do.
db "This is ""test""."As a result, you can create the data "This is a "test"." |
The first alignment value must be largest value of all assigned values. | :Warning(2) |
The first alignment value must be the highest of all alignment values. | |
More than one in the group EVEN pseudo instruction when is specified, the first EVEN directive you specify a value greater than the alignment value specified in the EVEN directive is the first EVEN directive has been described in later. In such a case, the alignment value specified by the first EVEN pseudo-instruction can be set to the subsequent EVEN pseudo-instruction. the maximum alignment value specified by the .
rom0 group 0 even 2; This first EVEN pseudo-instruction :; You are warned because you have specified 4 in the decree even 4; and later EVEN pseudo-instructions :If the ORG directive is specified in the middle , the subsequent alignment adjustment will be performed from the address specified by the ORG directive , so the above restriction does not apply. |
Too long op-code. | :Error |
Opcode area is too long. | |
The description in the opcode field is too long. Up to 64 characters can be written in the opcode field. When this error occurs, the operation code, pseudo-instruction, or macro name may be incorrect. |
Too long operand. | :Error |
Operand area is too long. | |
The content of the operand field is too long. Up to 384 characters can be written in the operand field. When this error occurs, shorten the description of the operand, parameter to pseudo instruction, or comment. |
Too long parameters. | :Error |
The parameter is too long. | |
The content of the macro parameter is too long. Up to 384 characters can be written in the operand field. When this error occurs, shorten the parameter description for the macro. |
Too long symbol. | :Error |
The symbol is too long. | |
The declared symbol name is too long. The maximum length of the symbol name is 32 characters for global symbols and 27 characters for local symbols, so keep the symbol names shorter than these limits. |
Too many assigned parameters. | :Warning(3) |
There are too many parameters. | |
The number of parameters is larger in the part that refers to the macro than in the number of parameters defined in the macro. When referencing a macro, be sure to specify as many parameters as there are macro definitions. |
Unbalance left parenthesis [(]. | :Error |
There is an unbalanced left bracket "(". | |
There are more left parentheses than right parentheses. Check the pair of parentheses. |
Unbalance right parenthesis [)]. | :Error |
There is an unbalanced right parenthesis ")". | |
There are more right parentheses than left parentheses. Check the pair of parentheses. |
Undefined group. | :Error |
Group is not defined. | |
No GROUP directive has been declared in the source file . The group must always be declared at the beginning of the source file using the GROUP directive . This error also occurs if the EVEN directive is declared before the GROUP directive . Always, EVEN directive is GROUP directive Please describe later than. |
Undefined symbol.[] | :Error |
The symbol cannot be found. [] | |
The symbol displayed in [] cannot be found. Check the symbol name and, if the referenced symbol is defined externally, specify that it is an externally referenced symbol with the EXTERN directive . |
Unknown op-code.[] | :Error |
I do not understand the instruction. [] | |
The description of the opcode displayed in [] is incorrect. Describe the correct mnemonic, pseudo instruction, or macro name. Also, the opcode must be described in the opcode field in the second and subsequent columns. Refer to " Program Format " in "Chapter 3 Source File" for the program format . |
Unusual expression. | :Error |
It is an abnormal expression. | |
An operator that is not currently supported is used in the expression. For the operators supported by ISAS, refer to " Operator " in "Chapter 4 Expression" . |
This section explains the messages output by ISLK. In the message explanation, the English message and the type of error or warning are written on the first line, the Japanese message is written on the second line, and the message explanation and the action to be taken are written on the third and subsequent lines. Note that English messages are displayed by default, or the -us option is specified when ISLK is started , and Japanese messages are displayed when the -jp option is specified.
Bank over.[] | :Warning |
Crossed the bank. [] | |
The program was created beyond the area size of the bank. When developing a program for the 65816 processor, it is not permissible to place the program across banks. When this warning is output, the following causes are possible.
|
Can not create temporary.[] | :Error |
Cannot create temporary file. [] | |
ISLK creates a temporary directory with the file name displayed in [] in the current directory when linking, or when an environment variable of ISMP, TEMP , or TMP is specified, Error occurs when this file cannot be created due to lack of disk space. Check the free disk space. |
Can not devide by 0. | :Error |
It cannot be divided by zero. | |
I have an expression that divides by zero. It cannot be divided by zero. |
Can not open file.[] | :Error |
The file cannot be opened. [] | |
The file displayed in [] cannot be opened because it cannot be found. Check the specified object file name and its directory path. |
Can not write file. | :Error |
Cannot output to file. | |
The ISX file output by ISLK could not be output normally to the disc. Check the free space on the output destination disk for the file, as there may be insufficient disk space. |
Different case module found. | :Warning |
Includes modules that are not case sensitive. | |
Among the linked modules, some modules specify the CAPSON directive (or do not specify the CAPSOFF/SMALL directive ) and some modules specify the CAPSOFF/SMALL directive . Be sure to specify the CAPSON directive and the CAPSOFF/SMALL directive for all modules that link the same designation. |
Expression stack over flow. | :Error |
You have run out of stacks needed for calculations. | |
It occurs when formulas such as arithmetic operations are too long in the source file. In such a case, shorten the calculation formula. |
File create failure.[] | :Error |
Failed to create the file. [] | |
The file displayed in [] could not be created. Check the file name and directory path. Also, this error may occur when the value of MS-DOS or PC DOS environment variable FILES is small, so please check if the value of environment variable FILES is too small. |
File read failure.[] | :Error |
Failed to read the file. [] | |
The file displayed in [] cannot be read normally. Check the existence of the file, the file name and the directory path. |
Group has not assigned address.[] | :Error |
No address assigned to the first group. [] | |
The first group that appears must have an absolute address specified, but the corresponding file does not have an absolute address specified. Specify the absolute address with the ORG directive . |
<n> group(s) conflict area detected. | :Warning |
<n> groups overlap. | |
A duplicate area was found in the group allocation address specified by the -G option of ISLK . <n> shows the number of groups that overlap with other groups. When a warning occurs, overlapping groups and their addresses are displayed as shown below. C:\>islk4g sample.o -G text=$ffff0000 -G data=$ffff2000 -G bss=$05000000 INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. Area of [text] group = FFFF:0000-FFFF:2BA5 conflict WARNING! 1 group(s) conflict area detected. C:\>In such cases, use the -v option as follows: you can easily check which group the address overlaps with by specifying the as follows. C:\>islk4g sample.o -G text=$ffff0000 -G data=$ffff2000 -G bss=$05000000 -v INTELLIGENT SYSTEMS Linker Version X.XX for XXXXX Copyright (c) 1993-1998 Nintendo Co., Ltd. Copyright (c) 1993-1998 INTELLIGENT SYSTEMS Co., Ltd. output file: sample.isx *** phase 1 *** sample.o *** phase 2 *** sample.o symbol:167 Area of [text] group = FFFF:0000-FFFF:2BA5 conflict Area of [data] group = FFFF:2000-FFFF:22C7 Area of [bss] group = 0500:0000-0500:9157 End of [vec] group = FFFF:0017 WARNING! 1 group(s) conflict area detected. range:23 C:\> |
Incorrect alignment op-code. | :Warning |
Opcode alignment is incorrect. | |
When used for the V810SF processor, some instructions have opcodes allocated from odd addresses. Use the ORG pseudo-instruction and the OFFSET pseudo-instruction to allocate the opcode from even addresses. |
Incorrect alignment pointer. | :Warning |
Some pointers are misaligned. | |
There is an instruction that addresses a symbol at an odd address when using it for the V810SF processor. Use the ORG directive and the OFFSET directive to allocate the symbol being addressed from even addresses. |
Missing symbol.[] | :Error |
You cannot specify a number as the initial letter of the symbol. [] | |
A number is used as the initial letter of the symbol displayed in []. Use the letters "@", "$", "_", "A" to "Z", and "a" to "z" as the initials of the symbols. |
Not enough memory. | :Error |
Not enough memory. | |
There is not enough memory to run ISLK. In order to operate ISLK, 500K bytes or more is required as the conventional memory of the computer that can execute the application. Also, reduce the memory size used by ISLK by reducing the -s (symbol table size specification) and -b (input/output file buffer size specification) options specified when ISLK is started. |
Not enough symbol buffer. | :Error |
Not enough symbol table. | |
The size of the symbol table secured in conventional memory is insufficient. Increase the symbol table by using the -s option when starting ISLK . The number of symbol tables secured by default is 4091. |
Out of range.[] | :Error |
The range is over. I can't reach the destination address. [] | |
The address of the relative instruction exceeds the range of -128 bytes to +127 bytes. Relocate so that it falls within this range. |
Record length error in []. | :Error |
The record length is abnormal. [] | |
The record length of the object file displayed in [] is incorrect. Assemble and link again because the object file may be corrupted, and check again. |
Symbol defined more than once.[] | :Error |
The symbol values do not match. [] | |
The value of the symbol cannot be determined because the symbol with the same name displayed in [] is externally defined in two or more places. Be sure to declare the symbol external definition using the PUBLIC directive in one place. If you want to distinguish between uppercase and lowercase letters with the same symbol, specify CAPSOFF/SMALL directive . Note that by default, symbols are case-sensitive. |
Symbol out failure. | :Error |
Failed to output the symbol. | |
The symbol information could not be output normally to the ISX file. Check the disk capacity to output the file, as the disk capacity may be insufficient. |
Tempolary file write failure. | :Error |
Failed to write temporary file. | |
The temporary file created by ISLK was not written correctly. |
Too many range information.[] | :Warning |
There is too much range information. [] | |
It was not possible to output all range information to the ISX file because there was too much range information. For example, a module that has been debugged does not need to output range information. By specifying the OFFRNG pseudo-instruction at the beginning of such a module and the ONRNG pseudo-instruction at the end, the range information to be output can be reduced. The current range number is displayed in [], but if this value is adjusted using the ONRNG pseudo -instruction and the OFFRNG pseudo -instruction so that it does not exceed the maximum number of range information that can be output to the ISX file, 65535. Would be good |
Undefined group. | :Error |
Group is not defined. | |
No GROUP directive has been declared in the source file . The group must always be declared at the beginning of the source file using the GROUP directive . |
Unresolved external.[] | :Error |
The symbol is not resolved. [] | |
The actual value cannot be assigned because the symbol displayed in [] is not defined. Check the symbol name, or in the case of an external reference symbol, check if the external reference is declared with the EXTERN directive . |
Unusual expression. | :Error |
It is an abnormal expression. | |
When this error is displayed, the object file may be corrupted. It also occurs when the versions of ISAS and ISLK are different, so check the version and then assemble and link again. |
There are two types of files output by ISLK: ISX files and extended ISX files.
The ISX file is a file that can be read by conventional SHVC debuggers, etc., and is output by specifying the -x24 option when starting ISLK .
In addition to the debug information for symbolic debugging, the extended ISX file also contains information for source level debugging on the debugger. ISLK outputs this extended ISX file by default.
The ISX file has the following format.
Binary information | It stores program code and data, and binary information for arranging them in memory. | ||
Symbol information | The symbol name required for symbolic debugging and the address or data value of that symbol are stored. | ||
Range information | Information on the data definition area and the area showing the bit mode of the accumulator and intex is stored. |
If the -n option is specified when ISLK is started, symbol information and range information will not be output to the ISX file.
Binary information is records that start with record type 01H. The format differs when the value of bank allocation information is 7FH or less and when it is 80H or more.
1 | Record type (01H) | block | |||
1 | Bank (00H-7FH) | ||||
2 |
|
||||
2 |
|
||||
n | Data (n bytes) | ||||
If there is data to place, the above block is repeated |
1 | Record type (01H) | block | |||
2 |
|
||||
2 |
|
||||
2 |
|
||||
n | Data (n bytes) | ||||
If there is data to place, the above block is repeated |
The symbol information is a record that starts with record type 04H.
1 | Record type (04H) | header | |||
2 |
|
||||
1 | Symbol length | block | |||
n | Symbol name (n bytes) | ||||
1 | flag | ||||
1 | bank | ||||
2 |
|
||||
Number of symbols-1 minute The above block is repeated |
When creating a program that converts the symbol file output by another assembler into the ISX file format, set 10H in the flag part.
Range information is a record that starts with record type 03H.
1 | Record type (03H) | header | |||
2 |
|
||||
1 | bank | block | |||
2 |
|
||||
2 |
|
||||
1 | Range species | ||||
Number of ranges-1 minute The above block is repeated |
For range type, the type of pseudo-instruction that specifies data is described in 1-byte ASCII characters. Note that range types E, F, G, and H are output only when ISAS is used for the 65816 processor.
Range species | meaning |
---|---|
A | Data area specified by single quotation ('') or double quotation (" ") in DEFB/DB directive |
B | Data area in which 1-byte data is specified by the DEFB/DB directive |
W | DEFW / DW directive specified data area or V810SF processor during, DEFH / DH directive data area specified by |
D | Data area specified by DEFD/DD directive |
L | DEFL / DL directive specified data area or V810SF processor during, DEFW / DW directive data area specified by |
S | Area specified by DEFS/DS directive |
C | Code area where instructions are located |
E | 65816 Code area specified by the OFF16A and OFF16I pseudo instructions when the processor is used |
F | 65816 Code area specified by the OFF16A and ON16I pseudo instructions when the processor is used |
G | Code area specified by ON16A and OFF16I pseudo instructions when the 65816 processor is used |
H | Code area specified by ON16A and ON16I pseudo instructions when the 65816 processor is used |
The extended ISX file has the following format.
Header information | Stores the header information of the extended ISX file. | ||
Binary information | Stores program code and data, and information for arranging them in memory. | ||
Symbol information | The symbol name required for symbolic debugging and the address or data value of that symbol are stored. | ||
Range information | Information on the data definition area and the area showing the bit mode of the accumulator and intex is stored. | ||
Debug information | Contains debug information required for source level debugging. Please note that the debug information for this part is not available. |
If the -n option is specified when starting ISLK, symbol information, range information, and debug information will not be output to the ISX file.
32-byte header information is provided at the beginning of the extended ISX file. Information such as the version of the extended ISX file is stored in this header information.
Binary information is records that start with record type 11H. If the address is FFFFFFH or less, it will be output in the binary information format of the ISX file.
1 | Record type (11H) | block | |||
Four |
|
||||
Four |
|
||||
n | Data (n bytes) | ||||
If there is data to place, the above block is repeated |
The symbol information is a record that starts with record type 14H.
1 | Record type (14H) | header | |||
2 |
|
||||
1 | Symbol length | block | |||
n | Symbol name (n bytes) | ||||
1 | flag | ||||
Four |
|
||||
Number of symbols-1 minute The above block is repeated |
Range information is a record that starts with record type 13H.
1 | Record type (13H) | header | |||
2 |
|
||||
Four |
|
block | |||
Four |
|
||||
1 | Range species | ||||
Number of ranges-1 minute The above block is repeated |
For range type, the type of pseudo-instruction that specifies data is described in 1-byte ASCII characters. Note that range types E, F, G, and H are output only when ISAS is used for the 65816 processor.
Range species | meaning |
---|---|
A | Data area specified by single quotation ('') or double quotation (" ") in DEFB/DB directive |
B | Data area in which 1-byte data is specified by the DEFB/DB directive |
W | DEFW / DW directive specified data area or V810SF processor during, DEFH / DH directive data area specified by |
D | Data area specified by DEFD/DD directive |
L | DEFL / DL directive specified data area or V810SF processor during, DEFW / DW directive data area specified by |
S | Area specified by DEFS/DS directive |
C | Code area where instructions are located |
E | 65816 Code area specified by the OFF16A and OFF16I pseudo instructions when the processor is used |
F | 65816 Code area specified by the OFF16A and ON16I pseudo instructions when the processor is used |
G | Code area specified by ON16A and OFF16I pseudo instructions when the 65816 processor is used |
H | Code area specified by ON16A and ON16I pseudo instructions when the 65816 processor is used |
Debug information is records that start with record type 20H, 21H or 22H.
1 | Record type (20H/21H/22H) | header | |||
Four |
|
||||
Debug information | Information for the record length is stored |
This section describes the rules for instruction expansion that is performed during assembly when ISAS is used as the V810SF assembler.
First, the meaning of the symbols used in the explanation of instruction expansion is explained.
symbol | meaning |
---|---|
imm | 32-bit immediate |
imm16 | 16-bit immediate |
imm5 | 5-bit immediate |
zero | Zero register |
reg1, reg2 | General-purpose registers other than zero register |
resv | Registers reserved by the RSVREG directive |
disp | 32-bit displacement |
disp16 | 16-bit displacement |
Note that expressions modified by postfix unary operators such as'lo ,'hi, and'hi1 are forcibly treated as unsigned 16-bit or signed 15-bit values, and expanded to instructions that handle disp16 or imm16 operands. Will be done. However, this does not apply to operands qualified by the ASSUME directive .
The mov instruction (mov imm,reg2) is expanded as follows.
mov imm5,reg2
movea imm16,zero,reg2
movhi (imm)'hi,zero,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,reg2
The ld/in instruction (CMD disp[reg1],reg2) is expanded as follows. CMD in the description stands for ld.b, ld.h, ld.w, or in.b, in.h, in.w instructions.
CMD disp16 [reg1],reg2
movhi (disp)'hi1,reg1,resv CMD (disp)'lo[resv],reg2
The st/out instruction (CMD reg2,disp[reg1]) is expanded as follows. CMD in the description stands for st.b, st.h, st.w, or out.b, out.h, out.w instructions.
CMD reg2,disp16 [reg1]
movhi (disp)'hi1,reg1,resv CMD reg2,(disp)'lo[resv]
The add instruction (add imm,reg2) is expanded as follows.
add imm5,reg2
addi imm16,reg2,reg2
movhi (imm)'hi,zero,resv add resv,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,resv add resv,reg2
The addi instruction (addi imm,reg1,reg2) is expanded as follows. If the same register is specified for reg1 and reg2, it will be judged as add imm,reg2 and assembled.
addi imm16,reg1,reg2
movhi (imm)'hi,zero,reg2 add reg1,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,reg2 add reg1,reg2
The cmp instruction (cmp imm,reg2) is expanded as follows.
cmp imm5,reg2
movea imm16,zero,resv cmp resv,reg2
movhi (imm)'hi,zero,resv cmp resv,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,resv cmp resv,reg2
The div/divu/mul/mulu/not/sub instruction (CMD imm,reg) is expanded as follows. In the description, CMD represents a div, divu, mul, mulu, not, or sub instruction.
CMD zero,reg2
mov imm5,resv CMD resv,reg2
movea imm16,zero,resv CMD resv,reg2
movhi (imm)'hi,zero,resv CMD resv,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,resv CMD resv,reg2
The movea instruction (movea imm,reg1,reg2) is expanded as follows. When a zero register is specified for reg1, it is judged as mov imm,reg2 and assembled.
movea imm16,reg1,reg2
movhi (imm)'hi,reg1,reg2
movhi (imm)'hi1,reg1,resv movea (imm)'lo,resv,reg2
The and/or/xor instruction (CMD imm,reg2) is expanded as follows. In the description, CMDi represents andi, ori, and xori instructions, and CMD represents and, or, and xor instructions.
CMD zero,reg2
CMDi imm16,reg2,reg2
mov imm5,resv CMD resv,reg2
movea imm16,zero,resv CMD resv,reg2
movhi (imm)'hi,zero,resv CMD resv,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,resv CMD resv,reg2
The andi/ori/xori instructions (CMDi imm,reg1,reg2) are expanded as follows. In the description, CMDi represents andi, ori, and xori instructions, and CMD represents and, or, and xor instructions. If the same register is specified for reg1 and reg2, it will be judged as CMD imm,reg2 and assembled.
CMDi imm16,reg1,reg2
mov imm5,reg2 CMD reg1,reg2
movea imm16,zero,reg2 CMD reg1,reg2
movhi (imm)'hi,zero,reg2 CMD reg1,reg2
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,reg2 CMD reg1,reg2
The jmp instruction (jmp imm) is expanded as follows.
movhi (imm)'hi1,zero,resv movea (imm)'lo,resv,resv jmp [resv]
The Bcond instruction (Bcond imm) is expanded as follows when the DECON pseudo instruction is specified. Bcond in the description represents a bgt, bge, blt, ble, bh, bnh, bl, bnl, be, bne, bv, bnv, bn, bp, bc, bnc, bz, or bnz instruction.
Bncond *+6 ;Invert condition of conditional branch instruction jr imm
Bcond imm
This section explains how a DOS/4GW application uses the memory on an 386-based PC/AT. The basic memory layout of an AT machine consists of 640KB of DOS memory. 384KB of upper memory, and an undetermined amount of extended memory.DOS memory and upper memory together compose real memory, the memory that can be addressed when the processor is ruuning in real mode.
┌───────┐ │ Extended │ │ Memory │ 1MB → ├───────┤ │ Upper │ ← ROMs and Hardware │ Momory │ 640KB → ├────────┤ │ DOS │ ← DOS and Real-Mode Software │ Memory │ 1KB → ├───────┤ │ │ ← Interrupt Vectors └───────┘ Basic Memory Layout
Under DOS/4GW, the first megabyte of physical memory-the real memory-is mapped as a shared linear address space.This allows your application to use absolute addresses in real memory, to access video RAM or BIOS ROM, for example. real memory is available to all processes, you are not guaranteed to be able to allocate a particular area in real memory: another process may have allocated it already.
Most code and data is placed in a paged linear address space starting at 4MB.The linear address space starts at 4MB, the first address in the second page table, to avoid conflicts with VCPI system software.
This split mapping-an executable that is linked to start at 4MB in the linear address space, with the first MB in the address space mapped to the first MB of physical memory-is called a split flat model.
┌───────┐ ┌───────┐ │ │ ↑ │ │ Process code ├───────┤ │ │ and data │ │ Mapped │ │ ├───────┤ as 4MB → ├───────┤ │ │ needed │ │ 1-4MB unmapped ├───────┤ │ VCPI code │ for VCPI │ 4KB pages │ ↓ │ │ compatibility 1MB → ├───────┤ ├───────┤ │ │ ↑ │ │ ↑ DOS and │ │ │ │ Real Mode ├───────┤ ├───────┤ Software│ │ Mapped │ │ Mapped into │ │ to all │ │ process as │ │ processes │ │ needed │ │ │ │ │ │ 4KB → ├───────┤ ├───────┤↓ │ │↓ 1KB → └───────┘ └───────┘ Physical Memory/Linear Address Space
The 1KB label in the diagram indicates the top of the real-mode interrupt vectors.4MB marks the end of the first page.
This section explains how to use the DOS4G environment variable to suppress the banner that is displayed by DOS/4GW at startup.It also explains how to use the DOS16M environment variable to select the switch mode setting, if necessary, and to specify the range of extended memory in which DOS/4GW will operate.DOS/4GW is based on Rational Systems'DOS/16M 16-bit Protected-Mode support; hence the DOS16M environment variable name remains unchanged.
The banner that is displayed by DOS/4GW at startup can be suppressed by issuing the following command;
set DOS4G=quiet
Do not insert a space between DOS4G and the equal sign.A space to the right of the equal sign is optional.
In almost all cases, DOS/4GW programs can detect the type of machine that is running and automatically choose an appropriate real- to protected-mode switch technique.For the few cases in which this default setting does not work we provide the DOS16M DOS environment variable, which overrides the default setting.
Change the switch mode settings by issuing the following command:
set DOS16M=value
Do not insert a space between DOS16M and the equal sign.A space to the right of the equal sign is optional.
The table below lists the machines and the settings you would use with them. Many settings have mnemonics, listed in the column "Alternate Name", that you can use instead of the number.Settings that you must set with the DOS16M variable have the notation req'd in the first column.Settings you may use are marked option, and settings that will automatically be set are marked auto.
Status | Machine | Setting | Alternate Name | Comment |
---|---|---|---|---|
auto | 386/486 w/DPMI | 0 | None | Set automatically if DPMI is active |
req'd | NEC 98-series | 1 | 9801 | Must be set for NEC 98-series |
auto | PS/2 | 2 | None | Set automatically for PS/2 |
auto | 386/486 | 3 | 386,80386 | Set automatically for 386 or 486 |
auto | 386 | INBORAD | None | 386 with Intel Inboard |
req'd | Fujitsu FMR-70 | Five | None | Must be set for Fujitsu FMR-70 |
auto | 386/486 w/VCPI | 11 | None | Set automaticakky if VCPI detected |
req'd | Hitachi B32 | 14 | None | Must be set for Hitachi B32 |
req'd | OKI if800 | 15 | None | Must be set for OKI if800 |
option | IBM PS/55 | 16 | None | May be needed for some PS/55s |
In addition to setting the switch mode as described above, the DOS16M environment variable enables you to specify which portion of extended memory DOS/4GW will use.The variable also allows you to instruct DOS/4GW to search for extra memory and use it if it is present.
Normally, you don't need to specify a range of memory with the DOS16M variable.You must use the variable, however, in the following cases:
If none of these conditions applies to you, you can skip this section.
The general syntax is:
set DOS16M=[switch_mode][@start_address[-end_address]][:size]
In the syntax shown above, start_address, end_address and size represent numbers, expressed in decimal or in hexadecimal (hex requires a 0x prefix).The number may end with a K to indicate an address or size in kilobytes, or an M to indicate megabytes .If no suffix is given, the address or size is assumed to be in kilobytes.If both a size and a range are specified, the more restrictive interpretation is used.
The most flexible strategy is to specify only a size.However, if you are running with other software that does not follow a convention for indicating its use of extended memory, and these other programs start before DOS/4GW, you will need to calculate the range of memory used by the other programs and specify a range for DOS/4GW programs to use.
DOS/4GW ignores specifications (or parts of specifications) that conflict with other information about extended memory use. Below are some examples of memory usage control:
set dos16m=1@2m-4m | Mode 1, for NEC 98-series machines, and use extended memory between 2.0 and 4.0MB. |
set dos16m=:1m | Use the last full megabyte of extended memory, or as much as available limited to 1MB. |
set dos16m=@2m | Use any extended memory available above 2MB. |
set dos16m=@0-5m | Use any abailable extended memory from 0.0 (really 1.0) to 5.0MB. |
set dos16m=:0 | Use no extended memory. |
As a default condition DOS/4GW applications take all extended memory that is not otherwise in use.Multiple DOS/4GW programs that execute simultaneously will share the reserved range of extended memory.Any non-DOS/4GW programs started while DOS/4GW programs are executing will find that extended memory above the start of the DOS/4GW range is unavailable, so they may not be able to run.This is very safe.There will be a conflict only if the other program does not check the BIOS configuration call ( Interrupt 15H function 88H, get extended memory size).
The default memory allocation strategy is to use extended memory if available, and overflow into DOS (low) memory.
In a VCPI or DPMI environment, the start_address and end_address arguments are not meaningful.DOS/4GW memory under these protocols is not allocated according to specific addresses because VCPI and DPMI automatically prevent address conflicts between extended memory programs.You can specify a size for memory managed by VCPI or DPMI, but DOS/4GW will not necessarily allocate this memory from the highest available extended memory address, as it does for memory managed under other protocols.
Some machines contain extra non-extended, non-conventional memory just below 16MB.When DOS/4GW runs on a Compaq 386, it automatically uses this memory because the memory is allocated according to a certain protocol, which DOS/4GW follows.Other machines have no protocol for allocating this memory.To use the extra memory that may exist on these machines, set DOS16M with the + option.
set DOS16M=+
Setting the + option causes DOS/4GW to search for memory in the range from FA0000 to FFFFFF and determine whether the memory is usable.DOS/4GW does this by writing into the extra memory and reading what is has written.In some cases, this memory is mapped for DOS or BIOS usage, or for other system uses.If DOS/4GW finds extra memory that is mapped this way, and is not marked read- only, it will write into that memory.This will cause a crash, but won't have any other effect on your system.