A+B: Difference between revisions

Content added Content deleted
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.)
m (→‎{{header|Little Man Computer}}: Little Man Computer example added.)
Line 3,005: Line 3,005:
puts(((int)a + (int)b));
puts(((int)a + (int)b));
}</lang>
}</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}}==
=={{header|LiveCode}}==