ArticleslgStudy

computer science

S-BASIC

S-BASIC is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand S-BASIC rather than just read about it. In short: S-BASIC (for Structured Basic) was a "structured" BASIC variant, distributed with Kaypro CP/M systems. It was made by Topaz Programming is distributed by Micro-Ap (San Ramon, California).

Key takeaways

  • S-BASIC belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect S-BASIC to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of S-BASIC from memory before moving on to harder problems.

Reference excerpt

S-BASIC (for Structured Basic) was a "structured" BASIC variant, distributed with Kaypro CP/M systems. It was made by Topaz Programming is distributed by Micro-Ap (San Ramon, California). SBasic was compatible with the syntax of BASIC, a programming language commonly used in the 1970s through the 1980s, as well as Fortran77. However, the language relaxed many of the requirements of BASIC and had more flexibility than Fortran. For instance, line numbers were optional, and permitted non-numeric characters. In addition, SBasic offered developers structured programming concepts, including recursion and nesting. Many PL/I programs could be compiled with little modification, though SBasic did not offer an extensive function library. Among the more advanced features was the ability to "base" a variable or array, making the memory location dynamic and modifiable during execution. SBasic programs had the ability to access memory areas reserved for the operating system unless prohibited from doing so by the operating system itself. (Kaypro's CP/M had no such prohibitions.) This enabled direct utilization and modification of DMA and other memory areas. This feature also permitted a program to modify itself at run-time. This capability also allowed modifying the instruction pointer, so a program could effectively link other executable modules that were read during execution as data. Unlike BASIC interpreters that stored "p-code" that was parsed by an execution module, SBasic was a two-pass compiler, ultimately producing .com files that were executable. The language was written in a subset of itself and compiled using a .com kernel, then stored on diskette (or hard drive on the last KayPro model). The source was distributed with some KayPro models. This encouraged open-source-like modification of the language, with some early pre-Internet user groups exchanging physical diskettes by regular mail. Not to be confused with the namesake SBasic (S for Spectral Basic) Programming Language for the commercial Spectral UV-Visible software.

Reception Jerry Pournelle in 1983 wrote that S-BASIC "is quite nice", stating that it "rivals CB-80". He presumed that Kaypro users would "will begin by using Microsoft MBASIC, then start translating their programs into S-BASIC and learn more about structured programming". Pournelle added, "If I had to give an award for the most unreadable computer document I've ever seen, the original S-BASIC manual would win hands down"; however, Kaypro had rewritten it and "is a great deal more sensible".

References

Notes Garland, S.J. (1976), Structured programming, graphics, and SBASIC, Hanover, New Hampshire: Kiewit Computation Center. SP028 (reference) Hardy, S. (February 1978), Graphics in BASIC and structured BASIC, Hanover, New Hampshire: Kiewit Computation Center. TM110. (reference)

Worked examples

Example 1 — a first encounter with S-BASIC

Start with the simplest possible case. Write down what S-BASIC claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to S-BASIC before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about S-BASIC ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of S-BASIC

In research
S-BASIC appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses S-BASIC in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
S-BASIC is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC compilers, BASIC programming language family, CP/M software, so understanding it makes those chapters shorter.
In everyday life
Look for S-BASIC outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study S-BASIC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what S-BASIC means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain S-BASIC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is S-BASIC in simple terms?

S-BASIC (for Structured Basic) was a "structured" BASIC variant, distributed with Kaypro CP/M systems. It was made by Topaz Programming is distributed by Micro-Ap (San Ramon, California).

Why does S-BASIC matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study S-BASIC?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on S-BASIC.

Tags

  • BASIC compilers
  • BASIC programming language family
  • CP/M software
  • Discontinued BASICs
  • Programming language topic stubs

Keep exploring