why so much load ways?

Por PingPong

Prophet (3460)

Imagen del PingPong

20-03-2019, 12:56

MSX BASIC Have a lot of load commands compared to C64 & ZX Speccy that have only one.
I was wondering why it is so.
AFAIK every tape format had a header that allows the computer to distinguish between the file contents so why one should use a plethora of different commands?
MSX BASIC can load a program in very different ways:
LOAD "CAS:" [,R]
RUN "CAS:" : REM MAYBE THE SAME OF ABOVE?
CLOAD : REM BUT WHAT IN THE HELL? LOAD WAS NOT ENOUGH?
BLOAD "CAS:" [,R] : REM WHY CAN'T THE COMPUTER FIGURE BY ITSELF THAT IS A BINARY BLOCK OF DATA?

Login sesión o register para postear comentarios

Por Manuel

Ascended (15835)

Imagen del Manuel

20-03-2019, 13:27

I think you're right that the BIOS could have autodetected the format using the header and then run appropriately. However, you still have to distinguish the options: load or load+run, load or load at offset, load in RAM or in VRAM. The sanity of these options depends on the file format, and when using auto-detect the format is only known afterwards. Perhaps that is the reason, but a design could also be to then just ignore the options that do not apply, or even stop with an error.

There are only 3 loadable file formats for tape:
- tokenized basic (CLOAD). This is very efficient. And why no auto-run option??
- ASCII (LOAD/RUN). Quite inefficient. Is split up in blocks, so lots of overhead. No idea why they did that though.
- binary (BLOAD). Efficient, just a RAM dump with a header.

And yes, LOAD"CAS:",R is identical to RUN"CAS:". I also wonder why they did that... Or why the latter wouldn't just recognize binary format and run that as well.

Por NYYRIKKI

Enlighted (5402)

Imagen del NYYRIKKI

20-03-2019, 15:36

I would say on MSX all mass storage handling is a bit messed up. I think having LOAD & BLOAD is quite ok... Especially on disk. It anyways lets you to immediately see from listing if the BASIC program is planning to loading a next part or some binary blob. How ever CLOAD should have not ever happened and luckily on disk this functionality was combined with LOAD. I think it is also a bit painful that cassette programs have 6 character case sensitive names, while on disk you have 8+3 non case sensitive names. If we start talking about binary file handling on BASIC then I think it is a total mess... I definitely think that they should have ditched the GW-BASIC fields & records style and approached the issue with style more close to what they did with new BDOS calls.

Por Timmy

Expert (114)

Imagen del Timmy

20-03-2019, 15:42

PingPong wrote:

MSX BASIC Have a lot of load commands compared to C64 & ZX Speccy that have only one.
I was wondering why it is so.

Because of design. You can have several commands to do several things, or 1 command with several parameters to do things. C64 and the Spectrum BASIC's LOAD command just have more parameters instead.

In the end, all these computers can do the same things. And you still need to say if something is a program or just data.

Quote:

BLOAD "CAS:" [,R] : REM WHY CAN'T THE COMPUTER FIGURE BY ITSELF THAT IS A BINARY BLOCK OF DATA?

The computer actually figured by itself it's a binary block. In fact, everything is a binary block of data. Sometimes they are also something else, too.

Por TomH

Champion (327)

Imagen del TomH

20-03-2019, 20:14

Sorry, quick aside: the C64 is worse at this stuff than almost any other machine.

Tape, first file is BASIC: LOAD "",1,0
Tape, first file is code: LOAD "",1,1
Disk, intended 'first' file is BASIC: LOAD "*",8,0
Disk, intended 'first' file is code: LOAD "*",8,1

... and let's not even get started on how they hacked in disk directory management. There's no CAT or DIR command, you have to load from the disk an automatically-generated BASIC file in which each line is the name of a file on the disk. Oh, you forgot you already had a BASIC program in memory? Sorry, gone!

The 128kb Spectrums are the gold standard for tape loading simplicity. Just select 'Tape Loader' from the menu and play your tape. Since that is the option that's already selected when you switch on, it's one keypress.

Por zeilemaker54

Master (249)

Imagen del zeilemaker54

20-03-2019, 20:21

The syntax of the load and run commands have a long history, because msx basic is actually microsoft basic 4.5, which of course has a long history. And one of the objectives was to remain maximum compatibility with other microsoft basic implementations.