Releases: bracesoftware/newasm
beta
xd
build 32
NewASM Release Notes
Welcome to NewASM: a low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 32 - Version of the runtime:
16 - Kernel version:
10
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Added the new
resbinstruction.
You use this instruction to ask the VM to dedicaten-number of bytes to a specific thread and use it as stack space.
.text
thread myThread -> {
resb 64 ; ask the system for 64 bytes of thread-safe stack space
push 429
push 'c'
push 873.45
}
Now, 64 bytes of stack space we got from the VM is just a part of the heap, but it is internally used as stack space since each thread has its own copy of the stack pointer because of the context-switching.
You can also use the stack instruction, the JIT compiler replaces standard push, pop and stack with internal thread-specialized versions. That means you can call procedures that accept arguments. This approach ensures memory thread-safety and speed.
You can still have access to the global stack from within the child procedures and encapsulated lambda procedures.
- Added instructions for error handling,
tryandcatch.
try
nop ; some code
catch ErrorLabel ; if there was an error, in code above, then jump to label
:ErrorLabel
; code that exits the app normally
; rax is gonna contain error code that was supposed to crash the applicationInstruction try is used to begin a try-catch block. Essentially, try tells the program termination system that it should expect a catch instruction. When your app encounters an error, the program temporarily stops and checks if try was used, if it was it is going to jump to nearby catch instruction and then jump to an error-handling label.
.text
try
fetch nil ; set this ptr to nothing
mov this, 0 ; forcefully invoke an error
; <- since the error happened, code stops here and jumps to catch
nop ; more random code
catch error ; we provide a label
:come_back
; more code
ret 0 ; terminate your program
:error
mov tlr, "Error handled, error code: "
call std::ios::write
mov tlr, *rax ; catch ins stores an error code in rax
call std::ios::writeln
jmp come_backYou can use these in threads, procedures and lambda procedures. It is important to note you cannot have these nested at singular identation level, however you can have a separate try-catch block within a lambda and a thread.
So, you can't do:
try
try
try
catch what
catch smth
catch noIf you call a procedure that contains an error within try-catch block, and that procedure doesn't have its own catch, the procedure forcefully terminates and fallbacks onto the parent try-catch block.
So, you can do:
.text
proc ProcWithError
pddsfdssd ; purposefully try to use a non-existing dyn lib
mov tlr, "hi from ProcWithError"
sysenter "ios"
mov fdx, 1
syscall
halt 0
end
try
call ProcWithError
catch ErrorHandler
try
fetch nil
mov this, 3
nop
catch ErrorHandler
:Continue
zero rax
mov rax, 223 ; exit code
ret *rax ; returns from the whole program to the host OS or newasm shell
:ErrorHandler
mov tlr, "Error properly catched and handled, exit code: "
call std::ios::write
mov tlr, *rax
call std::ios::writeln
jmp ContinueOutput will be:
Error properly catched and handled, exit code: 10
Or you can modify the ProcWithError procedure to just ignore the error with catch nil:
.text
proc ProcWithError
try
pddsfdssd ; purposefully try to use a non-existing dyn lib
catch nil ; just continue with execution
mov tlr, "hi from ProcWithError\n"
sysenter "ios"
mov fdx, 1
syscall
halt 0
endAnd you get the output:
hi from ProcWithError
Error properly catched and handled, exit code: 14
Warnings
- Compiler is going to give you an error if you try to nest these on the same identation level.
- Compiler can optimize and remove empty try-catch blocks, such as:
try
catch smth
- You are going to get a runtime error if you do a
callcwithin a try-catch block if the address you are jumping to has a try-catch block.
- Optimized the following instructions:
heapdbfree
Fixed issues
- Fixed issue #36.
- Fixed issue #38.
- Fixed the
loopinstruction going into an infinite loop when the register is below 0 or 0.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++26 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++26 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 31
NewASM Release Notes
Welcome to NewASM: a low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 31 - Version of the runtime:
15 - Kernel version:
10
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Anonymous functions have been severely improved regarding speed and functionality. Now you can use
callc,retc,loopand such!
.text
thread thisisfun -> {
mov tlr, "this is really fun"
call std::ios::writeln
mov tlr, 908
call std::ios::writeln
mov tlr, 243.4
call std::ios::writeln
mov tlr, (proc)
int 0x3
mov rax, 4
mov tlr, "Hi from lambda in thread\n"
mov fdx, 1
sysenter "ios"
syscall
{:lmao}
syscall
loop rax, lmao
int 0x3
halt 0
(end)
}As you can see, lambdas in threads now have their own labels because the JIT compiler ignores the sealed labels within the (proc) block.
Another stupid example would be:
.text
mov tlr, (proc)
jmp label2
{:label1}
jmp label3
{:label2}
jmp label1
{:label3}
halt 0
(end)- The NewASM compiler now allows following compile-time instructions for implementing very simple logic:
ifdef: checks if a symbol/flag is defined;ifndef: checks if a symbol/flag is not defined;fi: used for ending anifblock.
If you want to combine if-statements, just nest them, you don't need to use fi more than once.
def SMTH, 0
ifdef SMTH
ifndef SMTH_ELSE
; do something
fiThere are no else variants, you have to end each if-block with fi.
- Added a new concept of address fetching - a
fetchinstruction! This instruction is used to fetch a procedure or variable pointer, so we can use it with thethiskeyword. This is very important when optimizing your code because the compiler then can generate code that doesn't do any dictionary lookup.
.data
./data
intg variable: 4
./!data
.text
fetch data::variable ; get variable's address
mov this, 6 ; give it a new value
mov tlr, *this ; dereference the this ptr
call std::ios::writeln ; prints 6As you can see, we look for the variable only once, and then use the pointer, which means we get around 1.75x faster than using the variable's name twice.
We can also fetch addresses of procedures:
.text
fetch std::ios::writeln
mov tlr, "Hello"
call this ; prints Hello
mov tlr, 465
call this
; .. etc
; this is way faster than letting the dispatcher
; look for the procedure every time you use call
; callc is still faster thoIf you don't want a variable to be fetched, use the new @safe attribute.
.data
@safe
intg var: 0
.text
fetch var ; segmentation faultYou can also fetch a context or a tuple and use this as a handle:
.text
fetch tuplename
mov rax, this(1) ; get second element from the tuple
lea this, 4 ; load effective address for that tuple when moving at specific index
fetch ctxname
merge this, () ; delete all ctxname contentsThe this pointer can be used on del, movasx and movaddr as well.
The this pointer can also be used as an operand by the address-of operator:
mov tlr, #this ; returns a safe pointer that doesn't have any access to your computer- You can enable exception source information logging when a program crashes.
.start
using "cfg"
sysenter "cfg"
mov rax, 1
mov fdx, 1
syscall ; now you will see exactly what module of the vm's source code caused the newasm script to crashFixed issues
- Fixed issue #32.
Important notes
- Build 31 of the virtual machine is compiled using C++26.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++26 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++26 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 30
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 30 - Version of the runtime:
13 - Kernel version:
8
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Added compile-time label name mangling with temporary namespaces. Read more in namespace docs!
- The
.textcode section is now a synonym for.start, since the macros are now purely a compile-time thing. - Macros are now inlined at compile-time.
Fixed issues
- Fixed issue #30: compiler wasn't ever reporting any label redefinitions.
- Fixed issue #31: compiler wasn't displaying correct code lines in error messages.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 29
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 29 - Version of the runtime:
12 - Kernel version:
8
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Optimized the
inandoutinstructions. - Added switch-case instruction table optimization, instead of compiling the case line runtime, it is compiled ahead of time and stored as a instruction jump table at the end of the binary file. Binaries are now just bigger, but faster!
- Added compiler optimizations! Now the compiler will do basic peephole optimizations, remove redundant code such as:
.start
mov rax, *rax ; this will get removed immediatelly- Added instructions for calculated calls and returns, mimicking how real functions that C/C++ compiler generates.
Fixed issues
- No issues were reported.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 28
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 28 - Version of the runtime:
11 - Kernel version:
7
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- The
mallocstores a pointer of the newly allocated block into theraxregister, instead oftlr- for performance purposes. - Added move semantics with the exclusive move,
movx, instruction. - Improved performance of the
movinstruction. - Improved performance of the
popandfreeinstructions when they takenilas their parameter. - Optimized several instructions including
threadandevt. - Added
staticattribute for data that cannot be affected withmovx.
Fixed issues
- Fixed issue #27: off-by-one when accessing addresses within newly allocated memory blocks.
- Fixed issue #28: crashing while evaluating contexts.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 27
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 27 - Version of the runtime:
11 - Kernel version:
7
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Added the new
ResolveFileNameback-end function for better file name lookup. - Enhanced the bootloader system with error handling and generic API for banck-end system development.
- Optimized the
retninstruction.
Fixed issues
- Fixed the issue #26: now
retnworks forrax,rbx,immand others.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 26
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 25 - Version of the runtime:
11 - Kernel version:
6
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Added the
undefcompile-time instruction used to undefine symbols declared withdef. - Divided the
fskernel/host services module into two submodules;fs/host, used for interacting with the host machine's files andfs/vdsk, used for interacting with the virtual disk. - Added following system calls for
fs/vdsk:
Module |
ID | Arguments | Description |
|---|---|---|---|
fs/vdsk |
1 |
tlr, stl |
Create a file named tlr, with content in stl. |
fs/vdsk |
2 |
tlr |
Remove a file named tlr. |
fs/vdsk |
3 |
tlr |
Check if a file named tlr exists. |
fs/vdsk |
4 |
tlr |
Create a directory or advance into that directory, go back with ... |
fs/vdsk |
5 |
tlr |
Reads a file named in tlr and stores the data in tlr. |
fs/vdsk |
6 |
tlr, stl |
Opens a file named in tlr and stores the data stored in stl into the file. |
fs/vdsk |
7 |
tlr, stl |
Reads a file named in tlr and appends the data stored in stl into the file. |
fs/vdsk |
8 |
tlr |
Reads a file named in tlr and prints the contents of the file. |
Fixed issues
- Fixed issue #25: the
replcommand could not be executed more than once due to garbage compiler data.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 25
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 25 - Version of the runtime:
10 - Kernel version:
5
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Added the offline mode. Use
int 0x4to enable it. The offline mode blocks system calls in TCP, HTTP and network module. - The
pushinstruction now follows theimmconvention. This change was made so it becomes faster. Usemov imm, 1when you are pushing a procedure onto the stack, andzero immwhen you're pushing normal values. - More aggressive optimizations regarding the
evtinstruction. - Introduced the hybrid allocator in the RAM emulator.
- Optimized the
intinstruction. - Optimized the
aligninstruction. - Heavily optimized the runtime lvalue parsing, register dereferenciation and variable lookup.
- Heavily optimized the
cmpinstruction (tests show100msoverhead fix!). - Optimized the standard library procedures (tests show they're
50msto70msfaster). - Added the
pragmacompile-time instruction that tells the compiler and the runtime how to behave at certain occurences. - Fixed crashing on label checking on compile-time.
- Added a new
loopinstruction:
mov tlr, "Hello world\n"
mov rax, 4
:test4
call std::ios::write
loop rax, test4This code prints Hello world 4 times.
- Added many new system calls regarding text operations. View more in
syscalldocs. - Added new
rbxregister that holds 32 bits, used as a float value.
Fixed issues
- No issues were found.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
build 24rt10
NewASM Release Notes
Welcome to NewASM: an interpreted low-level programming language which combines explicit memory and register control, giving it a breeze of assembly-like feel, with high-level functionalities such as objects, threads and more.
- Version:
build 24 - Version of the runtime:
10 - Kernel version:
4
Note
This is a pre-release which means that this product version doesn't represent the final quality of the product - it may contain bugs and problems that aren't yet discovered.
Warning
Some unstable builds can eventually gain runtime and kernel updates. NewASM Runtime is a back-end collection of runtime engines that let the front-end systems work. We recommend immediatelly updating as soon as the runtime updates for a specific version. Same goes with the kernel.
What's new or changed?
- Host service call 1 inside the
memkernel module is now renamed and returns memory usage in bytes. - Added the fast
raxregister for the system call above. - Heavily optimized AOT and JIT compilation for labels, applies to the main thread, other threads and procedures.
Fixed issues
- No issues were found.
Important notes
- No important notes.
Building from source
- Use the following command to compile your own build of
NewASM; make sure that you haveg++andgoinstalled:
go build networking.go -buildmode=c-archive -o networking.a
C:\path_to_your_compiler\g++ -static -std=c++23 index.cpp -o index.exe networking.a- If you are using Windows Subsystem for Linux, use the following command:
wsl go build networking.go -buildmode=c-archive -o networking.a
wsl g++ -m64 -static -std=c++23 index.cpp -o index.out networking.aDownloading
- Download one of the following archives that suits your system. Once you have downloaded it, extract the archive into a folder of your choice and begin using the application.
Using the application
- Use the following command to execute your
NewASMprograms on Windows:
newasm yourfile.asm- If you are on Linux, just add the
./suffix:
./newasm yourfile.asmWriting your first NewASM app
- Create the file named
yourfile.asm, or just name it whatever you like, and edit it with an editor of your choice:
using "ios"
.data
string text : "Hello world!\n"
intg len : $-text
.start
mov tlr, text
mov bos, len
mov fdx, 1
sysenter "ios" ; entering the kernel
syscall ; calling the system call/host service
ret 0Output:
Hello world!
