DEV Community

Samuel Leonardo
Samuel Leonardo

Posted on

MAWA - A language as simple as Python but as powerful as Assembler, modern ASM but much simpler

MAWA - A programming language as simple in syntax as Python but as impressive as Assembler, it could be called Modern Assembler.

Although I have talked about MAWA before, I haven't gone into much detail. In this post, I will discuss it and explain a MAWA command, how it works, and what it does.

For those who did not read the first MAWA post, you can read it at this link: https://dev.to/samuel_leonardo_37aff38b4/mawa-el-lenguaje-de-programacion-del-futuro-2bjh My name is Samuel Leonardo Páez Garzón, I am Colombian, and I am 13.1 years old.

MAWA is a language that is simpler than others, not only in terms of syntax, but also in terms of compilation, being similar to NASM with Assembler.

An example of this is the C or C++ language in low-level mode, which uses a compiler to convert .c or .cpp to .o, then uses a linker to link to .elf, and then converts to .bin. This is quite a long process and requires many apps, whereas MAWA and Assembler work like this

ASM:
Using NASM, .asm is converted directly to .bin.

MAWA:
Using my own compiler, .mawa is converted directly to .bin.

In that respect, it's quite simple. I'll continue with the other aspect, Syntax.

While in ASM or C you have to use quite a few lines in some cases, in MAWA you don't. I'll show you.

The following codes will show everything:


In light green “0x0A”.

MAWA code:

Imp (‘A’, DefFinLinea(1), ‘B’, 0x0A)
FinalLoop (No Extensiones)
Enter fullscreen mode Exit fullscreen mode

This MAWA code works as follows: in Imp, the A is printed, DefFinLinea(1) generates a line break, then B is printed, and the last argument must always be the background color and font color indicated in the last argument, which is why it is 0x0A, which in colors would be:

0 <- Background, A <- Font Color
0 is Black and A is Light Green

If this were the other way around, the letter would be black but its background would be light green.

And the second line of MAWA code leaves the code in an infinite loop that does not allow it to continue reading forward on the disk. This is done to avoid reading 00 bytes and causing QEMU to read garbage.

ASM Code NASM 16-bit sequence:

BITS 16

startCode:
    mov ax, 0x0003
    int 0x10

    mov ah, 0x09
    mov al, ‘A’
    mov bl, 0x0A
    mov bh, 0x00
    mov cx, 1
    int 0x10

    call endLine

    mov ah, 0x09
    mov al, ‘B’
    mov bl, 0x0A
    mov bh, 0x00
    mov cx, 1
    int 0x10

    jmp $

endLine:
    mov ah, 0x0E
    mov al, 0x0D
    int 0x10

    mov ah, 0x0E
    mov al, 0x0A
    int 0x10

    ret

times 510 - ($ - $$) db 0
dw 0xAA55
Enter fullscreen mode Exit fullscreen mode

This code prints A and B using 0x09 to declare color. Once the character ‘A’ has been printed, a function is called to make a line break, which automatically inserts the bytes 0x0D and 0x0A using 0x0E, creating a CR+LF line break. If you run this code, it will look exactly like the photo of QEMU that I have at the beginning of this POST.

In ASM NASM 32-bit sequence:

BITS 32

mov edi, 0xB8000
mov byte [edi], ‘A’
mov byte [edi+1], 0x0A

add edi, 160d

mov byte [edi], ‘B’
mov byte [edi+1], 0x0A

jmp $
Enter fullscreen mode Exit fullscreen mode

This code loads the address of the VGA video memory located at 0xB8000 into edi, then prints the letter A in light green by inserting the values as bytes into the video memory, byte 1 being the letter and byte 2 being the color in hexadecimal binary. Then the line add edi, 160d adds 160 (80 columns * 2 bytes), which is a line break because it changes the address of edi and the letter is inserted elsewhere. Then the same process as before is performed, but with the letter B, byte 1 (which is B) and byte 2 (which is the light green color) are inserted, and then the CPU is left in an infinite loop to avoid executing garbage.

As you can see, the difference in the number of lines is huge in 16 BITS and not so much in 32 BITS, although it is more efficient in MAWA.

I am also creating another project called Win Anti App Anchor, which is an OS being created with MAWA. For those who want to know more about it, I will be uploading a post in the next few days and putting it in this post to connect them to each other.

I kindly ask you to support me by sharing this POST with many people and giving me your reactions and comments.

Samuel Leonardo Páez Garzón
November 24, 2025 - All rights reserved.

Top comments (5)

Collapse
 
samuel_leonardo_37aff38b4 profile image
Samuel Leonardo

If you liked it, please share it with other programmers.

Collapse
 
samuel_leonardo_37aff38b4 profile image
Samuel Leonardo

I see that they listened to me about sending it to others; it's going up at an extreme rate in views.

Collapse
 
samuel_leonardo_37aff38b4 profile image
Samuel Leonardo

Now tell me what you think about my programming language, and what it does.

Collapse
 
samuel_leonardo_37aff38b4 profile image
Samuel Leonardo

If anyone has any questions, feel free to leave a comment here.

Collapse
 
samuel_leonardo_37aff38b4 profile image
Samuel Leonardo

Keep sharing this post, I want it to go viral so that other programmers find out about MAWA and it becomes known and revolutionizes the low-level language group.