3

I'm reading over "Atomic Theory and Applications" (best name EVAR) but having never used the Atom a couple of things are confusing me.

For one, did the Atom have a "full screen" editor in the fashion of Commodore in that you could cursor-up onto a line, edit it, and press return? It's not clear in the book. Some BASICs of the era, TI for instance, did not allow this and the only way to edit was at the > prompt. That seems to be the suggestion here, but I can't really tell.

On page 7 there are examples of typing in random text as lines. There's a mention on the next page about errors, but I can't tell if this is referring to errors caused by those lines or not? I suspect this is simply an example of basic typing, and that it would not allow you to store it as-is, but I cannot tell for sure.

Another... what exactly does OLD do? For that matter, what does NEW do? The manual, page 7, says NEW "will clear the stored text so that a new piece of text can be typed in". Is "text" "the program" in this case? And is "piece" "the entire thing"? And what is the purpose of OLD, which "can be typed after typing BREAK to retrieve the text previously in memory". That sounds like LIST? Or is BREAK something different too?

1
  • Break is reset; either it or NEW clear the current program and OLD retrieves a program if you cleared it but change your mind without putting anything else in memory. The keyboard has a COPY key so a two-cursor system for editing lines is a guess based on Acorn’s later machines, but I don’t know, or I’d post an answer. Can emulate in-browser at econet.network/atom but I’m on a phone right now so that’s all I can say about that.
    – Tommy
    Jan 8 at 22:44

2 Answers 2

6

As far as I can tell from Atomic Theory and Applications, everything you ask about is identical in the BBC Micro, so I'll just explain how it works on that platform.

The editing system is described on page 133 of that book, although I can see how it might not make sense if you've never used it. Pressing the cursor keys makes a secondary (copy) cursor appear and move around the screen, leaving the normal input cursor where it is. Pressing the COPY key "types" the text under the copy cursor and advances it (which usually causes it to appear at the input cursor and advances that). So you can just hold down COPY and let autorepeat do the hard work of retyping large text fragments. It is not a full-screen editor like the C64, but rather its own thing which is idiosyncratic but slightly more powerful as you can copy text from multiple lines and not just edit a single line.

The BREAK key is hardwired to the CPU's reset pin. Pressing it performs a warm reset and will always work even if the CPU has crashed or is otherwise unresponsive to user input, and gets you back to a BASIC prompt.

In standard BASICs, NEW clears the listing so a new program can be entered, just as if BASIC was restarted. The obvious implementation is to just perform a NEW when BASIC starts rather than have two different code paths, and BBC BASIC does just that on power-on and when you hit BREAK.

Further, a NEW in BBC BASIC just truncates the program but does not actually wipe it from memory. OLD reverses the process, and thus also undoes the implicit NEW caused by hitting BREAK. If there wasn't actually a program previously in memory, OLD will fail and report Bad Program.

(The actual mechanism is that NEW sets the MSB of the first line number to 255 to indicate end-of-list, and OLD sets it to 0. You can observe this working by entering e.g. 300 REM, LIST, NEW, OLD, then LIST. The line number will have changed from 300 to 44.)

1
  • "Pressing the cursor keys makes a secondary (copy) cursor appear and move around the screen" - ahhh. "The BREAK key" - confusion here is the overloading of the term "break" which means something much different in the context of BASIC on most platforms. "OLD reverses the process" - because break isn't break but "reset". Now it all makes sense! Jan 10 at 14:33
4

Atom BASIC, anyone here used it or can emulate it?

There are several emulators, for example JSACORN whoch can do several Acorn models, including the Atom. It maps the special keys COPY to F12 and BREAK to TAB. All issued mentioned in the question can be tried and will work (AFAICT) work exactly as on a real Acorn.

..."Atomic Theory and Applications" (best name EVAR) ...

:)

For one, did the Atom have a "full screen" editor in the fashion of Commodore in that you could cursor-up onto a line, edit it, and press return?

No. At least not in the same sense as the Commodore

It's not clear in the book.

I have a hard time to find any hint for a full screen editor. For one, Section 1.7 - located on the same page 7 - describes the very basic BASIC editing known since the Dartmouth days:

enter image description here

So, no.

Except, there are cursor keys and a wondrous COPY keys ... and section 18.4 Screen Editing:

enter image description here

So, no (again), it's not a screen editor like on the commodores, but yes, it is a screen editor in the sense that one can move the cursor around and collect characters (and words). Moving has no influence on any program text, or line entered. A character is only added to the input line when it is copied from screen location via COPY at it's location. It's all about adding characters (or words) to the input buffer. Whenever return is pressed, that collected buffer gets taken as the line to be processed (added/replaced) within the editor text (program).

It's a bit like the EDIT command known from Microsoft BASIC 5 and above. But it could also be seen as a close take from the Apple II Monitor edit functions: Here free cursor movement around the screen is done using ESC+A, ESC+B, ESC+C, ESC+D for right/left/down/up (*2) while the right pointing arrow key has the same function as the Atom's COPY key.

With keeping this in mind its 'kind' of a screen editor.

On page 7 there are examples of typing in random text as lines. There's a mention on the next page about errors, but I can't tell if this is referring to errors caused by those lines or not?

Of course not - It would be a real bad manual showing examples that can not be repeated the very same way. That section (1.9) is simply to inform a new user about what error messages are - which he may already have encountered.

I suspect this is simply an example of basic typing, and that it would not allow you to store it as-is, but I cannot tell for sure.

Well, it does. One of the features about the Atom's BASIC, as of all other Acorn (at least 6502 and as I know) is in fact to allow to use the editor to store arbitrary text (*1).

Another... what exactly does OLD do?

OLD tries to restore an existing (program) text. It is in some way the direct help when typing NEW by accident - but as mentioned on Page 7 (real important page):

enter image description here

It's helpful to recover from a 'typing BREAK'. This might be a bit misleading as 'BREAK' is not something typed, but a dedicated BREAK key getting pressed. It's function is resetting the CPU.

Unlike with the Apple II where a warm reset keeps an existing memory content intact, the Atom clears existing memory as well - essentially like typing NEW - destroing all refference to any edit data (aka 'the program'). Using OLD will reinstate those with default values (*3).

For that matter, what does NEW do?

Same as NEW on a Commodore: resetting the editor content to none.

The manual, page 7, says NEW "will clear the stored text so that a new piece of text can be typed in". Is "text" "the program" in this case?

Sure, if it was a program. The language reflects that Acorn sees its editor more universal as other BASICs.

And is "piece" "the entire thing"? And what is the purpose of OLD, which "can be typed after typing BREAK to retrieve the text previously in memory". That sounds like LIST

Or is BREAK something different too?

BREAK is a reset key and works much like resetting a Commodore (if a reset key is installed): Everything is returned to default, with the editor put in a NEW-state.


*1 - In fact that can be done with many other micro BASIC as well, including the mentioned Commodore BASIC. A feature used for example by some (simple) assemblers that use the BASIC editor for source handling. Only issue here is that MS-BASICs, like the PET-BASIC, 'crunch' lines entered, that is detect BASIC keywords and replace them by shortcuts (tokens). Using such keywords may screw the visualy, but then again, usually the assemblers are made to handle it anyway.

A notable exception would be Apples adaption of Microsoft BASIC aka Applesoft, as it's keywords include spaces when listed, so a line typed as

10IT'S CALLED PRINTING WHEN GRAPHICS ARE DONE BY A MACHINE

will be reproduced as

10 IT'S CALL ED PRINT ING WHEN GR APHICS ARE DONE BY A MACHINE

*2 - Note, this not being down/up/right/left :))

*3 - Would have been useful for a Commodore as well :))

2
  • "Of course not - It would be a real bad manual showing examples that can not be repeated the very same way" - so I had never actually tried this in Commodore BASIC, but in retrospect, of course, the tokenizer simply skips things it doesn't immediately recognize so 10 HELLO WORLD is perfectly valid. Atari BASIC is still poisoning my thinking 40 years later. Jan 10 at 14:57
  • @MauryMarkowitz Even Atari manuals avoid to show examples that can't be repeated ;)) Beside, there is one BASIC where this really don't works: Applesoft - I guess I'll extend the footnote.
    – Raffzahn
    Jan 10 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .