was bored
This commit is contained in:
@ -13,7 +13,7 @@ endif
|
|||||||
syn region eaxSingleLineComment start=+//+ end=+\n+
|
syn region eaxSingleLineComment start=+//+ end=+\n+
|
||||||
syn region eaxMultiLineComment start=+\/\*+ end=+\*\/+
|
syn region eaxMultiLineComment start=+\/\*+ end=+\*\/+
|
||||||
syn keyword eaxSpecifier fast unix in
|
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 eaxType u8 u16 u32 u64 s8 s16 s32 s64
|
||||||
syn keyword eaxInstruction inc xor mov
|
syn keyword eaxInstruction inc xor mov
|
||||||
syn keyword eaxInstructionLike fastcall exit
|
syn keyword eaxInstructionLike fastcall exit
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
program bb
|
|
||||||
begin
|
|
||||||
end program
|
|
23
test/fizzbuzz.eax
Normal file
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
|
Reference in New Issue
Block a user