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
2 votes
2 answers
257 views

Basic09 to Windows7

I want to open a Basic 09 code under windows 7. I just want to read the code. I do not want to execute it. Is there a way to do that?
Pierre's user avatar
  • 23
16 votes
3 answers
2k views

How do I save Commodore BASIC programs in ASCII?

On the Commodore 128, the built-in BASIC saves programs tokenized. How can I save (and then later load) the programs as ASCII instead? For example, like the ",A" option in GW-BASIC or the ...
Brian Knoblauch's user avatar
37 votes
3 answers
3k views

How can I play QBasic Nibbles on a modern machine?

MS-DOS versions 5 and 6 come bundled with the QBasic interpreter and a handful of example programs written in that BASIC dialect. One of the programs is Nibbles, a variant of the well-known Snake game....
user3840170's user avatar
  • 21.6k
7 votes
1 answer
713 views

How can I detect mouse wheel movement in QuickBasic?

I am using the following code to trap left/right/middle mouse button and mouse row/column in Microsoft QuickBasic 4.5 and I need a way to detect the mouse wheel. I have looked at Ralf Brown's ...
Azathoth's user avatar
  • 125
43 votes
4 answers
7k views

How did Woz write the Apple 1 BASIC before building the computer?

According to his 1984 interview with Byte magazine, Steve Wozniak created the BASIC for the Apple 1 computer before he actually built the computer: I sat down and wrote the BASIC first, and that took ...
DrSheldon's user avatar
  • 15.8k
9 votes
4 answers
1k views

Delay loop in BASIC

Yesterday I was looking for a way to implement a delay loop on the C64. I came across this page: https://www.c64-wiki.com/wiki/TIME At the bottom of the page there is a code fragment that waits for a ...
JvH's user avatar
  • 93
5 votes
3 answers
1k views

How can I read COM port addresses from BIOS in QuickBasic 4.5?

I have been using the following code to get comm port addresses from BIOS in QuickBasic 4.5: PRINT "Hex addresses for ports 0 to 3 from BIOS." DEF SEG = 0 FOR x = 0 TO 3 z = &H400 + ...
Azathoth's user avatar
  • 125
11 votes
4 answers
988 views

Commodore BASIC: why was the PET's GOTO so slow?

Received wisdom has it that Commodore didn't want to pay Microsoft extra for updated BASIC interpreters, and thus very little changed in Commodore BASIC v2 from the PETs to the C64. But consider the ...
scruss's user avatar
  • 20.6k
16 votes
8 answers
4k views

GOTO (etc) to a non-existent line?

Writing a BASIC interpreter has revealed a number of interesting bits of information that tend not to be mentioned in the documentation. For instance: 10 PRINT"ONE";:IF 1=2 THEN PRINT"...
Maury Markowitz's user avatar
26 votes
8 answers
6k views

Why did 8-bit Basic use 40-bit floating point?

Nowadays floating point is usually either 32 or 64 bits, sometimes 16, occasionally 128. But of course, the Basic interpreters on the 8-bit machines, having to implement floating point in software ...
rwallace's user avatar
  • 58.4k
5 votes
2 answers
479 views

Is there a way to make self-modifying programs in pure GW-BASIC? [closed]

I wonder if GW-BASIC may have had a method for allowing the creation of self-modifying programs just using BASIC, without needing to use PEEKs or POKEs, and not accessing disk-drives or similar memory....
mnml's user avatar
  • 450
0 votes
2 answers
347 views

Behaviour of commas in PRINT at a line-end

Does anyone have actual documentation on how MS/Commodore BASIC handles line wrapping in PRINT statements? I tried this in an online emulator: PRINT 1,2,3,4,5,6,7,8,9,0 In this case it wraps at the ...
Maury Markowitz's user avatar
9 votes
4 answers
1k views

Did any 8-bit versions of MS BASIC allow user-defined string functions?

My BASIC is almost working, the almost being the DEF FN. Just so I don't paint myself into a corner, is there any "mainstream" BASIC from the 8-bit era that allowed user-defined string ...
Maury Markowitz's user avatar
2 votes
1 answer
272 views

Peripherals needed to run Tiny BASIC interactively on an Intel 8080

I have an Intel 8080 core and would like to build the minimal computer system around it to run Tiny BASIC interactively. I am building this computer on an FPGA, so I am not asking about actual ...
Cactus's user avatar
  • 2,642
10 votes
4 answers
1k views

What were the first BASIC interpreters to be programmed in high-level languages?

I've been continuing to revise and expand the Wikipedia article that I started on BASIC interpreters. One of the criticisms was that it was too focused on the microcomputer era (which interested me ...
Jeffrey Henning's user avatar
23 votes
21 answers
6k views

8-bit home computers without BASIC

All the 8 bit home computers I'm aware of, had BASIC in their ROMs. A notable exception was Jupiter Ace, a British home computer which used Forth. Were there any other 8-bit home computers that came ...
Krackout's user avatar
  • 1,528
18 votes
2 answers
3k views

What is the oldest reference to PEEK, POKE, and USR?

I've been reading manuals for BASIC implementations and the earliest reference I can find to PEEK, POKE, and USR is in the Altair BASIC 3.2 manual, published in 1975. This morning I came across this ...
Jeffrey Henning's user avatar
3 votes
2 answers
1k views

Was it possible to win the "Lunar Lander" game with less fuel than the default?

A while ago I asked about the possible origin of a Russian version of the "Lunar Lander" game. No definitive answers were given. Meanwhile, I was able to decompile the binary into a semi-...
Leo B.'s user avatar
  • 18.3k
7 votes
6 answers
1k views

Would some BASIC interpreters for microcomputers be considered operating systems?

As software for micros developed, you could use the BASIC interpreter just to CLOAD and RUN assembly language programs. Those might call BASIC ROM routines (say, for converting ASCII input to binary ...
Jeffrey Henning's user avatar
13 votes
4 answers
3k views

Could you create a loop in direct-mode with BASIC?

Were there any home computers before 1985, on which you could create a loop (finite or infinite) in direct-mode? And if it was possible on some machines, what may it have been useful for? For example, ...
mnml's user avatar
  • 450
8 votes
1 answer
329 views

BASIC on the Nova?

The first widely documented BASIC on the Data General Nova platform appears to be Data General Extended BASIC. I can date it to at least 1978 due to copyrights in the manual, but I suspect it was ...
Maury Markowitz's user avatar
3 votes
5 answers
627 views

How to determine where in RAM the current Basic program resides on Amstrad microcomputers?

How can I find where in memory to locate the current Basic program in an Amstrad CPC/PCW family Zilog Z80-based microcomputer? Is it always the same address? A different well-known address depending ...
hippietrail's user avatar
  • 6,333
7 votes
5 answers
2k views

Positive/negative 16-bit integer formats in 8-bit systems?

While considering the recent question on Integer BASIC, a thought arises: Most systems using/supporting integer math used a 16-bit signed format. In the case of Integer BASIC, this leads to odd-...
Maury Markowitz's user avatar
6 votes
3 answers
1k views

Does Sinclair Spectrum BASIC have a maximum length for one line?

I was just writing some junk Speccy Basic programs, more to see how they take up space on the +3's disk layout than to do any actual programming. But I noticed that after editing a program line to ...
hippietrail's user avatar
  • 6,333
12 votes
1 answer
844 views

What additional hardware was required for BASIC on an Altair 8800?

I remember being aware of the Altair 8800 when it made it's mark, but only vaguely. Lately I found myself wondering what hardware was required for the Altair to get BASIC up and running. According ...
Geo...'s user avatar
  • 9,795
1 vote
1 answer
799 views

How can I link a BASIC program with BASIC 3.5 for C64?

In the magazine 64er from June 1990 a BASIC extension for running Commodore Basic V3.5 on the C64 was presented. The extension is available at csdb. However, to run a BASIC 3.5 program, it is ...
Peter B.'s user avatar
  • 4,437
28 votes
10 answers
7k views

Why did 8-bit computers choose BASIC dialects as "de facto" command-line interface, instead of contemporary Shell/Lisp dialects?

While all three clans of languages predated 8-bit computers, they shares features like 1) imperative programming, 2) English-alike keywords, 3) Prompt-Command-Parameters pattern interface. Why was ...
Schezuk's user avatar
  • 3,742
23 votes
3 answers
5k views

Could you manually eject a floppy quick enough to prevent data loss?

I have the vague recollection of "Panic Ejecting" floppy disks by lifting the latch on the drive after immediately regretting a command I had typed. At the time, I was young, impulsive, and blessed ...
Brian H's user avatar
  • 60.1k
2 votes
1 answer
245 views

Printing on the graphics screen with lowercase/uppercase letters using CHAR command in Commodore BASIC 7.0

The CHAR command in Commodore BASIC 7.0 on the Commodore 128 allows printing a text at a given position on the screen. Other than the PRINT command, CHAR also works in Hires graphics mode. Since the ...
Peter B.'s user avatar
  • 4,437
9 votes
1 answer
874 views

Restore a BASIC program after reset or "NEW" command on a Commodore 128

A BASIC program that was deleted with NEW or after a reset can be restored on Commodore computers as long as no new programs are entered or loaded (or the computer is powered off). For the C64, the ...
Peter B.'s user avatar
  • 4,437
11 votes
3 answers
2k views

Is it possible to PRINT AT 23,0 in ZX Spectrum BASIC?

The ZX Spectrum BASIC doesn't (ordinarily) let you print on lines 23 and 24 to allow for user input. Is there a way around this? I found a fairly recent post that suggested I could POKE 16418,0 but ...
Remy Sharp's user avatar
  • 1,057
20 votes
4 answers
4k views

How did integer multiplication work in 8-bit BASIC without CPU support

I've recently been teaching my 11 year old binary multiplication, which is on the UK maths syllabus at secondary school. We have used long multiplication, eg shift and add. This has made me wonder ...
Mark Williams's user avatar
15 votes
2 answers
4k views

How was a line of Commodore 64 BASIC code stored in its memory?

I am reading up on old C64 stuff and I am using the Vice emulator to play with it. Currently I am studying about how the C64 stored BASIC programs in RAM. This is quite clear (it starts on address $...
Bart Friederichs's user avatar
3 votes
2 answers
335 views

Are there Commodore BASIC 7.0 music demos?

Commodore BASIC 7.0 that came with the Commodore 128 provided commands for playing music notes and setting different instruments. The play function even had a feature that played a note in the ...
Peter B.'s user avatar
  • 4,437
8 votes
4 answers
1k views

Is it possible in Commodore BASIC V2.0 to configure the system so that the PRINT command does not update color?

The PRINTcommand in Commodore BASIC V2.0 (the one that runs on the Commodore 64) prints each character to the screen address (which is set by the byte in address 648) as well as putting the current ...
Peter B.'s user avatar
  • 4,437
27 votes
4 answers
5k views

Why was it common to reference memory locations using negative numbers on some BASICs?

If you had an Apple II, it was common in BASIC to reference memory locations above the 32K point by using a negative number. For example, if you wanted to click the speaker you would PEEK/POKE -16336 ...
bjb's user avatar
  • 15.8k
15 votes
1 answer
2k views

What are the "ports" used via IN/OUT, vs. the PEEK/POKE address space?

This is something of a followup to How much control of TRS-80 Model III disk drives was possible from its Cassette (ROM) BASIC? but on a more general topic: I know that PEEK and POKE enable direct ...
natevw's user avatar
  • 2,927
10 votes
2 answers
458 views

How much control of TRS-80 Model III disk drives was possible from its Cassette (ROM) BASIC?

How much control over the TRS-80 Model III's floppy drive controller can be effected via relatively simple commands, typed into its built-in Cassette BASIC? My understanding is that general usage of ...
natevw's user avatar
  • 2,927
11 votes
8 answers
3k views

Variances in Basic highest line numbers

I used to wonder why different versions of Basic on 8bit machines would impose different limits on the highest line number permitted. I should point out this excludes any trickery to manually change ...
AndyF's user avatar
  • 584
4 votes
3 answers
324 views

Looking for a BASIC decruncher: inserting spaces between keywords

Many dialects of 8-bit BASIC allow ‘crunched’ source; that is, most spaces can be ignored between keywords: 10 FORX=1TO10 20 PRINTX,X^2 30 NEXTX After Microsoft BASIC-80 Rev. 5.x, however, spaces ...
scruss's user avatar
  • 20.6k
23 votes
3 answers
4k views

Was Locomotive BASIC significantly better than Sinclair BASIC?

The Amstrad CPC range of Z80 machines shipped with a ROM BASIC, designed and implemented by Locomotive Software. The most well known competitor was the Sinclair ZX Spectrum, also a Z80 machine, with ...
Mark Williams's user avatar
4 votes
3 answers
585 views

What was stored in memory that was "unavailable to BASIC"?

On home / personal computers (such as before 1984), a machine might be described as having 24k RAM, but only 18k of that available to BASIC. If the machine had BASIC and the OS (or BIOS) stored in ROM,...
questiontype's user avatar
  • 1,011
34 votes
6 answers
5k views

What type of interpreter were most 8-bit BASIC implementations?

I’m a big fan of early/mid 1980s personal computers like the Amstrad CPC, Commodore 64 and the Sinclair Spectrum. One thing these computers all had was a version of BASIC. Well known ones being MS-...
Garry Pettet's user avatar
17 votes
2 answers
2k views

How to decode an audio file which contains an MSX BASIC program? [closed]

I have an audio file in WAV format, which supposedly comes from a cassette sound file. Moreover, it contains a BASIC program, but I don't know how to decode it. I have tried to convert the wav file to ...
Josemi 's user avatar
  • 271
14 votes
4 answers
2k views

Sources for some old BASIC games

Poking about in early issues of Dr Dobbs' Journal (the journal of the People's Computer Company, or PCC) I came across a listing for BASIC games available on tape. Many of these are widespread, but a ...
Maury Markowitz's user avatar
7 votes
1 answer
665 views

Why is ZX80 much faster than Spectrum on Rugg/Feldman benchmarks?

If you look at the results of the Rugg/Feldman benchmarks, shown in this Wiki entry, you'll see that Sinclair ZX80 is much faster than Sinclair Spectrum on all tests despite the fact that both ...
neutrino's user avatar
  • 173
10 votes
1 answer
387 views

Any historical references to links between JOSS and BASIC?

I only recently learned of the JOSS language, and then only through a roundabout fashion from an interview with David Ahl where he mentions FOCAL. This led me to read the available manuals for all ...
Maury Markowitz's user avatar
18 votes
6 answers
7k views

How slow was the 6502 BASIC compared to Assembly

Imagine a modern computer, where let's say Python is a high level programming language and needs to be interpreted in order to execute a piece of code. You could write some code in C, compile it, ...
Bartek Malysz's user avatar
6 votes
7 answers
2k views

What ways are there to "PEEK" of memory sections in (different) BASIC(s)?

Question Was there any BASIC or extension or toolbox for BASIC allowing to PEEK multiple bytes from memory in one instruction - besides the often-used DPEEK (or alike) to read a word? I'm asking ...
Raffzahn's user avatar
  • 213k
8 votes
2 answers
667 views

Saving screen pixels to string in ZX Basic

I remember programming a ZX spectrum in 128 basic (about 20 years ago). I remember I was able to save a third of the screen into a variable. Something like this: 10 LET A$ = [16384 BYTES starting at ...
zooby's user avatar
  • 183