My dad sometimes said that 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 bounced back and forth between the original coco basic and machine language to find the beginning addresses of original coco basic snippets for load urbane, save urbane, and execute a line. I copied each urbane line into the original coco basic file when it came time to execute it. Often it didn’t work. A line that would work on the command line sometimes wouldn’t work when I tried to execute it in the urbane file. I changed one address in my program so that the lines would be copied into the command line and then be executed there. Almost everything worked.
Goto commands would work by themselves but not in if then else commands. I immediately set out to rewrite the if then else command interpreter. After sleeping on it I decided to use the error trap routine that I already had. It took awhile but I would have probably still been at it and it probably wouldn’t have worked if I hadn’t changed. It was just too complicated. Now when the rom interpreter finds a letter from a label instead of a line number it says he must have meant line zero. There is no line zero so it says ?ul error (undefined line). At which point I take over and take him to the desired label. If he doesn’t have it I let the original coco basic give him the ?ul error.
The coco assembler I use starts at line zero. Notepad++ where I make my changes starts at line one. I tried to get my son to adjust the batch files that move the files back and forth between the Vcc coco emulator and notepad++ to take care of it. He balked. He showed me how I could do it. I tried a little. Then I tried it without the fix. When I got assembly errors the lines were one off. For a while I would type in n1,1 into the assembler. Then it too would start at line one. In the old days I would assemble my files by typing aed /we/nl/ns. Assemble ed /wait-for-errors/no-listing/no-symbol-table. Since I am editing in notepad++ instead of Vcc I can now just type aed /we. It lists everything as it goes along. When it finds an error it waits. I fix the mistake in notepad++ then press a key in Vcc. When it finds another error I repeat the process. Eventually I figured out that I could just add one to the line Vcc said the error was on. I’m having a great time.
Right now basic keywords show up in inverse video on the screen except for the one that is being edited. There’s an asterisk at the top and bottom of the file. Goto’s work in if-then-else commands. The stack pointer stays the same. I’m so proud. I’m going to start writing urbane programs to test the editor and interpreter. Wish me luck.