Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CMM2: Any chance of restoring the behaviour of the FILES command?
Page 1 of 2 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
Hi folks, I hate to be one of those people but is there a good reason that the FILES command has been changed to launch the File Manager? Wouldn't it have been more backward compatible to keep the behaviour of the CMM1 and instead add a new FILEM command? If you aren't persuaded then could we at least have something less klunky than LIST FILES as the replacement, how about LS or DIR. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
.. or if you want to be retro then CAT (Catalogue), though for that real BBC Micro feel should be *CAT. Tom Edited 2020-05-21 09:55 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
If you use LIST FILES regularly then just program it to F11 or F12 option f12 "LIST FILES "+chr$(34)+chr$(34)+chr$(&H82) Will type the command and position the cursor between the pair of double quotes ready for your selection criteria |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
Alas it's not the same and we only have two programmable function keys to play with. Something that would alleviate this problem and add considerably more usability is if an unknown command is typed in immediate mode, e.g. > foo a b c Then the interpreter should look for a file called "foo.bas" in the current directory and if present RUN it with the given MM.CMDLINE$ - I think the CMM1 was already doing something similar to this, the CMM2 is in this respect less friendly/forgiving as you have to RUN explicitly and all filenames have to be quoted. If not present in the current working directory it should look for a file called "foo.bas" in a designated root directory, e.g. "A:/.LIB" and RUN it instead. This allows you to keep a set of utility programs in "A:/.LIB" and have easy access to them (The BBC Micro ADFS had something similar, for unknown commands preceded by *). Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
This has been discussed and is an absolute NO. It is catastrophically inefficient and confuses misstypes with intention The basic concept of the CMM2 is fixed and won't change. It is not a CMM1, it is not a BBC Micro or anything else. Bugs will be fixed but the concept won't change - sorry. This topic was originally about whether you need to type LIST FILES rather than FILES - hardly a big deal and I have given you an even faster way of doing it with a function key if required The reason to use the FILES command for the filemanager was specifically to get CMM1 and Micromite users to understand and use the greatly enhance functionality offered by the filemanager |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
Fair enough. Like I've said bugs not withstanding I'm delighted with it. If the only reason was to avoid inefficiency and misstypes then you could just require the command to be prefixed by *, the following: *SORT list.txt is surely preferable to: RUN "A:/TOOLS/SORT.BAS" list.txt Any offence was unintentional, Tom Edited 2020-05-21 21:09 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
I have to agree with Peter on this one - that is a very dodgy idea, and: It isn't BASIC Let's not lose sight of what the CMM2 is all about. I think you are confusing the command prompt with a DOS prompt... you are a layer or two above that and BASIC needs to be told explicitly what to do with what and not start second-guessing your intentions otherwise all typos become actionable events. Personally I like this aspect a lot, it's what makes the language so easy to understand and not cryptic like some others (I'm looking at you C) I doubt any was taken Edited 2020-05-21 23:33 by CaptainBoing |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
I'm becoming concerned that my signature may become counter-productive Edited 2020-05-22 01:27 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
Hi CaptainBoing, As to your first point, I have already conceded that and suggested that such behaviour only occurs when the command is prefixed with an asterix. As to your second point. You can't really say that something "isn't BASIC" since it doesn't have a widely accepted standard, and what standards there are are honored more in the breach. e.g. most BASIC's have LOAD and SAVE commands (CMM2 doesn't), most BASIC's don't have FILES, EDIT, or the host of specialised hardware control commands of MMBasic. I don't believe I am. I am suggesting functionality available in at least one '80s BASIC centered computer ... the one widely regarded to have the best BASIC implementation (ever) and probably the most easily accessible hardware interfaces ... until Geoff published the CMM. I believe it is also worth noting that whilst the '80s computer might be the inspiration that (even disregarding the hardware interfaces) what has been delivered is rather different. In interpreted BASIC it is as fast as a 16-bit 90's computer with the RAM and storage of a 2000's/2010's computer. Harnessing that capability requires extensions to the BASIC of the past; the file manager and editor are already a start on this (though the BBC Master already had them ) What is more you want programmers to harness this power ... or at least I assume you do? Programmers are going to create the games and utilities* that are going to distract you from doing any "real work" in your shed and they are going to buy the hardware "toys" that you produce when not distracted. * To be honest I think I'm living in cloud cuckoo land, unless Geoff and the boys have some masterplan I don't think publishing in Silicon Chip and {E}PE is going to launch some grand CMM2 based home-computing revolution ... which is a pity, you should see the dross that current academic Software Engineering programs are spitting out, they're almost entirely useless. I beg to differ. For the computers that are professed to be the CMM2's inspiration then BASIC is the {D}OS in most cases it doesn't sit on top of it (there is some wriggle room for debate). Note that even MS-DOS has its own programming language; batch files. C isn't cryptic, it is terse . Bear in mind it was designed as a system/hardware level programming language for implementing the UNIX system (I may be mixing up my egg and chicken here) and as such it is just as powerful, but not as "cryptic" as what it was intended to replace, i.e. assembly language. It also has the benefit of being portable instead of requiring you to learn a different assembly syntax for each processor. The fact that it is also became used for application programming might be considered unfortunate. Anyway, back to the point. Can we please have a hook allowing us to extend the MMBasic ecosystem on the CMM2 with utilities written in BASIC, so that if/when someone writes a spiffy GUI (and the CMM2 certainly has the power) we are launching it with something easy to type like: *GEM and not: RUN "A:/APPLICATIONS/GEM.BAS" Best wishes, Tom Edited 2020-05-22 02:25 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3496 |
I do understand the featureset for the cmm2 basic is Frozen. Appart from the Desire to have bbc basic efficiency Tom has a point with the list files command Being incorrect. List shows the program List xxx historically shows part of the program. Logical would be to have list thissub to show the sub. Files could remain as in cmm1 FileM cold start the file manager. Again, features are frozen, but the proposal is sound. Edited 2020-05-22 06:27 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
From the MMBasic introduction in the MicroMite manual: "MMBasic is a Microsoft BASIC compatible implementation of the BASIC language with floating point, integer and string variables, arrays, long variable names, a built in program editor and many other features." ... and I am out. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1591 |
I have to agree with Tom on the FILES command. Refer to This. The new version of the FILES command in not compatible with GWBASIC let alone the original CMM. I imagine that it was discussed by the development team but I honestly think that the FILES command should remain as was and a different command name chosen for the file manager. I'm not so sure about the rest of his suggestions though. Bill Keep safe. Live long and prosper. |
||||
Raul Newbie Joined: 06/05/2020 Location: United KingdomPosts: 11 |
Flame suit on. Dinosaurs disappeared off the face of the earth long time ago due to lack of adaptation. |
||||
KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1345 |
You shouldn't find a need for a flame suit on this forum, unlike the majority of forums these days, mean spirited personal comments or verbal abuse usually sees the user get banned or at least given a first / final warning Most of us here try to debate in a semi intelligent adult fashion it's one of the reasons the forum has a good helpful following, lets hope this never changes. Mike. Edited 2020-05-22 14:25 by KeepIS It's all too hard. Mike. |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
As do I. LIST FILES is odd - I completely agree with that. With 80s BASICS (and certainly MBasic, Basica, GWBasic - Microsoft flavours that MMBasic tends to adhere-to), it was always FILES. Others used CAT, DIR etc. (or the ridiculous method on the C64). What I balked at is the "if I don't know what the word is I'll look on disc" thing. There is probably only a handful of BASICs that have something approaching this (out of hundreds) and only one 80s style that came close (at a stretch). If you have a loaded disc it could take ages to get your prompt back after a typo as the thing searches for a match. My comment about confusion with the DOS prompt even bore fruit when the poster referred batch files - precisely my point - BASIC it ain't. Also, RUN "<whatever>" is *very* standard in 80s/90s flavours, even in non MS. Some dialects went further with CHAIN, MERGE and the inspired, memory-overlay-ability of CHAIN MERGE (Thank you Mallard BASIC and for your JetSam keyed access files). It is what it is. Reasons will have dictated why things are the way they are. And yeah, C is cryptic, this actually compiles: B,i,y,u,b,I[411],*G=I,x=10,z=15,M=1e4;X(w,c,h,e,S,s){int t,o,L,E,d,O=e,N=-M*M,K =78-h<<x,p,*g,n,*m,A,q,r,C,J,a=y?-x:x;y^=8;G++;d=w||s&&s>=h&&v 0,0)>M;do{_ o=I[ p=O]){q=o&z^y _ q<7){A=q--&2?8:4;C=o-9&z?q["& .$ "]:42;do{r=I[p+=C[l]-64]_!w|p ==w){g=q|p+a-S?0:I+S _!r&(q|A<3||g)||(r+1&z^y)>9&&q|A>2){_ m=!(r-2&7))P G[1]=O, K;J=n=o&z;E=I[p-a]&z;t=q|E-7?n:(n+=2,6^y);Z n<=t){L=r?l[r&7]*9-189-h-q:0 _ s)L +=(1-q?l[p/x+5]-l[O/x+5]+l[p%x+6]*-~!q-l[O%x+6]+o/16*8:!!m*9)+(q?0:!(I[p-1]^n)+ !(I[p+1]^n)+l[n&7]*9-386+!!g*99+(A<2))+!(E^y^9)_ s>h||1<s&s==h&&L>z|d){p=n,O =m?*g=*m,*m=0:g?*g=0:0;L-=X(s>h|d?0:p,L-N,h+1,G[1],J=q|A>1?0:p,s)_!(h||s-1|B -O|i-n|p-b|L<-M))P y^=8,u=J;J=q-1|A<7||m||!s|d|r|o<z||v 0,0)>M;O=o;p=r;m? *m=*g,*g=0:g?*g=9^y:0;}_ L>N){*G=O _ s>1){_ h&&c-L<0)P L _!h)i=n,B=O,b=p;}N=L;} n+=J||(g=I+p,m=p<O?g-3:g+2,*m<z|m[O-p]||I[p+=p-O]);}}}}Z!r&q>2||(p=O,q|A>2|o>z& !r&&++C*--A));}}}Z++O>98?O=20:e-O);P N+M*M&&N>-K+1924|d?N:0;}main(){Z++B<121)*G ++=B/x%x<2|B%x<2?7:B/x&4?0:*l++&31;Z B=19){Z B++<99)putchar(B%x?l[B|16]:x)_ x-(B=F)){i=I[B+=(x-F)*x]&z;b=F;b+=(x-F)*x;Z x-(*G=F))i=*G^8^y;}else v u,5);v u, 1);}} Don't look like any assembler I ever saw. Edited 2020-05-22 18:24 by CaptainBoing |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9051 |
@ "O Captain, My Captain" - That sure is gobble-de-gook. And I thought C was bad enough when STRUCTURED! Welcome to the forums. The problem with that statement, is that you then find yourself in a 'Design by committee' situation, and then no matter WHAT you suggest, others will disagree, and then the project stalls as there is no way forward. When it comes to something like this(CMM2), the standard is FIXED. It is what it is. If the development team started trying to implement every other feature that any other member wanted, the project would NEVER be finished, as there would ALWAYS be something that someone else was not happy about, and then things NEVER get done. I hear what you are saying, but sorry - the CMM2 is what the CMM2 is.(for now) Smoke makes things work. When the smoke gets out, it stops! |
||||
Poppy Guru Joined: 25/07/2019 Location: GermanyPosts: 486 |
My full support! more like already semi professional but fully adult (OK, no XXX stuff meant ), so mature and grown up -> focused! The only board I follow (yes, sorry guys ) just because of this quality shown by the content and the unique non-aggressive characters producing it! Andre ... such a GURU? | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3831 |
Me again, I swear to God that I had decided to retire from the fray, cross my fingers and hope that the CMM2 firmware became available for me to enhance at home so as to improve my experience and productivity (but not distribute, I have no desire to fracture what is unfortunately likely to be a fairly small user base). All I want to do is hang out with my new friends who are wise in the ways of flashing LEDs and provide them with software toys to amuse themselves in their sheds ... ... and then the Captain re-entered the fray I respect the decisions of the Grognard design committee and their right to say "it is what it is", and I have said several times how pleased I am with this gift that they have given us. However (a) at my instigation Peter has already made one change to the POLYGON command that was not a bug-fix, and (b) it is in the nature of published works to attract critique. Note that I was up beyond midnight looking for and reporting bugs in the file editor hopefully to the benefit of all. Sounds like we've agreed to agree . As a reminder the C64 method was for the user to LOAD the catlog into memory and then LIST it, i.e.: LOAD "$", 8 LIST Bizarre I agree, but probably driven by resource limitations or the strange nature of the C64's disk drive; I believe it contained its own separate 6502 processor! Note that you only really need this ability at all once you move beyond tape storage, hence it really forms part of the "File/Operating System". OK, I'd already moved beyond this and suggested the * prefix. The only reason I did not do so in my original proposal is that I was harking back to the behaviour of the CMM "Classic". Also note I was never proposing searching the entire SD, just the current working directory and one fixed location, e.g. "A:/.LIB" in which tools and utilities could be "installed". As I tried to say before, there is no Microsoft BASIC standard, there isn't even a product called Microsoft BASIC. What some people refer to as "Microsoft BASIC" is a collection of mostly compatible languages ultimately decended from "Dartmouth BASIC" (John G. Kemény & Thomas E. Kurtz) by way of "Altair BASIC" (Bill Gates & Paul Allen). One of the most common differences between BASICs is how they address the file system and as storage has become larger and faster the requirements have changed. If all you have is a tape then you just need LOAD and SAVE, and you don't even really need to be able to provide a filename in most circumstances. If you have a disk with hierarchical directories your requirements suddenly become much greater. And if storage is LARGE and FAST then doing the thing that I have proposed makes sense. The CMM "Classic" has CHAIN and LOAD. CHAIN has usefully different semantics in that it maintains "the current state of the program (ie, the value of variables, open files, loaded fonts, open COM ports, etc)." It is not so important now that we have much more memory to play with but I will miss LOAD and SAVE. If you had an assembler that allowed more than one opcode per line then you could write exactly that sort of rubbish. Just like I can wire up a circuit carefully or I can make a complete rat's nest. The example you present is from an Obfuscated C Contest ... looks like exactly the one on the Wikipedia page. If it would be helpful I'm sure I can write some BASIC that is just as impenetrable . Best wishes, Tom Edited 2020-05-22 20:01 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1591 |
I am disappointed with that inflexible attitude. You are willing to accept that there may be errors in the documentation and bugs in the firmware but the standard is FIXED and no correspondence will be entered into. I would have thought that the FILES and LIST FILES commands would have been given some consideration given the posts above. I have to rely on the experiences of people like Tom that have been able to obtain the CMM2 so early. I'll have to wait until I get my CMM2, but by then the SC articles will have published and the concrete around the "standard" will have fossilised anyway. I'M out. Bill Keep safe. Live long and prosper. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
My words related to the concept of non keyword commands looking for matching disk files. As stated above we want to use the command FILES precisely to get people using the filemanager. LIST FILES has more functionality than the CMM FILES command as it allows you to set the listing order - shall I remove that for compatibility? As a compromise I could "rename" LIST FILES as LS but would anyone be happy with that ? DIR can't be used as it is already part of the reserved word list. Thus far no-one has talked about the inclusion of INCLUDE files. These are one of the most important capabilities of the CMM2 for developing large programs and facilitating reusable code. When you type RUN, the CMM2 will automatically scan INCLUDE files for changes and incorporate them in the running image. This allows you to build a library of functions, e.g. a BME280 I/F routine, and INCLUDE them as and when required in any given program. The CMM2 manages all this for you |
||||
Page 1 of 2 |
Print this page |