Skip to content

Releases: bracesoftware/newasm

beta

19 Aug 16:38

Choose a tag to compare

beta Pre-release
Pre-release
xd

build 32

09 May 13:05

Choose a tag to compare

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 resb instruction.
    You use this instruction to ask the VM to dedicate n-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, try and catch.
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 application

Instruction 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_back

You 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 no

If 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 Continue

Output 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
    end

And you get the output:

hi from ProcWithError
Error properly catched and handled, exit code: 14

Warnings

  1. Compiler is going to give you an error if you try to nest these on the same identation level.
  2. Compiler can optimize and remove empty try-catch blocks, such as:
try
catch smth
  1. You are going to get a runtime error if you do a callc within a try-catch block if the address you are jumping to has a try-catch block.
  • Optimized the following instructions:
  1. heap
  2. db
  3. free

Fixed issues

  • Fixed issue #36.
  • Fixed issue #38.
  • Fixed the loop instruction 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 31

23 Apr 20:04

Choose a tag to compare

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, loop and 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:
  1. ifdef: checks if a symbol/flag is defined;
  2. ifndef: checks if a symbol/flag is not defined;
  3. fi: used for ending an if block.

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
fi

There are no else variants, you have to end each if-block with fi.

  • Added a new concept of address fetching - a fetch instruction! This instruction is used to fetch a procedure or variable pointer, so we can use it with the this keyword. 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 6

As 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 tho

If you don't want a variable to be fetched, use the new @safe attribute.

.data
    @safe
    intg var: 0
.text
    fetch var ; segmentation fault

You 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 contents

The 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 crash

Fixed 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 30

18 Apr 19:51

Choose a tag to compare

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 .text code 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 29

13 Apr 10:35

Choose a tag to compare

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 in and out instructions.
  • 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 28

06 Apr 18:33

Choose a tag to compare

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 malloc stores a pointer of the newly allocated block into the rax register, instead of tlr - for performance purposes.
  • Added move semantics with the exclusive move, movx, instruction.
  • Improved performance of the mov instruction.
  • Improved performance of the pop and free instructions when they take nil as their parameter.
  • Optimized several instructions including thread and evt.
  • Added static attribute for data that cannot be affected with movx.

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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 27

29 Mar 17:25

Choose a tag to compare

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 ResolveFileName back-end function for better file name lookup.
  • Enhanced the bootloader system with error handling and generic API for banck-end system development.
  • Optimized the retn instruction.

Fixed issues

  • Fixed the issue #26: now retn works for rax, rbx, imm and others.

Important notes

  • No important notes.

Building from source

  • Use the following command to compile your own build of NewASM; make sure that you have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 26

22 Mar 19:29

Choose a tag to compare

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 undef compile-time instruction used to undefine symbols declared with def.
  • Divided the fs kernel/host services module into two submodules; fs/host, used for interacting with the host machine's files and fs/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 repl command 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 25

09 Mar 08:00

Choose a tag to compare

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 0x4 to enable it. The offline mode blocks system calls in TCP, HTTP and network module.
  • The push instruction now follows the imm convention. This change was made so it becomes faster. Use mov imm, 1 when you are pushing a procedure onto the stack, and zero imm when you're pushing normal values.
  • More aggressive optimizations regarding the evt instruction.
  • Introduced the hybrid allocator in the RAM emulator.
  • Optimized the int instruction.
  • Optimized the align instruction.
  • Heavily optimized the runtime lvalue parsing, register dereferenciation and variable lookup.
  • Heavily optimized the cmp instruction (tests show 100ms overhead fix!).
  • Optimized the standard library procedures (tests show they're 50ms to 70ms faster).
  • Added the pragma compile-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 loop instruction:
    mov tlr, "Hello world\n"
    mov rax, 4
    :test4
    call std::ios::write
    loop rax, test4

This code prints Hello world 4 times.

  • Added many new system calls regarding text operations. View more in syscall docs.
  • Added new rbx register 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!

build 24rt10

25 Feb 21:15

Choose a tag to compare

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 mem kernel module is now renamed and returns memory usage in bytes.
  • Added the fast rax register 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 have g++ and go installed:
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.a

Downloading

  • 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 NewASM programs on Windows:
newasm yourfile.asm
  • If you are on Linux, just add the ./ suffix:
./newasm yourfile.asm

Writing 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 0

Output:

Hello world!