Machine code: Difference between revisions

Added XPL0 example.
(Added solution for Action!)
(Added XPL0 example.)
Line 1,638:
</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}}
772

edits