Machine code: Difference between revisions

Machine code en FreeBASIC
m (→‎{{header|Quackery}}: corrected to use integers specified by task)
(Machine code en FreeBASIC)
Line 465:
writeln(c);
corp</lang>
{{out}}
<pre>19</pre>
 
 
=={{header|FreeBASIC}}==
<lang freebasic>'' This is an example for the x86 architecture.
Function test (Byval a As Long, Byval b As Long) As Long
Asm
mov eax, [a]
Add eax, [b]
mov [Function], eax
End Asm
End Function
 
Print test(12, 7)
Sleep</lang>
{{out}}
<pre>19</pre>
2,122

edits