0

I want the code to output 5, which is got from 2+3 (inputted from stack manually)

[space][space][space][tab][space] push 2
[space][space][space][tab][tab] push 3
[tab][space][space][space] add together
[tab][lf]
[space][tab] output number

But it seems to say that it is a invalid line end? What happened?

Cheng Adrian
  • 177
  • 10

1 Answers1

2

The Push commands should end with a line feed, so it should probably be (in a one-instruction-per-line format, i.e., only the annotated characters are significant)

[space][space][space][tab][space][lf]
[space][space][space][tab][tab][lf]
[tab][space][space][space]
[tab][lf][space][tab]
egilhh
  • 6,464
  • 1
  • 18
  • 19