-
Notifications
You must be signed in to change notification settings - Fork 220
Language NASM
kazk edited this page Mar 22, 2018
·
10 revisions
Unreleased
2.11
section .text
global add
add: ; int add(int a, int b)
mov eax, esi ; result = a
add eax, edi ; result += b
ret
#include <criterion/criterion.h>
int add(int, int);
Test(add_test, should_add_integers) {
cr_assert_eq(2, add(1, 1));
}
12 seconds
None
None