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

Published: (December 10, 2025 at 01:02 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Introduction

MAWA is a programming language that combines a Python‑like syntax with the low‑level power of an assembler. It aims to simplify both the source code and the compilation pipeline, allowing source files (.mawa) to be assembled directly into binary (.bin) images.

Compilation Process

Traditional low‑level development with C/C++ involves multiple steps:

  1. Compile source (.c / .cpp) → object file (.o)
  2. Link object files → executable (.elf)
  3. Convert executable → binary (.bin)

MAWA (and raw assembler) streamlines this:

  • Assembler: .asm.bin
  • MAWA: .mawa.bin

This reduces the toolchain to a single step.

Syntax Example

Imp (‘A’, DefFinLinea(1), ‘B’, 0x0A)
FinalLoop (No Extensiones)

Explanation

  • Imp prints characters.
    • 'A' is printed.
    • DefFinLinea(1) inserts a line break.
    • 'B' is printed.
    • The final argument (0x0A) encodes the background and foreground colors (background = 0, font = A).
  • FinalLoop (No Extensiones) creates an infinite loop to prevent the CPU from reading stray bytes (e.g., 00) that could cause QEMU to interpret garbage.

Equivalent NASM 16‑bit Code

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

This program prints A and B with color attribute 0x09. After each character, endLine inserts a CR+LF (0x0D 0x0A) using BIOS interrupt 0x10 function 0x0E.

Equivalent NASM 32‑bit Code

BITS 32

mov edi, 0xB8000          ; VGA text buffer address
mov byte [edi], 'A'       ; character
mov byte [edi+1], 0x0A    ; attribute (light green)

add edi, 160              ; move to next line (80 columns × 2 bytes)

mov byte [edi], 'B'       ; character
mov byte [edi+1], 0x0A    ; attribute

jmp $                     ; infinite loop

Here the program writes directly to video memory, placing characters and their color attributes. The add edi, 160 advances the cursor to the next line.

Comparison

  • Line Count: MAWA requires only two statements, whereas the 16‑bit NASM version spans dozens of lines. The 32‑bit NASM version is shorter but still more verbose than MAWA.
  • Toolchain Simplicity: MAWA eliminates the need for separate compilation, linking, and binary conversion steps.
  • Readability: MAWA’s high‑level syntax makes intent clearer (e.g., Imp for “print”, DefFinLinea for “line break”).

Ongoing Projects

The author is also developing Win Anti App Anchor, an operating system built with MAWA. Further details will be shared in upcoming posts.

References

All rights reserved, November 24 2025.

Back to Blog

Related posts

Read more »

Rython - New Programming language!

Who am I Maybe you already know—if so, you’re doing great, thanks for reading my posts! If not, I’m Igor, a Ukrainian developer who created a Neovim plugin tha...

Advent of Swift

Article URL: https://leahneukirchen.org/blog/archive/2025/12/advent-of-swift.html Comments URL: https://news.ycombinator.com/item?id=46266312 Points: 18 Comment...

The right tool for the job

!Cover image for The right tool for the jobhttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-upl...