News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_eto

Exclamation mark in LOAD

Started by eto, 06:44, 06 April 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eto

I was looking into many DSK images recently and for every BASIC loader that I found, they used something like this:

100 load "!game.bin",&8000
110 call &8980

First, I thought this might be a leftover as many of those game where cassette releases, but I found it in every single BASIC loader, even those of cracks. 

I thought that the ! does not have any impact on discs. But why is it then always used there too?

roudoudou

the exclamation disable system messages (like load error on disc ;) )
My pronouns are RASM and ACE

eto

Quote from: roudoudou on 07:47, 06 April 22the exclamation disable system messages (like load error on disc ;) )
OK, great to know that. Thanks.

Still not sure if that is useful on discs. I guess it would be always beneficial to know if there is a load error on a disc. Or can there be situations, where the system would output a message but still load a file successfully?

roudoudou

Quote from: eto on 08:18, 06 April 22
Quote from: roudoudou on 07:47, 06 April 22the exclamation disable system messages (like load error on disc ;) )
OK, great to know that. Thanks.

Still not sure if that is useful on discs. I guess it would be always beneficial to know if there is a load error on a disc. Or can there be situations, where the system would output a message but still load a file successfully?

It's useful to know if a file exists (before writing it, before deleting it) without garbage messages on screen

Another example when you want to load a bunch of numeroted files and you dont know the last one :)
My pronouns are RASM and ACE

Nworc

#4
Quote from: eto
Quote from: roudoudouthe exclamation disable system messages (like load error on disc ;) )
OK, great to know that. Thanks.

Still not sure if that is useful on discs. I guess it would be always beneficial to know if there is a load error on a disc. Or can there be situations, where the system would output a message but still load a file successfully?

The good thing with Amsdos is, that it is agnostic to whether you load your data from Tape or Disc or whatever hardware is connected - the program using the load and save functions should not care. So, you should write your loader in a way to run on all media.

The disc functions keep quiet in all good cases, to my knowledge. And if there is a problem, it does not help suppressing messages.
However, if messages would be a cosmetic problem or a real problem (in case of loading data into the screen), then an exclamation mark does make sense.

I'm not sure, if this all is valid only for Basic, can be that you have to call CAS NOISY when doing a loader in MC to suppress messages.

roudoudou

Quote from: Nworc on 10:02, 06 April 22The disc functions keep quiet in all good cases, to my knowledge. And if there is a problem, it does not help suppressing messages.
However, if messages would be a cosmetic problem or a real problem (in case of loading data into the screen), then an exclamation mark does make sense.

Sure it helps, because you've taken care to intercept error with an ON ERROR GOTO before ;D
Then you do what you want: stop trying to load missing file, display a proper error, ...
My pronouns are RASM and ACE

Nworc


Powered by SMFPacks Menu Editor Mod