I hadn’t done a backup on my ed2.bas file for a while. The .basic files usually don’t change much. I now initialize the entry addresses by bouncing back and forth between the basic and machine language portions. I got very intense redoing the basic part. When I got it to work I backed it up this time. When I load my urbane program I will do a new-program routine in machine language, open the file and read lines in basic, crunch lines and put them in the urbane file in machine language, check for eof and eventually close the file in basic. I was doing the new-program routine when I started having problems. First the assembler reported an i/o error. I.wasn’t too worried yet. It does that now and then. I was still very intense. In machine language I have to switch the rom in and out to access rom routines. All at once Vcc started crashing. It never happens. I loaded the last version that worked. It still worked. The version that worked seemed to access a rom routine when the rom wasn’t switched in. It’s 1:00. I usually go to bed at 10. Maybe I should go to bed. Hmm.
When I’m jumping back into the old coco basic file I have to count the characters from the start to where I want to copy the line from the user’s urbane basic file. I used to think that I needed to start where there was a colon in the old file. When I listed the old line there would be the colon followed by the new line. I miscounted this time and copied the old line start right on top of the colon. It still worked and when I listed there was the new line right there at the start of the right after the old basic’s line number. meant to be.
I use the old basic to open the sequential file t.dat. I call a machine language routine to list the user’s file to console out. Then I use the old basic to close the file. I listed the old basic file a few times before I got the message that I needed to do that in a machine language routine. Loading the user file is going to be a harder. Console out is very strait forward. Not so console in. I plan to use a machine language routine to erase the current user file and set up the entry address for the next machine language routine. I plan to use the old basic to open the sequential file for input. Then for i=0 to -1 step 0: line input #1, l$: usr(l$) – (to pass the line to the machine language routine which will crunch it and put it at the end of the user file) : i=eof(1):next:close(1):end (which returns to direct basic. I’ve done each part separately. I just need to put them together. Sometimes easier said than done. Once I have that done I plan to show it to the world here. As though anyone will see it. lol.
Now I can take all the project files off the hard drive virtual image and put them back in. Extract.bat to get them off worked right off. Insert only worked with .bas files and then only if one used the -a option for ascii. So I copied each name.asm file to a temp.bas file. Then I inserted the temp.bas file with the original name.asm as the destination name in the floppy image. Of course I put it all into an insert.bat file. I already had the zzUbane.bat file that I had stored in the WINDOWS\system32\ folder that changed from that directory where the administrator command line starts to the \src directory where the .git files are stored. The only thing left is the readme.txt file. There were lots of programs that worked with .txt files on cocos in the old days. I suppose that I could look one up now. Better, maybe I’ll write one. lol.
Toolshed worked just fine to extract files from the floppy image. Inserting them was a different thing. .txt and .asm files caused various errors. I finally worked around it by by copying the individual files to a temporary .bas file, then inserting the temporary file into the floppy image with the old name. I managed to get around the problem of the administrator command prompt starting in a weird place where I could hardly do anything. I finally managed to copy a batch file to that place. It just changes directories to the directory I’m working in. Problem solved. Now to get back the the project itself.
I took a day off to try to use git with my project. Unfortunately my files are almost all on a virtual hard drive. I used Toolshed to extract them from a floppy disk image. I completely wrote an extract batch file and an insert batch file. The extract batch file worked just fine. The insert batch file gave me errors. I think I should have tried out the commands before I wrote the insert batch file. Toolshed reports errors as enigmatic numbers. When I tried to replace an .asm file on the floppy image, I got an error 1. I’ve never seen it before. An .asm file is essentially a .txt file. .txt files worked just fine. The same options on an .asm file gave the nasty error 1. My first work around was to rename the file to .txt, save it on the floppy image, and rename it on the floppy image to .asm. I had to delete the old .asm file before it would let me rename the .txt to .asm. I tried deleting the file on the floppy image first then saving the .asm file to the floppy image. Apparently the replace option doesn’t work with the .asm extension. Oh yeah, when I tried to find out how to run a batch file on windows, the answer I tried was click on start, type com, right click on the app, and select run as administrator. Well that starts you out somewhere like \windows\something. It took quite a while till I got to where my git files are located. Eventually I discovered right clicking a .bat file gave an option to run as administrator. I was there with windows explorer already. Meant to be. Well, my cell phone is charged. I guess it’s time to turn in.
Five months. When I finally got back to working on my program, I decided to increase the size of the low memory part of my program from 1K to 4K. The user’s program file is in the upper 32K which wasn’t available before, so why not. There is one vast improvement. When I see an E by itself I just jump right into my editor. I’ve also implemented RUN and GOTO. As soon as I have a SAVE program and LOAD program I’ll be ready to show it off to the world.
My dad used to say, “There’s the easy way, there’s the hard way, and then there’s Earl’s way that makes the hard way look easy.” I patched my input driver to replace “E” with ‘RUN”ED2’ in the input buffer. ED2 just says EXEC&H7C00. Hey, it works. lol.
I tried to squeeze the last line out of a bit of code that was rarely used. It didn’t work. I did it as simply as I could. It worked. While I was at it I saw that I had told my program that there were 26 alphanumeric chars instead of 36. Meant to be.
My latest problem was my fancy input driver which changed long names into pairs of characters changed hex numbers like &H7C00 into something like &AA. Boo. I fixed it in a way that fixed the output driver, too. Atta-boy Earl.