![]()
I’ve tested compiling and running this puppy on CentOS 6 and 7 with roaring success. You can find it in my fork of the project. #COMMADOR64 EMULATOR MAC HOW TO#helloįrom CBM BASIC :-) Sweet – but I can’t work out how to compile this on macOS…įear not – I’ve got a macOS binary that was compiled on 10.12 “Sierra”. If the file was called “hello”, we’d need to change the permissions again so that the file can be executed: chmod +x. #COMMADOR64 EMULATOR MAC FULL#Running Script FilesĪlternatively, we can specify the full path to cbmbasic at the beginning of a file (she-bang notation) and run it just like any other script file. This will greet us with the “Hello World” message on the command line. To run our file, we can simply define it behind the binary like this: Imagine we had a file called “hello.bas” that we’ve created with vi, looking like this: 10 PRINT "Hello World!" You can write standard BASIC programmes use your favourite text editor (like vi from the command line), or try one from the “test” directory that’s provided with the repository. BAS files (much like shell scripts are stored with the.SH extension, or PHP files would be stored with the. The extension doesn’t matter, but for good practice, let’s store them as. Those files must not be SAVEd from direct mode, but instead are simple clear text files. The real power of this implementation can be seen when we run files from the command line. when launching the binary without parameters). Programmes SAVEd from direct mode cannot be loaded from the command line, only from direct mode (i.e. You can also type in programmes and run them – however the cursor keys won’t work, so there’s no screen editing options. How cool is that? You can reference folders using both LOAD and SAVE just as if you were on the command line. The above displays the directory of the current folder, much like it was an attached floppy drive. For example: LOAD"$"Ġ "/Users/versluis/Desktop/cbmbasic" 00 2A ![]() They work just fine, but will load and save files in Commodore file format (which is not clear text ASCII – more on that later). LOAD and SAVE commands have been tweaked to reference the command line structure. Be careful with certain POKE commands though as those may call system routines that might not be implemented. Other than that, you can start typing like on a real machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |