Asked • 05/03/19

BASIC, how lines were stored in memory?

As I understand BASIC had line numbers because at the time you had to use a line editor to input your program. It allowed you to do something like this: 20 END 10 PRINT "HELLO WORLD" This program would print `"HELLO WORLD"`. My question is how did BASIC allow you to enter lines this way? How were they stored in memory? I suppose it was a map of line numbers and pointers to lines themselves which was updated every time you input a line. But this map would have to be sorted before running a `LIST`/`RUN` command. Is that so? If not then how exactly did BASIC store commands in the memory?

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.