51
votes
Accepted
Which BASIC-like language has "ENDIF", "DIM ... OF" to declare arrays, and a double slash for comments?
My guess is that this is COMAL, which was available on the IBM PC. Notably:
COMAL was developed in Denmark.
COMAL was based on BASIC (and possibly Pascal).
COMAL uses the DIM variable OF x format, ...
31
votes
Why was BASIC's INT() a floor, and not a truncate?
It Has (Almost) Always Been Floor
Since at least 1966, with Dartmouth BASIC V3, the behaviour of INT is defined as as delivering an integer not greater than X - which otherwise may be called FLOOR. ...
21
votes
Accepted
Which version of BASIC uses RANDOM for seeding the random number generator (RNG)?
RANDOM is the keyword TRS-80 Level II BASIC uses to seed the random number generator. For a description see here.
On a side note, the BASIC used is mentioned in the referred article right beside the ...
21
votes
Accepted
What is this unusual syntax for the Commodore SYS command?
Line 40 looks like a typo. It should be SYS 65493 instead of SYS 65439. SYS 65493 ($FFD5) maps to the internal LOAD routine at $F49E
Line 10 calls the filename parsing routine PLSV at $E1D4. PLSV ...
20
votes
Why does Sinclair BASIC have all of the characters twice in the token table?
You're right; the ZX81 does not use ASCII. That's because it uses the CPU to generate the displayed picture, from a compressed format in memory. The way this works is an absolute freakshow*, but from ...
20
votes
What is the bug in Creative Computing's version of "Amazing"?
I wrote an article on finding two bugs in Amazing for trs8bit - Volume 17 Issue 03 - Sept 2023.
I found two bugs, but no loop.
No maze exit. The code can finish with Z=0 meaning no exit was drawn in ...
17
votes
Why did Extended BASIC on the TI-99/4A only allow 28 of the 32 sprites?
The VDP area for the Sprite Attributes Table is 0x0300 to 0x037f. That is 128 bytes, which is 4 bytes per sprite. Each sprite entry in this table has the sprite's X/Y position, color, index to the ...
15
votes
Which BASIC-like language has "ENDIF", "DIM ... OF" to declare arrays, and a double slash for comments?
Comments are in Danish, so this is Comal, and most likely Comal80 which was what was taught in Danish schools at that time. I cut my teeth on the Regnecentral version - which was robust but slow - ...
14
votes
Accepted
Is it possible to write unit tests in Applesoft BASIC?
Depends, as usual, on your of understanding what a 'Unit Test' is or has to be. But BASIC is no difference from any other language. Write your functions (subroutines in BASIC) and call them in a ...
14
votes
Accepted
WIDTH command in MSX BASIC
At width=40, 240 pixels are generated from a nominal line width of 342; subtracting the 58/342ths of the line that is used for blanking and sync that means around 84% of each line is pixels. Using all ...
12
votes
Why does the FRE() function in CBM BASIC v2 return negative values?
Whether that's a bug or just sloppy programming is hard to decide.
Maybe the designers needed to save some ROM space and simply decided that the main use case for FRE(0) i.e., you want to know how ...
12
votes
What is this unusual syntax for the Commodore SYS command?
Three related concepts one should understand when trying to understand Commodore BASIC programs (or other Microsoft-derived BASIC interpreters for that matter) are the CHRPTR address, and the CHRGET ...
9
votes
Accepted
Problem using Commodore 64 BASIC TAB() command in abbreviated form
I wouldn't call it a bug and the solution is kind of obvious: Don't type in the opening parenthesis for tokens that include that already (tab( and spc(), if you abbreviate the function. I.e.:
10 print ...
8
votes
Accepted
What binary format did QuickBasic use for BAS files?
They seemed to be QuickBasic 4.5 files. A proprietary format from QuickBasic that was not only a text file, but included various other concepts like Subs - that were sort of sections into the file.
So ...
7
votes
Why does Sinclair BASIC have all of the characters twice in the token table?
TL;DR:
That encoding is not just the token table but as well the BASIC charset and the screen charset which offers each of the 64 printable characters as Black-on-White (00h..3Fh) or White on Black (...
7
votes
Accepted
Printing characters not at expected position
It's not enough to poke the values into those locations - there's other information held elsewhere that also needs to be updated. See, for example, the following (slightly paraphrased) text from this ...
7
votes
Why does the FRE() function in CBM BASIC v2 return negative values?
I already understand, on a purely technical level, why a negative value is returned: the free memory is calculated as an unsigned 16-bit integer, but the FRE() routine interprets the result of this ...
7
votes
Accepted
How to run MOUSSUBS.BAS in QuickBasic? Looking for MIXED.QLB and MOUSE.ASM?
I searched for the filenames and found that MOUSSUBS.BAS and BITS.BAS are from Microsoft QuickBASIC Programmer's Toolbox, a 1988 Microsoft Press book by John Clark Craig.
(at least according to https:/...
6
votes
Accepted
Atom BASIC, anyone here used it or can emulate it?
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 ...
6
votes
What binary format did QuickBasic use for BAS files?
The example can be loaded into a copy of QuickBasic and then saved as a plain text file:
DECLARE FUNCTION Shade& (red!, green!, blue!)
DECLARE SUB GetShiftStates (shift AS ANY)
CONST FALSE = 0
...
6
votes
What is the bug in Creative Computing's version of "Amazing"?
I couldn't find exactly the source version you ran, Maury.
The original — written by Jack Hauber and first published in DEC EDU Newsletter Issue Number 4 in 1972, rekeyed by me here: amazin.bas — does ...
5
votes
What binary format did QuickBasic use for BAS files?
If this is indeed a QuickBasic 4.5 file, you could load it into QuickBasic 4.5 under some sort of DOS emulation (DOSBox etc.), then save it with
SAVE "NEWFILE",A if I remember correctly to ...
5
votes
What made some 8-bit BASIC interpreters especially slow?
I'll add my $0.02 since I've written a few performant BASIC-like interpreters for work for the S08, ColdFire and ARM7TDMI. Everything below is generally NOT what BASIC interpreters did in the 80's.
...
4
votes
Atom BASIC, anyone here used it or can emulate it?
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 ...
4
votes
8-bit home computers without BASIC
Victor Lambda in France was a clean ROM micro-computer. It had only 2K of ROM which contained a loader. Languages would be loaded from compact cassette. It was delivered with a BASIC interpreter. ...
4
votes
Why does Sinclair BASIC have all of the characters twice in the token table?
What the linked table does not show is that the letters with the high bit set are displayed in white on black rather than black on white. The equivalent table at Wikipedia is clearer in this respect.
...
2
votes
Why does Sinclair BASIC have all of the characters twice in the token table?
why does it have all the letters, digits and punctuation in the table twice? For instance, A is in 38 as well as 166. What is the purpose of this?
In ZX Spectrum 0x90-0xA4 characters are actually UDG ...
2
votes
Is it possible to write unit tests in Applesoft BASIC?
I can't speak to the apple II specifically but IMO the big difference between programming 70s/80s microcomputers and programming modern computers (and big computers in the 70s/80s) is just the ...
2
votes
What books did schools use to teach BASIC?
"101 BASIC COMPUTER GAMES" also known as "BASIC COMPUTER GAMES" (the "101" in the title was not clear on some version of the cover art).
https://en.wikipedia.org/wiki/...
2
votes
Would some BASIC interpreters for microcomputers be considered operating systems?
Although you ask specifically about microcomputers and interpreted BASIC, note that the category of machines with BASIC as the basic command interface included minicomputers such as the Pick systems.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
basic × 170commodore-64 × 23
zx-spectrum × 16
programming × 13
history × 8
commodore × 7
8-bit-microcomputers × 7
microsoft-basic × 7
sinclair × 7
apple-ii × 6
assembly × 6
z80 × 6
6502 × 5
gaming × 5
software-development × 5
applesoft-basic × 5
graphics × 4
memory × 4
performance × 4
commodore-128 × 4
hp × 4
ms-dos × 3
memory-layout × 3
8080 × 3
file-format × 3