September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -1,12 +1,9 @@
switch v [with fallthrough] do
case 1,2:
-- do something
case 3 then
-- do something
fallthrough
case 4:
-- do something
break
default:
-- do something
end switch
constant DEBUG=false
if DEBUG then
puts(1,"debug is on\n")
end if
if platform()=WINDOWS then
puts(1,"this is windows\n")
elsif platform()=LINUX then
puts(1,"this is linux\n")
end if

View file

@ -1,22 +1,12 @@
#ilASM{
[32]
mov eax,[var]
[64]
mov rax,[var]
[PE32]
push eax -- uExitCode
call "kernel32.dll","ExitProcess"
[PE64]
mov rcx,rax -- uExitCode
call "kernel32.dll","ExitProcess"
[ELF32]
mov ebx,eax -- error_code (p1)
mov eax,1 -- sys_exit(ebx=int error_code)
int 0x80
-- xor ebx,ebx -- (common requirement after int 0x80)
[ELF64]
mov rdi,rax -- error_code (p1)
mov rax,60 -- sys_exit(rdi=int error_code)
syscall
[]
}
switch v [with fallthrough] do
case 1,2:
-- do something
case 3 then
-- do something
fallthrough
case 4:
-- do something
break
default:
-- do something
end switch

View file

@ -0,0 +1,22 @@
#ilASM{
[32]
mov eax,[var]
[64]
mov rax,[var]
[PE32]
push eax -- uExitCode
call "kernel32.dll","ExitProcess"
[PE64]
mov rcx,rax -- uExitCode
call "kernel32.dll","ExitProcess"
[ELF32]
mov ebx,eax -- error_code (p1)
mov eax,1 -- sys_exit(ebx=int error_code)
int 0x80
-- xor ebx,ebx -- (common requirement after int 0x80)
[ELF64]
mov rdi,rax -- error_code (p1)
mov rax,60 -- sys_exit(rdi=int error_code)
syscall
[]
}