TheRaven81 Posted May 23, 2020 Share Posted May 23, 2020 The attached program has several lines that break the logical line character limit, and seem to have no way of being shortened. Like this one for example: 80 S2=PEEK(T3+T):N2=(O2+P2=Q2)+(O2+R2=Q2 )+(O2+S2=Q2)+(P2+R2=Q2)+(P2+S2=Q2)+(R2+S 2=Q2)+(O2+P2+R2=Q2)+(O2+P2+S2=Q2)+(O2+R2 +S2=Q2)+(P2+R2+S2=Q2)+(O2+P2+R2+S2=Q2) Typing this whole thing in gives this error after pressing RETURN: 80 ERROR- S2=PEEK(T3+T):N2=(O2+P2=Q2)+ (O2+R2=Q2)+(O2+S2=Q2)+(P2+R2=Q2)+(P2+S2= Q2)+(R2+S2=Q2)+(O2+P2+R2=Q2)+(O2+P2+S2=Q 2)+(O2+R2█ The error breaks the line off at the line limit. but if you can't type a line that long, then there is something I'm missing here. cribbage.bas Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 23, 2020 Share Posted May 23, 2020 Have you tried POKE 82,0 before starting? Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 23, 2020 Author Share Posted May 23, 2020 (edited) yeah, I did, but giving it those 2 extra on each line only amounts to 6 or 8 extra spots, and that's not much when the line is over 4 full rows long without doing it. EDIT: I was reading Mapping The Atari , and found the BUFCNT address: Quote 107 6B BUFCNT Buffer count: the screen editor current logical line size counter. Is there another address that keeps track of the max value for the buffer(120), so that maybe this can be manipulated with a POKE and the line can max out at 255 instead? Edited May 23, 2020 by TheRaven81 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 23, 2020 Share Posted May 23, 2020 (edited) Yes: I counted 161 characters including carriage return. Puzzling. Edited May 23, 2020 by flashjazzcat Quote Link to comment Share on other sites More sharing options...
drac030 Posted May 23, 2020 Share Posted May 23, 2020 BASIC editor in 80-column mode, probably. Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 23, 2020 Author Share Posted May 23, 2020 I was thinking about abbreviating PEEK too, but I could not find out how. Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 23, 2020 Author Share Posted May 23, 2020 2 minutes ago, drac030 said: BASIC editor in 80-column mode, probably. I don't see how that would help with the logical line limit though? Quote Link to comment Share on other sites More sharing options...
drac030 Posted May 23, 2020 Share Posted May 23, 2020 The logical line limit is not counted in characters, but rather in lines: three lines 80 chars each is 240 characters. This line actually fits in 160: 1 Quote Link to comment Share on other sites More sharing options...
evilmoo Posted May 23, 2020 Share Posted May 23, 2020 Can you "ENTER" it from a file? Quote Link to comment Share on other sites More sharing options...
drac030 Posted May 23, 2020 Share Posted May 23, 2020 2 Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 23, 2020 Author Share Posted May 23, 2020 2 minutes ago, evilmoo said: Can you "ENTER" it from a file? I don't know how I would make said file. 5 minutes ago, drac030 said: The logical line limit is not counted in characters, but rather in lines: three lines 80 chars each is 240 characters. This line actually fits in 160: ahh I see. Well, I don't have an 80 column editor, I'd have to look into how to get one. Quote Link to comment Share on other sites More sharing options...
evilmoo Posted May 23, 2020 Share Posted May 23, 2020 1 minute ago, TheRaven81 said: I don't know how I would make said file. 10 OPEN #1,8,0,"D:LONG.TXT" 20 PRINT #1;"80 S2=PEEK(T3+T):N2=(O2+P2=Q2)+(O2+R2=Q2"; 30 PRINT #1;")+(O2+S2=Q2)+(P2+R2=Q2)+(P2+S2=Q2)+(R2+S"; 40 PRINT #1;"2=Q2)+(O2+P2+R2=Q2)+(O2+P2+S2=Q2)+(O2+R2"; 50 PRINT #1;"+S2=Q2)+(P2+R2+S2=Q2)+(O2+P2+R2+S2=Q2)" 60 CLOSE #1 ENTER "D:LONG.TXT" Like this, possibly? 1 Quote Link to comment Share on other sites More sharing options...
+David_P Posted May 23, 2020 Share Posted May 23, 2020 47 minutes ago, TheRaven81 said: Well, I don't have an 80 column editor, I'd have to look into how to get one. If you have SpartaDos X, type CON80 ON Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 23, 2020 Author Share Posted May 23, 2020 (edited) 1 hour ago, evilmoo said: 10 OPEN #1,8,0,"D:LONG.TXT" 20 PRINT #1;"80 S2=PEEK(T3+T):N2=(O2+P2=Q2)+(O2+R2=Q2"; 30 PRINT #1;")+(O2+S2=Q2)+(P2+R2=Q2)+(P2+S2=Q2)+(R2+S"; 40 PRINT #1;"2=Q2)+(O2+P2+R2=Q2)+(O2+P2+S2=Q2)+(O2+R2"; 50 PRINT #1;"+S2=Q2)+(P2+R2+S2=Q2)+(O2+P2+R2+S2=Q2)" 60 CLOSE #1 ENTER "D:LONG.TXT" Like this, possibly? So I entered that into Altirra to test it out, and it worked So I'll have to do this for each line that is too long, I guess? or is there a way to do multiple lines in a single file? TBH I'm not sure how many lines in the program are like this. 26 minutes ago, David_P said: If you have SpartaDos X, type CON80 ON I don't. I only have DOS 2.5, and DOS 3. Edited May 23, 2020 by TheRaven81 Quote Link to comment Share on other sites More sharing options...
evilmoo Posted May 23, 2020 Share Posted May 23, 2020 13 minutes ago, TheRaven81 said: So I entered that into Altirra to test it out, and it worked So I'll have to do this for each line that is too long, I guess? or is there a way to do multiple lines in a single file? TBH I'm not sure how many lines in the program are like this. I'm glad it worked. That's the least worst solution I can come up with on short notice. Quote Link to comment Share on other sites More sharing options...
Graham Dearsley Posted May 23, 2020 Share Posted May 23, 2020 I may well be being dumb here but what does N2=(O2+P2=Q2) give you ? Looks like it will be a logical 1 or 0 ? Quote Link to comment Share on other sites More sharing options...
Graham Dearsley Posted May 23, 2020 Share Posted May 23, 2020 What ever the logic I think you can split the PEEK off onto a different line ? Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 23, 2020 Share Posted May 23, 2020 Hi! 6 hours ago, TheRaven81 said: The attached program has several lines that break the logical line character limit, and seem to have no way of being shortened. Like this one for example: 80 S2=PEEK(T3+T):N2=(O2+P2=Q2)+(O2+R2=Q2 )+(O2+S2=Q2)+(P2+R2=Q2)+(P2+S2=Q2)+(R2+S 2=Q2)+(O2+P2+R2=Q2)+(O2+P2+S2=Q2)+(O2+R2 +S2=Q2)+(P2+R2+S2=Q2)+(O2+P2+R2+S2=Q2) Typing this whole thing in gives this error after pressing RETURN: 80 ERROR- S2=PEEK(T3+T):N2=(O2+P2=Q2)+ (O2+R2=Q2)+(O2+S2=Q2)+(P2+R2=Q2)+(P2+S2= Q2)+(R2+S2=Q2)+(O2+P2+R2=Q2)+(O2+P2+S2=Q 2)+(O2+R2█ The error breaks the line off at the line limit. but if you can't type a line that long, then there is something I'm missing here. cribbage.bas 23.09 kB · 1 download The problem is that you are not typing the original program, you are typing some "reconstruction" of the original, with larger variable names. This is the same, but typeable in the normal Atari: Have Fun! cribbage.bas cribbage.lst 2 Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 24, 2020 Author Share Posted May 24, 2020 6 hours ago, dmsc said: Hi! The problem is that you are not typing the original program, you are typing some "reconstruction" of the original, with larger variable names. This is the same, but typeable in the normal Atari: Have Fun! cribbage.bas 22.96 kB · 1 download cribbage.lst 22.3 kB · 1 download Where/how did you get this? Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 24, 2020 Share Posted May 24, 2020 Hi! 41 minutes ago, TheRaven81 said: Where/how did you get this? I sued this tool to convert the BAS to a listing file "cribbage.list": Then, I used my basic parser tool https://github.com/dmsc/tbxl-parser to generate a short listing, using basciParser -A cribbage.list -o short.lst Have Fun! Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted May 24, 2020 Share Posted May 24, 2020 (edited) Atari Program Exchange Repository, APX, easy search... on the internet... archive.org .... etc etc etc... for example.... https://archive.org/search.php?query=atari cribbage yeah some different cribbage and books et al.... Edited May 24, 2020 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 24, 2020 Share Posted May 24, 2020 Bad practice to do Basic programs intended as type-ins that exceed the 120 characters. But as discussed in threads relating to the 10-liner comp it can be good practice. Basic imposes a 256 limit on an overall line size entered for incorporation to a program -can be met by using a different device such as "D:" It also imposes a 255 byte limit (?) on actual line length once tokenized (rarely would you come near that) 2 relatively painless workarounds: - split the line into 2, though for a type-in relies on the program having left unused numbers. - type the line into a text editor then ENTER it from an emulated H: device using Atascii translation. Quote Link to comment Share on other sites More sharing options...
billkendrick Posted May 24, 2020 Share Posted May 24, 2020 12 hours ago, evilmoo said: Can you "ENTER" it from a file? This exactly the magic trick some of us used to create complicated BASIC 10-Liner contest entries. They ended up create an "EXTREM" category for such limit-busting submissions. 1 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted May 24, 2020 Share Posted May 24, 2020 11 hours ago, dmsc said: The problem is that you are not typing the original program, you are typing some "reconstruction" of the original, with larger variable names. @TheRaven81: The APX release does have a protection against LISTing. The BASIC variable name table has been destroyed. Version 2.0 of CRIBBAGE.BAS which can be found on ANTIC's release does not have this kind of protection. I uploaded the ATR to your other Cribbage-related thread. The program looks a lot different, but I believe that these lines are at least similar to what you are looking at: As you can see, there all variable names are only one character long (beside the fact that the line has been broken into several lines). CRIBBAGE.BAS Quote Link to comment Share on other sites More sharing options...
TheRaven81 Posted May 24, 2020 Author Share Posted May 24, 2020 39 minutes ago, DjayBee said: I uploaded the ATR to your other Cribbage-related thread. Where would that be? I don't recall making another thread... 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.