ArticleslgStudy

astronomy

Vilnius BASIC

Vilnius BASIC is a astronomy 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 Vilnius BASIC rather than just read about it. In short: Vilnius BASIC, sometimes known as BK BASIC, is a dialect of the BASIC programming language running on the Elektronika BK-0010-01/BK-0011M and UKNC computers. It was developed at Vilnius University, located in Lithuania which was a republic of the Soviet Union at the time.

Vilnius BASIC — main illustration
Vilnius BASIC — illustration

Key takeaways

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

Reference excerpt

Vilnius BASIC, sometimes known as BK BASIC, is a dialect of the BASIC programming language running on the Elektronika BK-0010-01/BK-0011M and UKNC computers. It was developed at Vilnius University, located in Lithuania which was a republic of the Soviet Union at the time. In contrast to most microcomputer dialects of BASIC of the era, which were interpreters, Vilnius BASIC was a compile and go language that compiled the source when the user entered the RUN command. It was otherwise similar to GW-BASIC and MSX BASIC in style and most features, although it lacked some of the multimedia commands found in MSX. One oddity was that it did not allow more than one statement on a single line, a feature normally implemented using the colon. It also lacked the ability to open more than one data file at a time. Only the UKNC version had a full-screen editor, versions of the 0010 series machines used a line editor. Machine-dependent features, like graphics operators, parameters, and PEEK/POKE addresses were also different among the machines.

Description

Program editing In contrast to most BASIC dialects of the era, Vilnius BASIC was a compile and go system, not an interpreter. When the user types RUN, the compiler reads the code and produces a threaded code executable that it then ran. Nevertheless, this detail was largely invisible to the user, as the system still allowed statements to be typed in without a line number for direct (immediate) mode, or with a number for indirect mode in which case the new line was added to the program or replaced the same-numbered line if it already existed. By the late 1970s, most microcomputer dialects offered a full-screen editor, in which the user can use the cursor keys to move around the program and type changes into any visible line of code. The Electronica systems were emulating an PDP-11, machines that had been built in the era before cursor-addressable computer terminals were widely available and thus retain the older line editor style. In these systems, a prompt is displayed that allows the user to type in one line of code, or recall a previously typed line and then edit it in-place.

Commands and statements The list of keywords supported in Vilnius can be separated into two groups, those that can only be used in direct mode, and those that can be direct or indirect. The former, known as commands, included the common CONT, LIST, NEW, RUN. CLOAD and CSAVE load and save programs to cassette tape. AUTO turned on automatic line number entry, RENUM renumbered the lines in the current program, and DELETE deleted ranges of lines using the same "to" format as LIST, for instance, DELETE -200 would delete everything from the start of the program up to an including line 200. Vilnius' primitives were similar to other BASICs of the era, and supported most of the elementary statements like DATA, DEF FN, DIM, END, FOR..TO..STEP..NEXT, GOSUB, GOTO, IF..THEN with an optional ELSE, INPUT, (optional) LET, LIST, PRINT, ON...GOTO and ON...GOSUB, READ, REM, RESTORE, RETURN, STOP. In contrast to most dialects, Vilnius did not allow more than one statement per line.

Numeric variables, operators and functions As with most dialects, variable names had to start with a letter and could be followed by more letters or digits. Variable names could be any length, but only the first two characters were stored or matched, meaning that typing PRT001=1 followed PR=5 would result in a single variable in memory known as PR with the value 5. Vilnius BASIC had four basic data types, strings, single and double-precision floating point numbers, and integers. Unless otherwise denoted, variables were assumed to be double-precision, stored in eight bytes and providing about 17 digits of precision. For comparison, most MS dialects used a 5-byte format for floating point. If ! was suffixed to the variable name, the value was stored in single-precision using four bytes with about 7 digits of precision. % specified an integer, using a single 16-bit word to store values between -32768 and +32767. If a value with more precision was assigned to a variable with less, any excess was simply discarded; A%=1.5 will result in A% having the value 1. Numeric constants in the source code could also be specified as a particular type using the same indicators; 50% would store the constant as an integer, 0.05! or 5E-02 stores a single-precision value 0.05, and 0.05 or 5D-02 stores the same value in the default double-precision format. Vilnius also had the additional ability to allow numeric constants to be typed in as strings of binary, octal or hexadecimal characters, by prefixing the string with & and a single letter indicating the type, B, O, H. For instance, A=&H9A8B would convert the hexadecimal string H9A8B to the equivalent decimal value 39563 and store that in A. Operators for numerical values included +, -, *, /, ^ adding \ for integer division and MOD for the remainder. Thus 5\2 returns 2, while 5 MOD 2 returns 1. Numeric functions include the standard ABS, ATN, COS, EXP, INT, LOG, RND, SGN, SIN, SQR, TAN. It also included the FIX operator, which is similar to INT but always truncates toward zero so that FIX(-1.5) returns -1 instead of -2 like INT. In addition to PEEK and POKE, which returned 16-bit values, the system also offered OUT and INP, which were similar but applied a bit mask to the values to allow individual bits to be set or cleared. CLS cleared the screen. System functions include FRE which returned the amount of free memory, and TAB which moved to the given column. AT (x,y) worked in a similar fashion to TAB, but moved the cursor to the given X,Y location.

Strings Suffixing a variable with $ indicated it was a string. String functions include the common ASC, CHR$, LEN, STR$, VAL. The STRING$ function makes copies of a given pattern string so that A$=STRING$(17, "X") will produce a string of 17 X's. Only one manipulation function is included, MID$, which works as in MS, but can also be used to replace characters in an existing string, MID$(A$,1,1)="Y" will replace the first letter of A$ with Y. INKEY$ returns the current key pressed on the keyboard, if any. + was used for string concatenation, as in most dialects. The HEX$, OCT$ and BIN$ functions returned a string encoding the value passed in. For instance PRINT HEX$(255) produces FF, while PRINT BIN$(255) produces 0000000011111111.

… excerpt ends here. Continue reading the full article.

Illustrations

Vilnius BASIC: Vilnius BASIC on BK-0010-01
Vilnius BASIC on BK-0010-01

Worked examples

Example 1 — a first encounter with Vilnius BASIC

Start with the simplest possible case. Write down what Vilnius BASIC claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In astronomy, 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 Vilnius 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 Vilnius 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 Vilnius BASIC

In research
Vilnius BASIC appears in astronomy 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 Vilnius 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
Vilnius BASIC is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC programming language, BASIC programming language family, Computing in the Soviet Union, so understanding it makes those chapters shorter.
In everyday life
Look for Vilnius 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Vilnius BASIC” →

Affiliate

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

How to study Vilnius BASIC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Vilnius 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 Vilnius BASIC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Vilnius BASIC in simple terms?

Vilnius BASIC, sometimes known as BK BASIC, is a dialect of the BASIC programming language running on the Elektronika BK-0010-01/BK-0011M and UKNC computers. It was developed at Vilnius University, located in Lithuania which was a republic of the Soviet Union at the time.

Why does Vilnius BASIC matter?

Because it connects several astronomy 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 Vilnius 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 Vilnius BASIC.

Tags

  • BASIC programming language
  • BASIC programming language family
  • Computing in the Soviet Union
  • Discontinued BASICs
  • Programming languages created in 1986
  • Soviet inventions
  • Vilnius University

Keep exploring