Questions tagged [basic]

BASIC: a high-level programming language favored in retro systems. For dialect-specific questions, use a tag such as [microsoft-basic], [applesoft-basic], etc.

Filter by
Sorted by
Tagged with
3 votes
2 answers
537 views

Anyone heard of 'something like' EDITLN or EDITLINE or LINEDIT statement in BASIC?

Anyone heard of 'something like' EDITLN or EDITLINE or LINEDIT statement in BASIC for editing lines of a program's own code while executing ? I seem to remember a statement that was spelled 'something ...
questiontype's user avatar
  • 1,011
14 votes
1 answer
1k views

Why is the original Altair BASIC (for the 8080 CPU) source code not available on-line?

As described by The Register in 2001, around 1987 journalists and others started asking Bill Gates for a copy of the source code for the original version of Altair (eventually Micro-Soft) BASIC, ...
cjs's user avatar
  • 24.6k
9 votes
1 answer
359 views

String libraries for BASIC

Looking over old BASICs I find two general approaches to handling string variables. HP/Wang/Atari/et al used C-like array-of-char whose memory size is specified with a DIM statement, with the upside ...
Maury Markowitz's user avatar
7 votes
2 answers
1k views

Read HP Basic (RMB) tokenized file into clear text?

I have a cople of HP BASIC (HP9000) files that have been saved in a non-ASCII format (HFSLIF?). Does anyone know of a conversion utility to get the code readable? The files are already on a win7 ...
Staffan's user avatar
  • 101
7 votes
4 answers
4k views

Library of MS BASIC programs in text format?

I am wondering if anyone has a pointer to a good source of "classic" BASIC programs, in text format. One would think this would be easy to find, but unfortunately VB so pollutes the results as to ...
Maury Markowitz's user avatar
3 votes
0 answers
315 views

What is this tool that was once used to teach beginner level BASIC?

In the early 1980's there was a small handheld device that looked like a calculator. It was a tool to teach beginner level programming in BASIC. Its ad slogan was "keep it near you". I never had one ...
Snack_Food_Termite's user avatar
35 votes
22 answers
8k views

Was self-modifying code possible using BASIC?

Was self-modifying-code possible using BASIC? Parameters: On commonly affordable home-computers before 1984 Code that changes its own instructions while it is executing Using BASIC only Not using ...
questiontype's user avatar
  • 1,011
8 votes
4 answers
850 views

Where can I read the article from Personal Computer World, Nov 1978, which introduced the 8th Rugg/Feldman test program?

I'm trying to track down a copy of PCW from November 1978. I am looking for an article on benchmarking BASIC. They introduced an 8th program to the 7-program Rugg/Feldman test and I'd like to read the ...
Maury Markowitz's user avatar
49 votes
3 answers
8k views

Strange math syntax in old basic listing

I'm browsing through an old book "Basic Computer Simulation" from 1983. It contains a line of BASIC code that reads: LET Z1 = M * D1 * (PQ / A) [ 3 I understand all of the code except the "[ 3" I ...
Ron Jensen's user avatar
11 votes
1 answer
653 views

Purpose of using REM when running TR-DOS commands in BASIC

When running TR-DOS commands from within BASIC, it's necessary to prefix the command with RANDOMIZE USR 15619: REM: first. I understand the former command, but not the latter. For example, to load a ...
forest's user avatar
  • 1,999
8 votes
3 answers
502 views

BASIC09 and I-Code

I only learned of BASIC09 today, and I'm trying to wrap my head around it. The manual talks about it being a compiler, but I'm not sure I see significant differences between its I-code and tokenized ...
Maury Markowitz's user avatar
8 votes
2 answers
592 views

Was Vilnius BASIC cross-platform?

It is well established that Vilnius BASIC runs on PDP-11 compatible machines. For example, the BK-0010 and UKNC had Vilnius BASIC in ROM. Apparently, it was closely modelled after MSX BASIC, which ...
Omar and Lorraine's user avatar
15 votes
3 answers
964 views

Origins of the "array like" strings in BASIC

A number of early microcomputer BASICs had 'array like strings' that were unlike MS's system and instead behaved like arrays of char. Substrings were accessed using a syntax like: A$ = B$(1,5) as ...
Maury Markowitz's user avatar
7 votes
3 answers
1k views

How to get a plain text file version of a CP/M .BAS (M-BASIC) program?

I have an old game (STRTRK.BAS) from my dad's Kaypro 10 that I would like to convert to a plain text file. Basically, what I'm trying to do is get it onto a modern computer in plain text format so I ...
dvanaria's user avatar
  • 331
8 votes
1 answer
639 views

How can I input a string in ZX Spectrum BASIC using INPUT and not show the quotation marks?

How can I input a string in ZX Spectrum BASIC and not show the quotation marks on input? I've written a program for my 3-year old daughter to type in some letters, but she keeps deleting the ...
Gaz's user avatar
  • 183
2 votes
3 answers
322 views

How to use the MOD operator in TRS-80 model 100 BASIC?

I'm finding the MOD operand is not working when I enter it in the BASIC prompt. This is how I write it out. PRINT 1 * MOD(23) ?SN Error I have looked into a reference guide and it is too broad on ...
Travis Wells's user avatar
2 votes
1 answer
270 views

Decoding the Workings of the TRS-80 BASIC Game "Escape!"

I've decided to port Chase! to Swift, apparently because I am insane. In any event, I'm trying to collect the various switches in versions from the era. One of these is unique, found here under the ...
Maury Markowitz's user avatar
11 votes
4 answers
3k views

How can I implement the modulus operator in Commodore 64 Basic?

How can I implement the modulus operator in Commodore 64 Basic? There are not a lot of math functions to work with, and modulus would be very handy.
edthedev's user avatar
  • 129
10 votes
1 answer
930 views

Commodore Plus/4 60671 bytes free - how?

It is widely known that, while the Commodore 64 did indeed provide 64K of RAM for machine code programs, only 38K was usable from BASIC; this was because bank switching was needed to get at the rest, ...
rwallace's user avatar
  • 58.4k
22 votes
6 answers
2k views

Commodore BASIC and binary floating point precision

I am mildly curious that though the 6502 provides BCD arithmetic which would be useful for implementing decimal floating point, Commodore BASIC uses, like all (?) Micro-Soft BASIC, binary floating ...
rwallace's user avatar
  • 58.4k
7 votes
11 answers
2k views

Are there any old and nowadays active Operating Systems which has only BASIC Programming Language?

Some old Operating Systems I hear have only BASIC Programming Language. Are there any active and old operating systems which includes only BASIC Programming Language?
Tom Anderson's user avatar
14 votes
2 answers
762 views

Why did Extended BASIC on the TI-99/4A only allow 28 of the 32 sprites?

The Video Display Processor (VDP) of the TI-99/4A was capable of displaying 32 hardware sprites. These sprites were unusable with the default, built-in BASIC that TI provided. However, an enhanced ...
cbmeeks's user avatar
  • 8,411
6 votes
3 answers
618 views

Opening or converting GFA Basic files to something readable?

There is a bunch of GFA BASIC for Amiga files (the source code for Blender's ancestor, Traces, downloadable here: http://zgodzinski.com/blender-prehistory/) that I would like to peek at. Despite my ...
François Beaune's user avatar
14 votes
2 answers
2k views

Why was BASIC on the Commodore 64 one byte shy of 38KiB?

When you power up a Commodore 64 you are greeted with a friendly message telling the user it has 38911 BASIC bytes free. 38,911 is one byte shy of a 38 KiB (1,024 * 38 = 38,912). What was the reason ...
cbmeeks's user avatar
  • 8,411
4 votes
3 answers
2k views

How can I view BASIC code hidden by SYS?

I ran a validation of an old disk, and it turns out this ruined a game (won't load) and deleted my old high score list on David's Midnight Magic. I would like to edit the code to get the high score ...
Canned Man's user avatar
9 votes
4 answers
995 views

Early BASIC memory management

Can anyone verify or correct my memory here? Long ago, I had access to a Commodore PET which I think had 8kB of memory. Also slightly less long ago, I had a Commodore 64 with its "elephatine" 64kB. ...
badjohn's user avatar
  • 2,014
10 votes
4 answers
2k views

What are the rules for Applesoft BASIC formatting for code?

What are the rules for Applesoft BASIC formatting for code? I've been doing some BASIC coding and noticed that: 10 input "some question?"; name$ Will be reformatted as: 10 INPUT "some question?";...
Michael Shopsin's user avatar
16 votes
1 answer
772 views

Origin/source of "One Line" one-key game

Circa 1985 in our school BBC Micro lab, we wasted much time playing a tiny type-in game that looked a bit like this: The playfield was filled with a random arrangement of asterisks, and the player ...
scruss's user avatar
  • 20.5k
4 votes
0 answers
167 views

DTSS software list?

I'm continuing my effort to track down the original author of the early game Chase. I have pretty much concluded it was written on the GE-635 running Dartmouth Time Sharing System (DTSS) and Dartmouth ...
Maury Markowitz's user avatar
19 votes
10 answers
4k views

What caused the demise of BASIC/BASICA in the late 1980's?

While not strictly adhered to, this is somewhat of a generalization of computer listings found in the more popular magazines of the time - BYTE, Kilobaud, PC Computing, etc. This explains the ...
jwzumwalt's user avatar
  • 4,469
15 votes
7 answers
2k views

New 6502 BASICs?

I sort of "have a thing for BASIC" right now, which has led to a couple of great exchanges here in RSE about the variations "back in the day". I'm wondering if anyone is aware of other modern BASICs ...
Maury Markowitz's user avatar
7 votes
1 answer
761 views

Differences between 4k, 8k and Extended Altair BASIC?

Various histories state that there were at least three versions of Altair BASIC, 4k, 8k and Extended - plus modifications like Disk. I've found some listings of the 4k, but does anyone have a short ...
Maury Markowitz's user avatar
32 votes
4 answers
4k views

BBC/Acorn BASIC, what made it so fast?

As I look over old versions of BASIC trying to piece together their history, I come across repeated indications that BBC Basic was really fast. One list puts it running the Ahl benchmark (for all its ...
Maury Markowitz's user avatar
10 votes
2 answers
3k views

Did Microsoft BASIC ever use Z80 only instructions?

Did Microsoft BASIC (or any of the OEM versions) ever use Z80 only instructions? For the purposes of this question I'm ignoring the equivalent of BIOS I/O layers which OEMs would have provided.
PeterI's user avatar
  • 5,277
7 votes
4 answers
882 views

What books did schools use to teach BASIC?

What books would have been used to teach school aged kids BASIC in a classroom setting back when BASIC was in common use? 8-Bit computers commonly came with tutorials to learn BASIC, like A Touch of ...
Michael Shopsin's user avatar
28 votes
2 answers
4k views

Why does this BASIC program declare variables for the numbers 0 to 4?

On pages 150 to 154 of William Tang's (1982) Spectrum Machine Language for the Absolute Beginner, there are these lines of code. (Note GOTO 9000 is the first non-REM statement in the program). 9000 ...
harlandski's user avatar
  • 2,903
11 votes
2 answers
1k views

ZX BASIC REM statement overhead

Since my other question has been answered and has given me a way to do high-precision timing, I've been experimenting with it a bit. The first thing I did was write a simple benchmark using the FRAMES ...
forest's user avatar
  • 1,999
19 votes
5 answers
2k views

Uptime in ZX BASIC

How can I obtain the uptime of a Sinclair ZX Spectrum machine (ZX48, ZX128, or Pentagon clone) via their BASIC interpreter? Specifically, the same value used by RANDOMIZE 0 to seed its PRNG. I would ...
forest's user avatar
  • 1,999
21 votes
6 answers
4k views

Understanding INKEY$ in ZX BASIC

The ZX BASIC Manual gives the following little program to demonstrate how INKEY$ works: 10 IF INKEY$ <> "" THEN GO TO 10 20 IF INKEY$ = "" THEN GO TO 20 30 PRINT INKEY$; 40 GO TO 10 While I ...
harlandski's user avatar
  • 2,903
23 votes
6 answers
4k views

ZX Spectrum tokenisation

The BASIC used in the early ZX Spectrum (and also its ZX predecessors) had this weird thing where every single BASIC token was printed onto the keyboard, and for example PRINT or LOAD were entered by ...
Omar and Lorraine's user avatar
23 votes
8 answers
3k views

Which BASIC interpreters support techniques for hybrid programming in Assembly?

It was common with Commodore BASIC (and others, I'm sure) to have machine language encoded in BASIC programs using POKEs or READ/DATA. This was needed for both performance and to access certain ...
Brian H's user avatar
  • 60.1k
18 votes
5 answers
5k views

Was Family BASIC for the NES/Famicom powerful enough to create full games and applications?

"Family BASIC or Famicom BASIC is the consumer product for programming Nintendo's Family Computer video game console of Japan." wikipedia I can't seem to find much info about Family BASIC ...
LateralTerminal's user avatar
22 votes
4 answers
2k views

Was the design of MS-BASIC for 6502 based on MS-BASIC for 8080?

Looking through the source code of the 6502 MS-BASIC, certain parts of it seem more reminiscent of how things would be done on the 8080, then on how they should be done on the 6502. Code to find a ...
supercat's user avatar
  • 34.6k
8 votes
1 answer
457 views

Determine Character Encoding used on HP 9000 Model 310 running BASIC 5.1

With the help of this community, I was able to copy and emulate a HP9133 HD using Hpdir and Hpdrive. Now, I want to edit, or at the bare minimum, read the programs on the HD. I have extracted the ...
AMiller's user avatar
  • 315
20 votes
6 answers
3k views

C64 BASIC: How to suppress the '?' sign when using the INPUT command?

When you are getting INPUT in Commodore BASIC it always adds a question mark at the end of the string you want to show. Is there a way to suppress the question mark when using the INPUT command?
user avatar
11 votes
2 answers
904 views

Why does this BASIC program keep restarting?

Here is a BASIC program for the Commodore 64, which should load the LIB file from the disk, and then stop. Yes? 5 PRINT "LOADING..." 10 LOAD "LIB",8,1 20 STOP the LIB file is 102 bytes long and is ...
Omar and Lorraine's user avatar
7 votes
2 answers
1k views

C64: Strange Behaviour on Control Port 1

I wrote this little Basic program to get Joystick input from Control Port 1. I know that this method is very strange and is better for keyboard input. 20 get a$ 30 if a$="" then 20 32 b=asc(a$) 33 ...
user avatar
30 votes
2 answers
4k views

C64: Why is POS(π) faster than POS(0)?

According to this article: german C64 Wiki article about the POS() command POS(π) is 20 % faster. Although in my experience it is ...
user avatar
3 votes
2 answers
804 views

C64, basic v2, DATA strange behavior

I have the following code line: 0DATA"-+-+-" Here "\" and "/" are the ASC codes 205 and 206. I get a syntax error: ?SYNTAX ERROR IN 0 READY. As I can remember, there was same special in the ...
peterh's user avatar
  • 1,749
9 votes
3 answers
674 views

Copying disk image from HP 9122D drive

I have a HP 9122D (EDIT: its actually a 9133) combo disk drive connected to an HP 9000 model 310 computer running Basic 4.0. This setup is used to control a few machines. The hard drive is getting ...
AMiller's user avatar
  • 315