build 7
Full Changelog: build-6...build-7
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 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.
What's new
- Since variables are now objects that point to a specific memory,
movaddrinstruction has been introduced. The named instruction changes the address of a specific symbol.
.data
num number: 0
.start
del &number
malloc 4
mov hea, [0]
load *, 9938 ; some number
movaddr &number, *hea
free- Instead of using
%-prefixed hardcoded constants when using a kernel module, we just do:
.$using “ios”
.start
mov tlr, “Hi”
mov bos, 2
mov fdx, 1
mov stl, 0c1
sysenter “ios”
syscall-
Added the
tcpkernel module used for basic TC protocol manipulation.
| Module |fdx| Arguments | Description |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|tcp| 1 |tlr,stl|tlris the IP, andstlthe data we are sending. |
|tcp| 2 |tlr| Receive data from the IP address stored insidetlr. | -
Added the address-of operator
#:
mov tlr, # namespace::symbol_name- Added the
httpkernel module used for basic HTTP protocol manipulation.
| Module |fdx| Arguments | Description |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|http| 1 |tlr|tlris the address. Used to get HTTP data. |
|http| 2 |tlr,stl| Send data, withtlrbeing the URL andstlthe data. |
What's changed
- The whole virtual machine memory system has been completely rewritten to a more low-level model.
- Changed some of the datatype names:
intginstead ofnum;
floatinstead ofdecm;
stringinstead oftxt.
Fixed issues
- We've been focused on code optimisation.
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++ installed:
C:\path_to_your_compiler\g++ -static -std=c++20 index.cpp -o index.exe- If you are using Windows Subsystem for Linux, use the following command:
wsl g++ -m32 -static -std=c++20 index.cpp -o index.outDownloading
- 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 -input yourfile.asm- If you are on Linux, just add the
.outextension:
./newasm.out -input 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!"
intg len : $-text
.start
mov tlr, text
mov stl, 0c1
mov bos, len
mov fdx, 1
sysenter "ios"
syscall
ret 0Output:
Hello world!