Skip to content
← Back to Community
NASM Assembly Template
Profile icon
programmeruser

Assembly is planned to be added as a language but until then you can use Linux's NASM assembler.
You can learn NASM in @JustAWalrus' tutorial here.
Edit main.asm in the template to start

Example Programs

Hello World

section .data msg db 'Hello world!', 0xa len equ $-msg section .text global _start _start: mov eax, 4 mov ebx, 1 mov ecx, msg mov edx, len int 0x80 mov eax, 1 mov ebx, 0 int 0x80

If statement

section .text global _start _start: mov eax, 15 mov ebx, 10 cmp eax, ebx jg greater jl less greater: mov eax, 1 mov ebx, 0 ; exit with status code 0 if greater int 0x80 less: mov eax, 1 mov ebx, 1 ; exit with status code 1, something is wrong int 0x80
Voters
Profile icon
patrick6321
Profile icon
PavelKolomnikov
Profile icon
ABCD1
Profile icon
Leroy01010
Profile icon
programmeruser
Profile icon
DynamicSquid
Comments
hotnewtop
Profile icon
jort57

Any good Assembly tutorials out there?

Profile icon
programmeruser

@jort57 https://repl.it/talk/learn/Assembly-Language-Crash-Course-1/44836
Note that it is for Linux, and will therefore not work with Windows.

Profile icon
jort57

@programmeruser i use chromebook with linux beta would that be ok?

Profile icon
programmeruser

@jort57 if you use repl.it it will work, and the linux beta on chromebook should be fine too.

Profile icon
TysonBoring

Would you like to collaborate to produce a boot sector game? Something like a NES game?

Profile icon
programmeruser

@TysonBoring uh, sure, but I'm not the best at collaborations. And we would probably need to do it outside of repl.it since getting the software needed onto repl.it isn't the easiest task. Or, we could just use NASM and x86.

Profile icon
programmeruser
Profile icon
Leroy01010

COOL!