home *** CD-ROM | disk | FTP | other *** search
- DOCUMENTATION FOR INASM VERSION 1.0
- -----------------------------------
-
-
- Thank you for trying my product. This Assembler produces Turbo
- Pascal and Modula-2 Inline Sourcefiles. In Turbo Pascal 6.0 you
- don't have to use it, because Turbo Pascal 6.0 has its own Inline
- Assembler.
-
- The Syntax is:
-
- [Label:] OPCODE|[Directive][,Arg1[Arg2]] [; Comments]
-
-
- The Inline - Assembler is totally compatible to MASM. But because
- of the relocatible code produced by the Assembler there are no
- Statements for segmentation, procedures and functions. Therefore
- Macros, Constants, External Variables, and all necessary
- Assemblerfunctions are supported. This assembler should only be
- used to assemble small parts of code, which can speed up a program
- very significantly. For example if you are programming a
- texteditor you write whole the program in pascal or modula
- sourcecode, but to speed up screen output, you can write an
- inlineprocedure, that uses DMA to move data to screen.
-
- EXT
- ---
-
- Syntax: LABEL EXT
-
- Meaning: This label is a external variable, and shall be
- referenced
- by your compiler.
-
- EQU
- ---
-
- Syntax: NAME EQU Constant (may be String or value)
-
- Meaning: Name shall be replaced whole the sourcecode with
- Constant.
- Use this feature, to make your programs easier to read. ("Int
- Dosfunction" is better to read than "Int 21H", isn't it?).
-
- SET
- ---
-
- Syntax: NAME SET Calcable constant
-
- Meaning: You can use MASM-Compatible Operators, to calculate a
- value.
-
- DB
- --
-
- Syntax: NAME DB Value, Value,....
-
- Meaning: With this you are able to enter lists of bytes, which you
- could process further.
- DW
- --
-
- Syntax: NAME DW Value
-
- Meaning: The same as DB, but only a Word-Variable is allowed.
-
-
- MACRO-Definition
- ----------------
-
- With INASM you can write Assembler-Macros. It can have as much
- arguments as you like. But you should obtain some rules when
- programming.
-
- 1) Preceed each Argumentname with an Commercial A ("@").
- 2) Don't give names, which are equally to the Assembler Codeset.
- 3) Local labels you should mark especially, because then the text
- is much easier to read.
-
- A Macro can call another Macro, but may not call itself.
-
- Syntax:
-
- NAME MACRO ARG1,ARG2,ARG3,.......
- .
- .
- .
- ENDM
-
- You can test Arguments for their contents. There are IF-ELSE-ENDIF
- Constructs, which can test arguments for their Value.
-
- example:
-
- TEST MACRO @A,@B
- IF @A = AX
- ----> Special treatment for this case
- ELSE
- ----> Another treatment
- ENDIF --> End of Statement
-
-
- BUILT IN INTERPRETER
- --------------------
-
- The built in Interpreter can parse mathematical instructions that
- consists of EQU-Constants, Values and MASM-compatible operators.
- For example you can calculate "(12 * 15 + (12 SHL 5)) OR VALUE1".
- Operators are:
- NOT, AND, OR, XOR, SHL, SHR, DIV, MOD, +, -, *, /, and brackets up
- to 15 levels. Values can be entered in decimal, hexadecimal, and
- binary digits:
- 1234 ---> decimal
- 1234H ---> hex
- 1010B ---> binary
-
-
- ERRORS
- ------
-
- INASM produces several errors, when there is something in the
- Sourcecode INASM doesn't understand.
-
- Error:
-
- 1. Illegal Digits
-
- Maybe you forgot the base directives in a value.
-
- 2. Error in strings
-
- You entered characters, that are not allowed in a string.
-
- 3. Wrong characters
-
- This error occurs, when an argument of a macro is not OK.
-
- 4. Label not defined
-
- You referenced a label, you did not define - check your source
- code.
-
- 5. Illegal String
-
- You entered a string, that is not allowed. Strings are only
- allowed when using the DB - directive.
-
- 6. Division by zero
-
- Produced by the built in Interpreter while calculating an
- expression.
-
- 7. Label double defined
-
- Check your sourcecode for the first apearance of the dis-
- played label.
-
- 8. Rangecheck error
-
- This error occurs only while the Interpreter calculates an
- expression (Integer, Cardinal, Word, Byte, Shortint variables)
-
- 9. Conversion error
-
- If this error occurs there's a bug in INASM and you should
- report this error to me, so that I can help you solving
- your problem.
-
- 10. Variable double defined
-
- There's a Variable defined double. Maybe you did not think of
- the restriction of variables to 15 Characters.
-
-
-
- 11. Phase Error
- This error occurs only when referencing forward defined labels
-
- 12. Macro error
-
- There's an error in the definition of the macro. Check Syntax.
-
- 13. Bracket error
-
- Interpreter error: The number of opened and closed Brackets
- does not correspond.
-
- 14. Opcode Error
-
- Wrong opcode. Maybe you started the Assemblerline in the first
- column. This is forbidden. Opcodes must start at least in
- Column 2.
-
- 15. Different Macros
-
- You cannot define a macro inside of another macro. There's no
- need doing so. Just extract this macro to another primary
- macro.
-
- 16. ELSE without IF
-
- 17. ENDIF without IF
-
- 18. IF without ENDIF
-
- 19. MACRO without ENDM
-
- See the description of MACRO-Syntax above.
-
-