Assembler commands

This is an index of all desired directives
-NAME means that it's not implemented.
*NAME means that it's not fully implemented and it also means FIXME!

Even if a directive is not implemented you're welcome to write documentation on it which would be a good reference for TMA developers.


@endnode @snode"Structure definitions" Syntax: struc_name STRUC [] [OFFSET ] Compatible to MASM,TASM,A86,A386 This directive will enable you to define data structures starting at address 0 by default. Latter can be changed by using the OFFSET directive and you may also define an effective address that will be used when reffering to the structure's items. It will be ignored if you use another effective addresses. A structure must be ended by the ENDS directive. Example : example STRUC [ES:BP] var1 DW ? ;ES:[BP+var1] var2 DW ? ;ES:[BP+var2] tab1: DW ?,?,? ;OFFSET tab1 ENDS To initialise a structure just use its name and add the contents as parameters. If you want to fill an item with multiple values, you'll have to put them in angle braces. example wert1,wert2,<10,20,30> Items without a fixed size In case you want to implement items without a fixed size use the string STRING directive which just resets the address pointer to 0. The STRINGed and the following item will start at this address again. menu_block STRUC typ DB ? typname: STRING routine DW ? ENDS menu_block FIXME! Nested structures You may use structures within structures. dim STRUC x DW ? y DW ? ENDS winstruc STRUC [BP] OFFSET 4 winpos dim winsize dim winmax dim winmin dim ENDS When referring to them use a dot to signal that you use a nested item. z.B.: MOV winpos.x,AX Always the last structure setting for default effective addresses are used. OFFSETs are added. @endnode FIXME! @snode"OPTION" Syntax : OPTION [Operand] Compatible to MASM v6.x This directive enables you to define the way labels are handled. They override command line paramters on TMA. The following settings are supported. CASEMAP: This is for label case handling. d ALL Converts lowercase labels to uppercase NONE Don't convert anything. Lower- and uppercase labels are different in this mode. FIXME! NOTPRIVATE When defining a label as PUBLIC or EXTRN no conversion is done. DOTNAME Allow dots as a part of label names. d NODOTNAME Don't allow dots as a part of a label name M510 Tells TMA to behave like MASM 5.1 NOM510 Tells TMA to behave like MASM 6.x OLDMACRO Tells TMA to handle macros like MASM 5.1. d NOOLDMACRO Tells TMA to handle macros lile MASM 6.x OLDSTRUCTS Tells TMA to handle structures like MASM 5.1 d NOOLDSTRUCTS Tells TMA to handle structures lile MASM 6.x d SCOPED Tells TMA to handle labels within PROC scopes as LOCAL. NOSCOPED Tells TMA to handle labels within PROC as usual labels. EPILOGUE: Defines a new epilogue for procedure entries. PROLOGUE: Defines a new prologue for procedure exits. LANG: Defines the language type. C They override memory model settings and can also be PASCAL used with PROC, EXTRN or PUBLIC. TPASCAL SYSCALL is an alias for C but no underlines will be BASIC added to labels when using it. SYSCALL In case you use STDCALL you'll have to take care of STDCALL the stack before returning from a procedure and as long as you don't use VARARG. EXPR16 Defines the standard size of an expression d EXPR32 (in MASM 5.1 mode EXPR16 is the default) FLOAT:Typ Define floating point handling. INLINE Tells TMA to generate FPU opcodes. EMULATOR Tells TMA to generate emulation fix-ups for the linker. d LJMP Activate/deactivate automatic jump distances. NOLJMP NOKEYWORD: Excludes from TMAs keyword tables. NOSIGNEXTEND Deactivates usage of sign extended versions of AND, OR and XOR. OFFSET:Typ SEGMENT GROUP FLAT READONLY NOREADONLY @endnode @snode"ORG" Syntax : ORG
[,] Compatible to any ORG sets the actual code offset in the current segment. Default is 100h. The second parameter move the generated code to that position. @endnode @snode".MODEL" Syntax : .MODEL TINY/SMALL/MEDIUM/COMPACT/LARGE/HUGE<,langtype> Compatible to MASM, TASM This directive sets the memory model and so tells TMA how to handle segments and their names and how to recognize class names. Default is tiny. TINY : Code size: <=64k NEAR Data size: <=64k NEAR Code, data and stack are put into a single 64k segment. SMALL : Same as TINY but segments are stored separately. MEDIUM : Code size: any Data size: <=64k NEAR COMPACT : Code size: <=64k NEAR Data size: any LARGE : Code size: any Data size: any Arrays are accessed NEAR by high level languages and should not be larger than 64k. HUGE : Same as LARGE but arrays are accessed FAR by high level languages and may have any size. @endnode @snode"@DATA" Syntax : @DATA (constant) Compatible to MASM v6.x This is an alias for a unique standard data segment. @endnode @snode"@WORDSIZE" Syntax : @WORDSIZE (constant) Compatible to MASM v6.x This constant returns the current segment size in WORDs. @endnode @snode"@VERSION/@TMAVERSION" Syntax : @VERSION/@TMAVERSION (constants) Compatible to MASM v6.x This aliases return a string containing the version of the MASM TMA currently emulates. For MASM 6.1 it is "610". @TMAVERSION return its release number not date. @endnode @snode"#IF/#ELSE/#ELSEIF/#ENDIF" Syntax: #IF