was bored

This commit is contained in:
anon
2024-07-17 01:05:26 +02:00
parent 7ee985ea91
commit a94e456ade
3 changed files with 24 additions and 4 deletions

@ -13,7 +13,7 @@ endif
syn region eaxSingleLineComment start=+//+ end=+\n+
syn region eaxMultiLineComment start=+\/\*+ end=+\*\/+
syn keyword eaxSpecifier fast unix in
syn keyword eaxKeyword program machine procedure begin loop break if then else end
syn keyword eaxKeyword program machine procedure begin until repeat break if then else end
syn keyword eaxType u8 u16 u32 u64 s8 s16 s32 s64
syn keyword eaxInstruction inc xor mov
syn keyword eaxInstructionLike fastcall exit

@ -1,3 +0,0 @@
program bb
begin
end program

23
test/fizzbuzz.eax Normal file

@ -0,0 +1,23 @@
program fizzbuzz
u16 counter = 0
begin
until counter > 100 repeat
if counter % 3 and counter % 5 then
mov esi "FizzBuzz"
elif counter % 3 then
mov esi "Fizz"
elif counter % 5 then
mov esi "Buzz"
else
// mov esi ???
end if
mov eax 1
mov edi 1
syscall
inc [counter]
end repeat
exit 0
end program