This article covers following topics:
Project files (.newasm_proj file) are files that define information about your NewASM project. General name format for them is:
<entry file name>.newasm_proj
For example, if my input file is index.asm, project file for that would be index.asm.newasm_proj. This is basically an INI file.
Tip
Project files are automatically generated when you run the application for the first time.
| Key name | Description |
|---|---|
name |
Name for your project. |
version |
Version of your project. |
dlibs |
Dynamic libraries your project is using. |
Example index.asm.newasm_proj file:
name = Unnamed project
version = 0.0.1
dlibs = testlib, sayhiTip
If you don't use any dynamic libraries, just do dlibs = nil.
Dynamic libraries (.newasm_dl file) are files that provide user-made instructions. For example, let's say this is a NewASM dynamic library you wrote:
sayhi.newasm_dl:
.start
mov tlr, "hi from my dynamic library\n"
mov fdx, 1
sysenter "ios"
syscallIn your entry file - index.asm, you can do this:
.start
mov tlr, "some stuff"
inc prp ; bunch of operations
; more stuff...
sayhi ; your very own custom instructionThis is literally a fancy way of making procedures, making them reusable across files, however there are limits:
- You cannot create labels.
- You thus cannot use jump instructions such as
jmp,je,jneand more.
If you make an error inside a dynamic library, you will get an ahead-of-time error while the library was getting implemented. Below is a list of AOT errors that may occur:
| Ahead-of-time error code | Description |
|---|---|
1 |
Tried to create a label. |
2 |
Tried to use an unsupported instruction. |