what did they smoke when they develop MTX Basic?

About the BASIC system (not including PROGRAMMING)
User avatar
Crazyboss
Site Admin
Posts: 194
Joined: 09 Aug 2012, 21:45
Location: Sweden
Contact:

what did they smoke when they develop MTX Basic?

Postby Crazyboss » 16 Oct 2017, 22:25

I often wonder why Memotech are so weird compared to other basics.

Here is a list of weird things:

1) Spaces need to be in the right places
2) A LET commands most be used for variable declare or calculation.
3) Arrays start at index 1 not 0, and must be declared
4) all variables must be decleared, they are not 0 or "" by default
5) using the CSR command to set the cursor (print at) 0,0 is top left corner, but for graphics pixels at 0,191 is top left corner.
6) No way to trace basic code when it runs.
7) Variables are saved to the basic file if you dont use a clear command before save.
8) if you want to correct something, you need to use the EDIT command.
9) in edit mode you can not use arrow up and down.

Cool things in MTX BASIC:
1)If you put to many spaces, it will be automatic formated to look nice.
2) Basic always return to a blue screen with white letters in text mode when program is terminated.
3) If there is an error it will automatic go to the line for you to correct the mistake. Most typos are eliminated cause the MTX basic check syntax "on the fly" while you type in basic code.
4) AUTO command to generate the next line number (a function Commodore basic did not have), but no renum command like the MSX basic :(
5) build in assembler
//CLAUS - Webmaster at www.mtxworld.dk

Martin A
Posts: 313
Joined: 09 Nov 2013, 21:03

Re: what did they smoke when they develop MTX Basic?

Postby Martin A » 16 Oct 2017, 23:09

You didn't mention the error messages.
Without rushing for the manual could anyone explain what the error "A" means, or "SE.D"

User avatar
1024MAK
Posts: 484
Joined: 24 Dec 2012, 03:01
Location: Looking forward to summer, in Somerset, UK

Re: what did they smoke when they develop MTX Basic?

Postby 1024MAK » 17 Oct 2017, 00:14

To be fair, a lot of the 'weird' things are the same in other BASIC implementations that were around at the time.

1) Spaces need to be in the right places - yes, annoying. I think some other BASICs are fussy over spaces, as they can get confused if you leave some spaces out.
2) A LET commands most be used for variable declare or calculation. - that was common with BASIC in the late 1970 and early 1980s until some "advanced" versions came along, e.g. like BBC BASIC.
3) Arrays start at index 1 not 0, and must be declared - Again, common with other BASICs of the day. The various BASICs have been very inconsistent with the number that an array index should start at.
4) all variables must be decleared, they are not 0 or "" by default - A pain, yes, but this is like some other BASICs.
5) using the CSR command to set the cursor (print at) 0,0 is top left corner, but for graphics pixels at 0,191 is top left corner. Another common thing - the ZX Spectrum does a similar thing.
6) No way to trace basic code when it runs. An advanced feature not available in many BASICs due to not enough ROM space.
7) Variables are saved to the basic file if you dont use a clear command before save. - same as the ZX81 and ZX Spectrum.
8) if you want to correct something, you need to use the EDIT command. - same as many BASICs including GW BASIC from Microsoft.
9) in edit mode you can not use arrow up and down. This is indeed annoying.

Mark
Last edited by 1024MAK on 17 Oct 2017, 08:52, edited 1 time in total.

User avatar
1024MAK
Posts: 484
Joined: 24 Dec 2012, 03:01
Location: Looking forward to summer, in Somerset, UK

Re: what did they smoke when they develop MTX Basic?

Postby 1024MAK » 17 Oct 2017, 00:15

Martin A wrote:You didn't mention the error messages.
Without rushing for the manual could anyone explain what the error "A" means, or "SE.D"

Aye, just as bad as a ZX81 where you just get a number...

Mark

User avatar
Crazyboss
Site Admin
Posts: 194
Joined: 09 Aug 2012, 21:45
Location: Sweden
Contact:

Re: what did they smoke when they develop MTX Basic?

Postby Crazyboss » 17 Oct 2017, 08:40

I think they looked a lot of what was around at Spectrum and BBC maybe ?

Cause the Spectravideo 318/328 (PRE MSX) and MSX computer from 1982-83, did not have those issues.

In MSX basic

1) LET is an option.
2) Spaces are optional.
3) All variables are 0 if not init, if string its ""
4) If DIM array is not decleared, i think it reservers upto index 10, and 0 is the first one.
5) Trace command is avaliable
6) Locate (print at), is the same as CSR 0,0 is top/left. Line, Pset (Plot), Circle etc. 0,0 is still top/left.
7) Locate only works in text mode, you use another weird way to output to the screen in graphics mode, using a PRESET command before a print out, but then you can put your text at 123,99 if you want.
8) MSX have more graphics command like, LINE,B and BF, for (BOX AND BOXFILL) and PAINT, it also have a play command can play notes directly.
9) MSX can also return bytes free, I dont think there is a easy way for that at MTX?
10) MSX also directly handles HEX, OCT, and Binary numbers.

On the other hand, MSX shows the command line if you terminate a basic program, like "Break IN 100"

If you get Errors in MSX Basic (which is easy since no syntax checking until it reach the line!). You first must list the line and the edit it, but you can use the full screen for edit.

MSX basic does not return to its normal colors on exit it does go to text mode. But functions keys can be defined and is also by default one of them is predefined with that color so just press it if you dont like the colors!

I am not complaining about MTX basic, after all this was my first computer, to learn programming and the basic on the Commodore 64, is even more bad :) so I am happy I started on the MTX :)

I guess at that time the guys in UK didn know (or cared) about what the Japanese and American was doing.

And the Error messages sucks first. But we learned to accept what Mistake, A, SE. A, No Space etc meant :)

Also I think they didn have much space in rom, cause we all know the boring "Ready" prompt, no "MTX Basic version 1.0 xxxxx bytes free."
//CLAUS - Webmaster at www.mtxworld.dk

stephen_usher
Posts: 28
Joined: 27 Nov 2016, 19:58

Re: what did they smoke when they develop MTX Basic?

Postby stephen_usher » 20 Oct 2017, 23:53

1) Spaces need to be in the right places
2) A LET commands most be used for variable declare or calculation.


As said previously, normal until later "lazy" BASICs. It also allows the parser to be far simpler as you ALWAYS have a keyword followed by arguments. This also makes the parser smaller and faster, which is a bonus with an interpreted language on a slow CPU with limited ROM space.

3) Arrays start at index 1 not 0, and must be declared


Standard in most early languages and definitely FORTRAN, from which BASIC was originally derived. (Beginner's All-purpose Symbolic Instruction Code was a highly simplified version of FORTRAN designed as a training language in the 1960s, originally submitted on punched cards.)

4) all variables must be decleared, they are not 0 or "" by default


Very common in many languages. Specifically they are "undefined". Remember that clearing the memory takes clock cycles and will slow down the program.

5) using the CSR command to set the cursor (print at) 0,0 is top left corner, but for graphics pixels at 0,191 is top left corner.


This is a common convention as text is usually printed left-to-right and down the page but graphs are drawn left-to-right, bottom-to-top.

6) No way to trace basic code when it runs.
7) Variables are saved to the basic file if you dont use a clear command before save.


This is a feature which allows you to have a save command within your program which allows the program to run from that point when loaded. i.e. the full state of the program, including executing line number, is saved.

8) if you want to correct something, you need to use the EDIT command.
9) in edit mode you can not use arrow up and down.


Full screen editors and even scrolling line editors were uncommon during this period, they generally arrived in the mid-to-late 80s with the increase in memory and processing power. Full screen editors are effectively stripped down word processors.

stephen_usher
Posts: 28
Joined: 27 Nov 2016, 19:58

Re: what did they smoke when they develop MTX Basic?

Postby stephen_usher » 20 Oct 2017, 23:56

P.S.
The built-in assembler was inspired by Acorn BASIC, both Atom BASIC and BBC BASIC.
The front panel is an almost complete clone of the one on the Research Machines Limited 380Z.

stephen_usher
Posts: 28
Joined: 27 Nov 2016, 19:58

Re: what did they smoke when they develop MTX Basic?

Postby stephen_usher » 21 Oct 2017, 00:00

Martin A wrote:You didn't mention the error messages.
Without rushing for the manual could anyone explain what the error "A" means, or "SE.D"


Error code look-up tables and messages take up valuable ROM space, which is in short supply.

Having said that some current software, such as Microsoft Windows 10, still return error codes in raw hexadecimal (64bit value), which is inexcusable.

Martin A
Posts: 313
Joined: 09 Nov 2013, 21:03

Re: what did they smoke when they develop MTX Basic?

Postby Martin A » 21 Oct 2017, 12:06

To add to the list of useful features

NEXT without a variable name is allowed
Shortened commands when typing ie P. for PRINT

Another thing that annoys
The editor putting an extra space after DATA

I'd hazard a guess that the error "A" was originally "Se.A" and got cropped to save 3 bytes.

For the MTX plus, I've re-used some of the space previously occupied by the tape I/O routines to add back some longer error messages.
error2.jpg
Some original error messages are fine
error2.jpg (28.31 KiB) Viewed 1037 times

Error1.jpg
Some needed a little work
Error1.jpg (29.2 KiB) Viewed 1037 times


NB Free does exist in the MTX try:
PRINT FRE(8)
then do
PRINT EXP(8)
to see where the command really goes - FRE looks like another victim of the ROM pruning


Return to “BASIC”

Who is online

Users browsing this forum: No registered users and 1 guest