Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xfcasio/bento
A collection of macros intended at making assembly more convenient to write and a bit closer to C. Only for x86_64 linux and the FASM assembler (for now).
https://github.com/xfcasio/bento
assembly fasm
Last synced: 3 months ago
JSON representation
A collection of macros intended at making assembly more convenient to write and a bit closer to C. Only for x86_64 linux and the FASM assembler (for now).
- Host: GitHub
- URL: https://github.com/xfcasio/bento
- Owner: xfcasio
- Created: 2024-08-15T21:42:01.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-20T19:03:22.000Z (5 months ago)
- Last Synced: 2024-09-30T05:43:57.261Z (4 months ago)
- Topics: assembly, fasm
- Language: Assembly
- Homepage:
- Size: 30.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🍱 bento (弁当)
A collection of macros intended at making assembly more convenient to write and a bit closer to C. Only for x86_64 linux and the FASM assembler (for now).Example:
```asm
format ELF64 executable 3
include 'bento.inc'segment executable readable
entry $
@mkstr hello_world, <"Hello, World", 0>
@mkstr nums, "123456789"xor eax, eax
.if (eax = 0)
@iter1 r8, 0, 9
@iter2 rax, 0, 9
@iter3 rbx, 0, 9
mov qword [dummy], rbx
add qword [dummy], 48
write STDOUT, dummy, 1
@done3
write STDOUT, newline, 1
@done2
write STDOUT, newline, 1
@done1
.endifputs hello_world
exit 0
@@segment readable writeable
dummy: dq 0
newline: db 0xA
```compile with:
```
$ fasm main.s
$ ./main
```