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
24
Task/Address-of-a-variable/Phix/address-of-a-variable.phix
Normal file
24
Task/Address-of-a-variable/Phix/address-of-a-variable.phix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
procedure address()
|
||||
object V
|
||||
integer addr4 -- stored /4 (assuming dword aligned, which it will be)
|
||||
#ilASM{
|
||||
[32]
|
||||
lea eax,[V]
|
||||
shr eax,2
|
||||
mov [addr4],eax
|
||||
[64]
|
||||
lea rax,[V]
|
||||
shr rax,2
|
||||
mov [addr4],rax
|
||||
[]
|
||||
}
|
||||
if machine_bits()=32 then
|
||||
poke4(addr4*4,123)
|
||||
elsif machine_bits()=64 then
|
||||
poke8(addr4*4,123)
|
||||
end if
|
||||
?V
|
||||
if getc(0) then end if
|
||||
end procedure
|
||||
|
||||
address()
|
||||
Loading…
Add table
Add a link
Reference in a new issue