Create an object at a given address: Difference between revisions
Content added Content deleted
MaiconSoft (talk | contribs) (Added Delphi example) |
m (→{{header|Phix}}: added syntax colouring the hard way) |
||
Line 653: | Line 653: | ||
Phix does not support creation of a "language object" at a specific address, but you can peek and poke bytes, words, dwords and qwords |
Phix does not support creation of a "language object" at a specific address, but you can peek and poke bytes, words, dwords and qwords |
||
to any address, as long as doing so does not trigger a hardware exception. You could also use inline assembly, if that helps any. |
to any address, as long as doing so does not trigger a hardware exception. You could also use inline assembly, if that helps any. |
||
<lang Phix> |
<!--<lang Phix>--> |
||
<span style="color: #7060A8;">poke</span><span style="color: #0000FF;">(</span><span style="color: #000000;">0x80</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">or_bits</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">peek</span><span style="color: #0000FF;">(</span><span style="color: #000000;">0x80</span><span style="color: #0000FF;">),</span><span style="color: #000000;">0x40</span><span style="color: #0000FF;">))</span> |
|||
#ilASM{ mov al,[0x80] |
#ilASM{ mov al,[0x80] |
||
or al,0x40 |
|||
or al,0x40 |
|||
mov [0x80],al} |
|||
<!--</lang>--> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |