Maury Markowitz Posted January 2, 2022 Share Posted January 2, 2022 I was running Bill Wilkinson's looping tests from the September 1982 Insight Atari and noticed something odd. Previously I though that after typing in a program if you did FAST in immediate mode it was the same as doing it in the program. However, when I added a "1 FAST" to the programs, they sped up. So I don't think I completely understand FAST, can someone explain this? Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 2, 2022 Share Posted January 2, 2022 (edited) Overly simplistic way to make the point is that FAST in immediate mode has nothing to do, it's not a switch it is a command. It only operates during program execution otherwise it immediately returns. The command does not act on items that are being worked on and edited. Basic XL and XE handle this differently and XE uses the extended banks. The manual will explain use but not the internal nuts and bolts. Edited January 2, 2022 by _The Doctor__ as = and 1 Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted January 2, 2022 Author Share Posted January 2, 2022 (edited) Huh. Ok that definitely explains it. Looking over the manual and the code, the statement above is not correct. FAST is supposed to work in immediate mode, at least in XE. I will compare XL and XE to see if there's any difference. Edited January 2, 2022 by Maury Markowitz Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 2, 2022 Share Posted January 2, 2022 (edited) It seems you want the same explanation for both the XL and XE version... it isn't the going to be the same explanation... are you looking to make them both act the same and create a homogeneous combined variant? 'The Manual' is slightly different for each. There is more than one manual. Edited January 2, 2022 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted January 2, 2022 Author Share Posted January 2, 2022 Quote it isn't the going to be the same explanation... I cannot see a basis for this statement; looking through the code they appear to work identically. Can you be specific as to exactly what changes were made between these two versions in regard to FAST? Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 2, 2022 Share Posted January 2, 2022 (edited) I think you are being rhetorical. I didn't like the change they made, I somehow missed "the word exactly in the topic' Moving on... I vaguely remember this same conversation either here on AA or in the WIKI at some point. It's a good bet the answers were given either in those or some conversation about the two different cart images when used in an emulator/multi cart. Ultimately I think the consensus was there was little to no reason to have changed it and some other discussion about the extensions disk came into play and took the conversation over. Is there a purpose in mind, perhaps to make a unified version? I didn't realize you wanted to dissect both of them and compare as we were given the one example and asked only about that case. I suspect had the posed question included examples of how it acted in one and then the other I would have understood the question better, so my apologies... Edited January 2, 2022 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted January 2, 2022 Author Share Posted January 2, 2022 10 minutes ago, _The Doctor__ said: I think you are being rhetorical. I didn't like the change they made, I somehow missed "the word exactly in the topic' Moving on... I vaguely remember this same conversation either here on AA or in the WIKI at some point. It's a good bet the answers were given either in those or some conversation about the two different cart images when used in an emulator/multi cart. Ultimately I think the consensus was there was little to no reason to have changed it and some other discussion about the extensions disk came into play and took the conversation over. Is there a purpose in mind, perhaps to make a unified version? I think my OP explains my question quite well. I have no other "purpose in mind" except to understand what is going on. The original claim you made about this happening because it does nothing in immediate mode appears to be incorrect. You then modified your answer to state it was due to differences between XL and XE, but I examined that possibility and see no differences that would explain it. If you don't know, fine, but don't pretend this is me being argumentative. Your answers appear to be wrong, and pointing that out is hardly being "rhetorical". If you have a pointer to the thread you mention, I will be happy to read it, but the only thing search turns up is one I posted some time ago on FAST that is unrelated. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 2, 2022 Share Posted January 2, 2022 (edited) Your jumping on the post before I can word them properly. Please go back and read what I have wrote from the beginning to end and quote what I wrote, not just what you caught as I was editing my information... it sometimes takes a bit for old folks like us to recall and word things in a way that doesn't trigger people. The full answers may come over time. At this point I'd wish not to have entered the conversation. So I apologize again and would like to bid you a good day. I know others will break it down for as they have done for others. But I do suggest a forum search and a stop at the wiki. To be slightly more clear, if elasta search is failing you, try a site search from duck duck, google etc. with terms such as basic xl basic xe immediate mode fast mode extensions basicxl basicxe here are some very helpful links in your quest... In any event I now remember you asking the question before.... de ja vu Any command entered in immediate mode in an Atari BASIC compatible interpreter is actually an edit to the program at a hidden line 32768 which undoes the FAST mode in most of those variants... so that should point you in the correct direction at least. That is somewhat consistent with my other simplistic statement to a degree. In any event, once you do a search your going to find a lot of responses... then we all can have a good/productive conversation about it from with a number of folks I also remember a run down of the actual fast mode at some point now... since we only touched on the immediate mode issue which isn't what you topic asks but is what the question following it asked... that conversation talked about the actual nuts and bolts of the mode itself. Edited January 2, 2022 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 2, 2022 Share Posted January 2, 2022 https://atariwiki.org/wiki/Wiki.jsp?page=Basic XL https://www.atariwiki.org/wiki/Wiki.jsp?page=Basic XE Quote Link to comment Share on other sites More sharing options...
Alfred Posted January 2, 2022 Share Posted January 2, 2022 All FAST does is replace all references to a line number with the address of that line number. So Goto 5000 becomes Goto $7564. While the program is executing when it sees the address it can jump directly to the line rather than search for the line from the beginning of the program which is the default action. The address must be known at the time FAST is executed which is why Goto Someline will not be converted as the value of Someline is unknown at conversion time. I believe some error conditions as well as a few statements will cause FAST processing to terminate. Interestingly enough I remember reading or hearing Wilkinson explain that FAST was proposed and Wilkinson said Sorry, can’t be done in the size we have, so the proposer went home and coded the whole thing up over a weekend and showed Bill how wrong he was. 3 Quote Link to comment Share on other sites More sharing options...
+David_P Posted January 2, 2022 Share Posted January 2, 2022 How many great innovations only exist because someone wanted to show up their boss? 4 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 3, 2022 Share Posted January 3, 2022 14 hours ago, David_P said: How many great innovations only exist because someone wanted to show up their boss? How many people got sacked for the same ? 2 2 Quote Link to comment Share on other sites More sharing options...
Maury Markowitz Posted January 11, 2022 Author Share Posted January 11, 2022 On 1/2/2022 at 4:32 PM, Alfred said: All FAST does is replace all references to a line number with the address of that line number. But it can't just be that, can it? It must store the original line number somewhere. If it doesn't, there would be no way to look up the new address when the BASIC code changes and causes the stored address to change. If the user inserts line 4955, and as a result line GOTO 5000 moves from $7564 to $7578, it has to know the original line number so it can look it up the new address. Failing to store the original number would also mean LIST would have to look up every address to get the line number. I assume it folds the original number and address together? Or has a separate store? Or maybe I completely misunderstand how it works? Quote Link to comment Share on other sites More sharing options...
Alfred Posted January 11, 2022 Share Posted January 11, 2022 (edited) You’d have to look at the cartridge source, but I believe the line number is part of the line. Also, FAST only applies after the program starts running, so you would not be editing lines. As I mentioned several things will cause FAST to abort and revert the source back to its original format. I suspect deleting lines while the program is running with FAST in effect would be one of those scenarios. Yes, that’s all it does is swap line number for address. To undo it, it just looks at that address and sticks that line number back in. That’s why I expect any attempt to alter the program code would cause FAST to abort. Edited January 11, 2022 by Alfred Quote Link to comment Share on other sites More sharing options...
Alfred Posted January 12, 2022 Share Posted January 12, 2022 (edited) Looking at the cartridge source, different commands appear to behave differently. RENUM appears to just be ignored if you try it. LIST and DELETE and I believe any command which takes a range of line numbers will cause FAST to terminate: 015406 ; 015407 ; LRANGE: SET UP REQUIRED LINE RANGE 015408 ; IF FAST MODE, SET SLOW FIRST... 015409 ; A52A 20B8BF 015410 LRANGE JSR @XSLOW3 ;CALL XSLOW, THEN BACK HERE A52D 2070AA 015411 JSR XGS ;SAVE CURRENT LINE VIA GOSUB A530 A000 015412 LDY #0 ;SET TABLE SEARCH LINE NO A532 84DE 015413 STY TSLNUM ;TO ZERO A534 84DF 015414 STY TSLNUM+1 A536 88 015415 DEY A537 84AD 015416 STY LELNUM ;SET LIST END LNO So it does seem that if you try to invoke any command which might change the structure of the program, the first thing the cartridge will do is undo FAST mode if it's in effect. What's interesting is that the DELETE command is part of the extensions disk, which seems odd. If you don't have the disk loaded, you can't delete lines by command, you'd have to overtype the line number I presume. Edited January 12, 2022 by Alfred Quote Link to comment Share on other sites More sharing options...
Alfred Posted January 12, 2022 Share Posted January 12, 2022 Page 32 in the Basic XE manual documents FAST and has a list of commands that terminate FAST mode: ENTER, DEL, EXTEND, LOAD, SAVE, LVAR, RUN, etc. What’s dumb about DEL is that the function to delete a line (DODEL) is actually in the cartridge. It’s only the maybe ten instructions that invoke the function that are in the extensions. Someone got lazy I guess. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.