A+B: Difference between revisions
m
→{{header|Little Man Computer}}: Little Man Computer example added.
Childishbeat (talk | contribs) m (→{{header|bootBASIC}}: This example doesn't work the correct way. But since there's no known correct way yet, this example will be used for now.) |
Childishbeat (talk | contribs) m (→{{header|Little Man Computer}}: Little Man Computer example added.) |
||
Line 3,005:
puts(((int)a + (int)b));
}</lang>
=={{header|Little Man Computer}}==
Note: Both numbers are entered separately.
This example is derived from V1.3 of the implementation of Little Man Computer by Peter Higginson.
'''Assembly'''
<lang Little Man Computer> INP
STA 99
INP
ADD 99
OUT
HLT
// Output the sum of two numbers</lang>
'''Machine code'''
<lang Little Man Computer>00 INP
01 STA 99
02 INP
03 ADD 99
04 OUT
05 HLT</lang>
=={{header|LiveCode}}==
|