quick question. Calling basic commands from batch

Par kirikl

Supporter (6)

Portrait de kirikl

23-12-2021, 22:41

Hi everyone. Quick question. How to call something like: "Basic call music" from bat file?
It calls basic, but then said bad command
I just need to load voices in certain Directory, otherwise call music from ROM is fine.
Thank you!

!login ou Inscrivez-vous pour poster

Par djh1697

Paragon (1696)

Portrait de djh1697

23-12-2021, 22:48

The easy way would to write a small basic program
10 _music
save it as callmusic.bas, then write a batch file
basic callmusic
call the batch file callmusic.bat

Par djh1697

Paragon (1696)

Portrait de djh1697

23-12-2021, 22:48

The easy way would to write a small basic program
10 _music
save it as callmusic.bas, then write a batch file
basic callmusic
call the batch file callmusic.bat

Par mars2000you

Enlighted (6430)

Portrait de mars2000you

23-12-2021, 23:20

'callmusic.bas" is too long (you must respect the 8.3 format), so it must be for example "music.bas", the correct MSX-DOS command would be "BASIC music.bas" (the extension of the file is required) and the batch file would be "music.bat".

Par kirikl

Supporter (6)

Portrait de kirikl

23-12-2021, 23:47

Thanks guys! Now I realized how dumb I am, I don't know how to save bas files...

Par mars2000you

Enlighted (6430)

Portrait de mars2000you

23-12-2021, 23:56

save "music.bas"

More info: https://www.msx.org/wiki/SAVE

Par kirikl

Supporter (6)

Portrait de kirikl

24-12-2021, 06:37

I think I dumb completely, cause I don't understand how to create bas file. If I write call music that's it it runs
I have no problems with MS-DOS bat command line... cause it's pure ASCII, but how to create BAS file.... I'm trying to find info, also I found lots of stuff like it is easy to create BAS file, but how to do BAT file? I have exactly opposite problem Big smile
Again, sorry, I never dealt with basic. Should I start with 10 .. 20... than put SAVE .... ?

Par kirikl

Supporter (6)

Portrait de kirikl

24-12-2021, 06:50

well. I kinda did it!
10 _music - in txt editor on mac... still cheating
worked Smile Last time I opened BAS files... that was machine language... I was kinda wondering.... but now I understand that ASCII version works too! Thanks guys!
now I need just A:\music
pretty simple Smile