Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
5
Task/Machine-code/Phix/machine-code-1.phix
Normal file
5
Task/Machine-code/Phix/machine-code-1.phix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
atom mem = allocate(9)
|
||||
poke(mem,{#8B,#44,#24,#04,#03,#44,#24,#08,#C3})
|
||||
constant mfunc = define_c_func({},mem,{C_INT,C_INT},C_INT)
|
||||
?c_func(mfunc,{12,7})
|
||||
free(mem)
|
||||
12
Task/Machine-code/Phix/machine-code-2.phix
Normal file
12
Task/Machine-code/Phix/machine-code-2.phix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
atom mem = allocate(9)
|
||||
poke(mem,{#8B,#44,#24,#04,#03,#44,#24,#08,#C3})
|
||||
integer res
|
||||
#ilASM{ mov eax,[mem]
|
||||
call :%pLoadMint -- (in case mem>#3FFFFFFF)
|
||||
push 12
|
||||
push 7
|
||||
call eax
|
||||
add esp,8
|
||||
mov [res],eax }
|
||||
?res
|
||||
free(mem)
|
||||
Loading…
Add table
Add a link
Reference in a new issue