Machine code: Difference between revisions

Content added Content deleted
(Added solution for Action!)
(Added XPL0 example.)
Line 1,638: Line 1,638:
</lang>
</lang>


=={{header|XPL0}}==
This is for the Raspberry Pi's ARM architecture. The opcodes are effectively "poked" by merely loading the program.
<lang XPL0>func Sum(A, B); \Return sum of A+B
char A, B;
[asm { ldrb r0, A
ldrb r1, B
add r0, r1
strb r0, A
}
return A;
];

IntOut(0, Sum(7, 12))</lang>

{{out}}
<pre>19</pre>


{{omit from|360 Assembly}}
{{omit from|360 Assembly}}