Gausssumme Muster

Reading time ~1 minute

Framework für Gausssumme in C

#include <stdio.h>

extern unsigned int gauss(unsigned int);

int main(void)
{ printf("%d\n", gauss(100)); }

Gausssumme in nasm

section .data
section .text

global gauss
gauss:

    ;CODE
    mov rax, rdi
    mov rbx, 2
    xor rdx, rdx
    inc rax
    mul rdi
    xor rdx, rdx
    div rbx
    ret