Select CPU type. Available values are: 8080, 8008, Z80, 6502, M6800, CDP1802, M6809, C65816
Controls machine type for emulation (only in online ASM80). Available values are: PMI, PMD, JPR, KIM, SBCZ80, SBC6502, SBC09, ZXS and CPM
Makes S19 file in addition to the HEX
Makes SNA file instead of HEX (only for Z80)
Makes TAP file instead of HEX (only for Z80)
Makes C64's PRG file instead of HEX (only for 6502) [read more] .PRAGMA PRG ;says “make .PRG instead of .HEX” .ORG $0810 ;or higher .ENT $ ;for “enter here”
Makes CP/M COM file instead of HEX (only for Z80/8080) [read more]
Makes HTML listing (instead of LST)
Make separate HEX files for cseg, dseg and eseg (without this pragma are all of them in one HEX)
Make HEX records X bytes long (e.g. .pragma hexlen,8 will make very short HEX line). Usable when some software needs exact length of a HEX record.
All float numbers are stripped down to the integer (just drop all the digits after the decimal point)
All FP numbers are rounded to their nearest integer
Starting address for binary download, default is 0. (Only valid for "Download BIN" function in IDE)
Last address for binary download (this address WILL NOT BE INCLUDED in binary file) Default is 65536. (Only valid for "Download BIN" function in IDE)
Throws an error during compile phase.
Define Byte. The argument is a comma separated list of string literals or numeric expressions. The string literals are inserted in the object code, and the result of the numeric expression is inserted as a single byte, truncating it if needed. You can use DUP for entering N same values: DB 10 DUP (123) means "10 times value 123"
Define Word. The argument is a comma separated list of numeric expressions. Each numeric expression is evaluated as a two byte word and the result inserted in the proper "endianity". You can use DUP for entering N same values: DW 10 DUP (123) means "10 times value 123"
Define Double Word. The argument is a comma separated list of numeric expressions. Each numeric expression is evaluated as a four bytes and the result inserted in the proper "endianity".
Define Float number. The argument is a comma separated list of numeric expressions. Each numeric expression is evaluated as an IEEE-754 32bit floating point number and the result inserted in the proper "endianity".
Define double precision Float number. The argument is a comma separated list of numeric expressions. Each numeric expression is evaluated as an IEEE-754 64bit floating point number and the result inserted in the proper "endianity".
ds (aliases: defm, defs, rmb)
Define Space. Take one argument, which is the amount of space to define, in bytes.
Fill memory with a value. Take two arguments, the first is a value, the second is length of filled block (byte count).
Fill memory with a given count of zeros.
When you need write a zero-ended string (C style), you can use
DB "Hello",0 - or simple
Similar as .cstr, but there is no trailing zero. .pstr is a Pascal-style string: first byte is length, then string. So
.pstr "Hello" is equal to
DB 5, "Hello".
Strings are often defined as simple ASCII, where the last byte has bit 7 set to 1. So
.istr "Hello" is the same as
Include a file. The file is readed and the result is the same as if the file were copied in the current file instead of the INCLUDE line. The file included may contain INCLUDE directives, and so on. INCLUDE directives are processed before the assembly phases, so the use of IF directives to conditionally include different files is not allowed.
Include a part of a file, or better say: the block with given name from a file. The file is searched for the .block name ... .endblock sequence. and the result is the same as if the block were copied in the current file instead of the INCLUDE line.
You can use the placeholder "this" as a file name. In that case parser will use the same file for looking, e.g. .include this:common includes the "common" block from the same file.
Include a binary file. No parsing, no compiling, just a bunch of DBs.
ORiGin. Establishes the origin position where to place generated code. Several ORG directives can be used in the same program, but if the result is that code generated overwrites previous, the result is undefined.
ENTer point for debugging. I.e. .ent $
The .align directive causes the next data generated to be aligned modulo N bytes.
Continue to produce code and data for loading at the current address but assemble instructions and define labels as if they originated at the given address. Useful when producing code that will be copied to a different location before being executed.
EQUate. Must be preceded by a label. The argument must be a numeric expression, the result is assigned to the label. I.e. VIDRAM equ $4000
Variable equate. Must be preceded by a label. The argument must be a numeric expression, the result is assigned to the label. The main difference between .set and equ is that the EQU cannot be redefined, but .SET can be overwrited later in the source code
Contional assembly. The argument must be a numeric expression, a result of 0 is considered as false, any other as true. If the argument is true the following code is assembled until the end of the IF section is encountered, else is ignored. The IF section is ended with a ENDIF directive. IFs can be nested (from version 2.5.2).
The IF branch, valid for false condition.
End of MACRO definition or REPT cycle.
Start of logical block. All labels, defined in this block, are local. It means you can’t reference them from outside the block. If you want to define a label globally, simply prefix it with ‘@’, like @LABEL: Good idea is to enclose INCLUDEd code into block. Block can have its own name, e.g. .block serial It is usable with .include directive to include only specific block from a file. Just use .include library.a80:serial - syntax is file:block - with a colon as a separator.
Segments has its own independent ORG pointers, so you can e.g. defined, that data segment begins at 8000h. You can mix data and code together as you need, but assembler keeps code in one chunk, data in another etc.
Following code is a program (code segment - default)
Following source code is a data (data segment)
Following source code belongs to third segment (extended)
Following source code is a not-initialized segment. ASM allows only DS and such directives, which does not generate any content
Allows the user to set which memory page the assembler will use for the direct page addressing mode. if "SETDP $D0" is encountered, the assembler will then use direct addressing for any address in the range of $D000 to $D0FF. This directive does not actually affect the contents of the direct page register.
Enables HD6309 added instructions in the 6809 assembler sources