Jump to content
IGNORED

tape based type-in spreadsheet basic program for Atari 600XL or 800XL


newTIboyRob

Recommended Posts

Yes, I saw that too, Doc, which is why I got excited when the ready-to go program was found and kindly posted for me on this thread, (not the Apple translation program from the other thread that I put on the side while I tried this one first) The one posted here hopefully had no translation issues. So now.... (drum roll please)....  the results: 

  • hours and hours of typing
  • learning to enter control codes within the actual typing of a program (never did that before) and getting massively confused because I glanced over, missed, thus didn't absorb, some of the Doc's "remedies."   Errrrrr
  • learning the many idiosyncrasies of the Atari basic language   (never did any programming of this length and complexity even BITD in multiple platform basics)
  • Finished typing... the computer brought back only errors at the time of typing, all of which I figured out, and proceeded to finish all which I thought had no remaining errors as I went along because it was  being "quiet."
  • Worked out all the "some-of these-lines-are-too-long" problems by first finding a usable separation point and by then using subsequent available line numbers 
  • After finished typing, first, before a run of the program, a successful CSAVE to fresh Maxell tape, top of Side A, past where the leader is (tape was visible at the pinch roller past the heads..so data went to tape, not leader)
  • Kept this tape as main, and then, made 2 more safety copy back up spares, one on each of 2 fresh tapes  

Now... we RUN... and....  we get... only a black screen with a blinking white cursor moving vertically and in a loop upwards from about position 0,3 upwards to 0,2 and partnered with an endless loop of that awesome (ha!) buzzer sound.  YAY!

 

Totally discouraging... so now the troubleshooting begins:

A  BREAK reveals  STOPPED AT LINE 399.  Another BREAK reveals STOPPED AT LINE 398...  so it did make it that far into the program, just to about the last 1/2 page of the total listed program code or so.

 

Went back and checked those two lines for errors... they were spot on

 

So now, seeing as it's the wee small hours, (and I am more than spent from today's escapade), all I can do tomorrow is return and start the line-by-line debugging process I suppose....  

In the mean time, any thoughts as to what may have gone awry in the the program, seeing these specific error attributes I mentioned above?  Maybe the specific traits I mentioned give a clue as to why she won't run and I can zone in on those lines first before continuing?

 

...  If no thoughts there... is it the just the usual double, even triple, line by line checking process as the next step for me?

P.S. Doc, thanks once again for your guidance with the Control codes, and sorry I wasn't getting all of it, but now you, and the world, can see why... sometimes ya just miss something!

 

 

 

Edited by newTIboyRob
Link to comment
Share on other sites

It runs on 16K 600xl.

One page 4 col by 18

calculates numbers by cells just fine

it could be condensed further to make more room, but it appears to be disk based

though it loads from cassette, more changes need to be made for cassette compatibility on saves and loads of DATA

the idea is less lines not more to get information to fit

remember poke 82,0 may get 6 more chars per basic line.

each line handling just one more operation / item makes a world of difference

I did not have any lines that were too long to parse. try abbreviation when typing lines in.

Edited by _The Doctor__
Link to comment
Share on other sites

Not sure if you've sorted out the arrow symbols, it's easy to put them into strings, however, you can't display them directly

as the normal output is through the screen editor "E:" so the symbols are interpreted as cursor movements.

 

However, if you open the screen device "S:" it will display the arrows, try this simple program, when it stops, you will not see anything

on screen, type CONT <RETURN>

and you will see the arrows displayed, note I'm using both screen editor and screen devices

 

5 OPEN #1,8,0,"S:":OPEN #2,12,0,"E:"
10 DIM A$(10)
20 A$="    " : REM put the arrow keys in here ESC <ARROW> for each one
30 ? A$
40 ? "NOTHING SEEN HERE"
55 POSITION 3,10:? #2;"ARROWS-> ";
60 POSITION 12,10:? #1;A$;
70 CLOSE #1:CLOSE #2

Edited by TGB1718
Link to comment
Share on other sites

Doc, I was under the impression that this program was already geared towards cassette, as I see C :  references throughout. As for the POKE, I understand, but if I parsed the code to the next lines, I don't see why that too wouldn't work.

 

I was first just hoping to see a screen and that it works, and then could come back to free it up more for cassette compatibility. (At least I got it to save, and yes, it did load back in and tried to run). It's less of a big job in that department, as compared to the Apple program conversion program, but still, this program I guess was really not just ready to go right out of the box.  Perhaps I actually better double check for errors in my program listing? That will take quite a bit of time as well. I can not believe how hard both programs have been, what a challenge, but what a nightmare to finally find one that does fit within the 16k confine, but doesn't work now!

 

TGB, not sure how your program fits with just how I can troubleshoot mine exactly. I did type yours and was thinking that you meant to put the Esc Cntrl arrow keys within the A$ in line 20?  When I did that the resulting screen output:

 

NOTHING SEEN HERE

 

 

 

ARROWS->  (all 4 arrow symbols)

READY

 

and If I just pressed ESC and arrow, those were the -=+*     (regular keys)

 

 

But what to make of the flashing cursor and blank screen but no initial page and no error message?  Some kind of error in the code I typed then?  Can a program come back without any error messages like that but still not run properly?

 

 

 

Link to comment
Share on other sites

he is showing you that esc control arrow won't show from within a string printed to E:

but can be shown thru S:

the esc esc esc arrow method works but you are seeing how it is done behind the scenes if you fill in the blanks as he tells you in the rem statements

 

Link to comment
Share on other sites

All I think I can do at this point, unless there are some other suggestions, is go back and doublecheck the program code, line by line, to see if there are any typos. The only other thing I can think of is if I somehow didn't do all those arrow codes right, but when I last retyped those lines, doing what you said Doc, I saw all the correct symbols within the line, e.g. in the last program line for the inverse up arrow in the code, I did:

ESC, CNTRL HELD, 2     (didn't hear the buzzer, but did see the inverse bent arrow print)   and for the non inverse regular upwards bent arrow, did ESC, CNTRL HELD, CLEAR button... did the CNTRL R and left arrow when the program called for it, and for the Escape arrow keys in line 162, did ESC up arrow, ESC down arrow, etc... and that Escape symbol did print in the line as well as the corresponding arrow key.

 

In short... unless I goofed somewhere with those above "special codes".... with my program not running correctly despite no error messages, wouldn't the trouble lie in other potential typos throughout the program then?             

Edited by newTIboyRob
Link to comment
Share on other sites

I verified the program and it works, but had to choose the smallest row and column selection for 16k, anything larger and the program will wipe itself out due to lack of memory, as stated it displays properly and when you make an error the buzzer sounds etc.

You would not have heard the buzzer typing it in, you will here it when the program goes to lines that normally mean a mistake was made in your data entry etc.

The program itself needs a little work to make it more robust against mistakes but error trapping etc would consume more memory.

It works well enough, and like I said, could be condensed and made to work better with cassette storage. Another move could be made to convert parts of it to ML.

The exercise was a success for the most part.

If you are still having issues, it will come down to a typo (or typos). The special codes being wrong would just mess up the display but not the function of the program for the most part. If it's displaying properly then the error is elsewhere.

You can compare the work you have done against the .CAS file by loading up atirra and mounting the .cas file

and then do either a CLOAD in BASIC (or LOAD "C:") then LIST it (CTRL held 1) to stop and start the listing as it scrolls or just listing each section you wish to compare.

worst comes to worst screen shots of your listing would allow others to see what you have done.

 

after thought, when every byte counts you can remove parts that are aesthetic only like, changing the screen color to black and white etc. Just leave it Atari Blue etc.

 

as stated I filled in random data and performed operations using cell notation, it worked just fine.

Edited by _The Doctor__
Link to comment
Share on other sites

 

 

So if it's working with your test method, albeit with shrunken, entry level kind of dimensions, I must have typo/s in there, perhaps in the grid set up dimensions numbers, as all I see is just an empty black screen with no grid set up.  Since it's not displaying properly/even at all, the error may possible be early on. By the way, and I hope you know this by now, but I really appreciate and thank you, and all, for all your guidance with this. Also thank you for verifying that the program does in fact work.

 

Good to know that I wouldn't hear the buzzer sound when I was typing, (I wondered about that) but as you say, in a finished working program like you see on your end, the buzzer will sound if there is a data entry mistake made in the actual working program you were testing. If the special codes being wrong would just mess up the display but not the function of the program, then I can put those aside in my mind for the time being. Those to me were the hardest part, and ironically, are not the issues keeping this thing from working!

But from what I answered before, it sounds like I got the Escape codes finally correct.

 

You say the program itself needs a little work to make it more robust against mistakes but error trapping would consume more memory. Granted. However, I can't even get it to work at all in the first place, so getting it up and running, to me, is step 1.  Condensing and tightening it to gear it to working better with cassette in my mind comes next.  I hope to avoid the ML route altogether. 

 

I will avoid Altirra for the time being. After I recheck all the code manually, I liked your idea of taking screen shots to show how and where I parsed it, should I not find any typos. I believe only an even dozen lines were parsed, and what I believed were at suitable/proper junctions.   

 

Though I have learned a lot along the way, I will feel like the exercise was a success if I can get it to work. That was the ultimate goal so I could finally put all this to bed, but not yet achieved.

So I will, as the day progresses here, try to check the code and I'll report back if and when I learn anything new.

 

Thanks again!

 

 

 

Link to comment
Share on other sites

I used a real Atari, and then compared with .CAS in Altirra using Altirra BASIC configured to use 16K only just like the 600XL

I had to go to the real deal (the woman was not happy as I had next to no sleep) like I said, so I could type it in, make corrections and do the codes. As soon as I sat down in front of the Atari I was able to respond to most of your queries.

I did have to zoom in on the over-saturated fujinet generated pdf to see it was double thickness line indicating it was control R instead of a dash or minus sign, which turned out to be correct as I looked at the .CAS file. Even though I was sure, when you mentioned it, I made triple sure.

I made it a type in, comparison, help desk night with IRC session on the other Atari using a fujinet. So basically Type in correct, answer your queries as they cam and type to folks on IRC at the same time. Had a cup of tea and television on low, with a bit of youtube thrown in.

Edited by _The Doctor__
Link to comment
Share on other sites

The only way to make sure it was genuine. The listings in magazines sometimes have errors that need to be corrected or have fixes in a later issue etc.

Saving the work was crucial as the code did wipe itself out when the matrix was too big to fit because it over wrote itself as expected.

The program did suggest less cells for lesser memory and more cells for larger memory, removing that part of the program would leave more for your spreadsheet data.

It is a case of less is more for such a small footprint, a 16K only version can have the max and min column / row sizes simply pre-calculated by you and stated saving memory

Edited by _The Doctor__
Link to comment
Share on other sites

Just wanted to give an update:

 

As I mentioned, I had my doubts about the first few lines of code, and turns out that that was part of the problem, and I know exactly what happened. It was that I had typed those lines in before knowing about the POKE concept, to extend lines while typing.  So when I got to near the line's end and it buzzed, I had cut the line, but neglected to carry over the remaining few bits of data at the end the line. Thus, a couple of numbers were missing. Luckily I found it by line 6.... and... I got the program to finally RUN. So I stopped any further code checking here.

 

It loaded the introduction page first ok, and the main layout sheet looks beautifully organized and professional. So Doc, I thought that since you said yours works I just to make sure it does completely.  I was thinking it's likely you saved your work and we could compare notes here:

 

 

First and formoest, My arrow keys didn't work, so I wasn't able to navigate anywhere around the screen, not even to adjacent cells. Not good.

I couldn't see where to do any calculations, just recalculating. This basically relisted the info on the sheet, but where and how did you do simple  +-*/ math functions?  A spreadsheet MUST be able to do math!

I assume replicate just meant "copy" as we know it for cells... but it didn't do that either

I was able to save to tape ok... a)  but ... it wouldn't load back in, and I got the error message in lines 326-8  on my screen

*=(I did learn prior that to enter text, you just start with a quotation mark, say a person's name. That function as well as entering other numbers and columns worked perfectly._

 

So can you do me a favor please and just recheck your program and tell me if your program can do all of the following. (My thought is that if yours can perform all of these, that I would then in fact have to go back over and review all that code for any omissions and/or code errors:)

 

  • has arrow keys that work
  • can do any math calculations
  • can do any recalculations
  • replicate cells
  • save and load from tape using the at the  C : prompt    My thought here is about being too close or over the threshold, even in the minimum 4x18, so maybe I would have to find the more 'fancy' spots to cut corners, as I had imagined. Maybe we could pin point a few spots.

So all in all... there still is hope here, but it's not fully there yet in the spots above.

  • Like 1
Link to comment
Share on other sites

You can try the cas file in this thread yourself with an emulator.

 

Arrow keys work. They change the viewport(!). So if you have five columns and press right arrow, it changes from A-D to B-E. If you press arrow down, it starts at row 2 instead of 1, et cetera.

To enter values or formulas, press ESC, specify the cell (e.g. A1) and enter a value, a string starting with ", or a formula, like B1+C1. Parenthesis do not work, like 5+(B1*C1) and it does not know about operator precedence, so it does (5+B1)*C1 if you type 5+B1*C1.

Replication is indeed copying the contents of a single cell to multiple other cells. So for example you fill A1-B9 with values, put A1+B1 in cell C1, then replicate C1 to C2-C9, manually start recalculation (C key) and it shows all additions.

Save to C : did not work with the supplied cas file.

 

Edited by ivop
Link to comment
Share on other sites

Retried with an empty tape. Saving to C : and loading it back works, too. 4x18 sheet takes circa two minutes and fourteen seconds.

 

Perhaps you can use cas2wav and record your own tape directly from the cas file in this thread, provided you have a way to connect your computer's audio-out to a tape recorder. A real one, not the 410. That'll eliminate any typo you might have made.

 

 

Edited by ivop
  • Like 2
Link to comment
Share on other sites

I should have clarified:  I got the main program to save and load back in from tape correctly, but when I tried to save the work done on the actual worksheet, the data, it did save to tape, but did not load back the file's contents from tape.  

 

I just went through all the code and I did find 3 typos, 1 of which involved a GOTO line, so maybe some of the functions will work. I will save the main program to tape again and try and see if those changes made any difference, some of them should.

 

Then if the arrows don't work, then I will need some help in re-examining line 162.  

 

I will come back with the results within an hour or so. Thanks for the checking, ivop.  I am hoping the Doc shall answer again as well!

Edited by newTIboyRob
Link to comment
Share on other sites

Here it does save the data, and load the contents of the sheet back correctly from tape.

 

Here's a wav file I created with http://a8cas.sourceforge.net/ and tested with Altirra.

 

Record this to a cassette tape and load with CLOAD from basic.

 

 

hcalc4.zip

Edited by ivop
zipped it up because a wav file was inlined with a player
Link to comment
Share on other sites

On 9/16/2023 at 9:50 PM, 800XLNZ said:

Here's the new pdf listing, best of luck.

hcalc4_ATASCII_Fontmaster_Listing.pdf 3.82 MB · 17 downloads

Thank you for your contributions ivop, very helpful!!!  I will certainly refer back to those.  Right now, however, I am still trying to get my typed in program to work. I can't put this many (embarassing #) of man hours in on this thing, get it at least running, with the promise now of working as some of it does, and then give up.  I came this far, I MUST finish this thing. It's a damn vendetta now. I just want to report the current results:

 

I found 3 typos, all of which I fixed. But even when I did, all 5 issues I had still don't work: the arrows, the calculations, the recalculations, replicate cells, load spreadsheet data back from tape.... essentially the whole functionality of the program. Since I went through the entire program, and with a fine tooth comb I might add, noting every single punctuation mark, watching differences such as 0 for O, etc, and corrected the 3 typos I found, I am really perplexed here.

 

But since the arrows especially don't work, can we look at that line in question in the attached original pdf? (I had to add a smaller subsequent line, since a real 600 XL buzzes towards of the end of the preceding line:)

 

1) Navigation Issues

 

Line 162  .....  which I then cut after V59

thus I made a:

Line 163 ?"   ESC (I did those words in inverse video)   (CELL ENTRY)   .... now ... for this section I did was mentioned to me, namely:   esc esc esc ctrl (held) arrow (each time for each direction)   thus, just as it says, I hit the ESC key 3 times in a row, then pressed and held CNTRL, and pressed the first up arrow key... I got that Esc symbol and the up arrow to indeed appear on the screen just as it appeared in the program, so I figured I did it correctly?  Then I repeated that procedure for the remaining 3 arrows.

 

What went wrong here?  In the program when I run, the arrows do appear on the screen, but they don't navigate and I tried everything: Hitting Esc gets you into cell entry, hitting arrows by themselves or shift arrow sounds that lovely buzzer, Cntrl arrow doesn't move... no navigation!

 

2)  And just a quick look at the remaining special keys, as suggested to me, I did:

 

  • Line 222 = CNTRL (held) R for the solid line
  • Line 272 = Esc (once) then CNTRL (held) left arrow for that symbol
  • the upwards bent inverse arrow works because I heard the buzzer, and the normal upwards non inverse bent arrow must work because I was able to get a cleared worksheet
  • and I figured (hoped) that the ^ is just as on a modern PC, as shift and that symbol on the 600 XL?  Maybe I am wrong here

 

 

Other than the above 2 issues, I can only think of 1 more thing that could be preventing the program for finally working for me, but I won't post that yet, in case something I did above is not correct.

Help please???

 

[If I go a little further and this thing still doesn't work, then I will finally throw in the towel and thankfully return to ivop's kind post!]

 

 

 

Edited by newTIboyRob
Link to comment
Share on other sites

All the special characters you mention (line 162, etc..) have nothing to do with their workings. These lines just print them on screen. It's a pity all constants and meaningful variable names have been replaced by Vsomething, which makes the code hard to follow.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...