2020: NameSpaces are going to be implemented this year to better separate content. OS-9 Al (talk) 11:18, 15 April 2020 (CDT)
2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)
All in one (Rainbow 1981-09)
More than one program on tape and both of them long?
You want to combine them but really don't want to re-type either?
Oh well, maybe there's something else you can do. After all, it was hard enough writing both of those programs in the first place without having to re-type one of them all over again.
You can combine both programs!
First of all, the combined
total of the programs --- plus 300 bytes --- should be less than the memory limit of your computer. If things meet that condition, you CLOAD your first program as usual.
A note here. it is best to have both programs on tape. IF this routine crash, you have not lost anything that way if you write a program and then want to append something else to it, CSAVE the new program first. This procedure will save you a lot of grief just in case.
Once you have a program in memory, type PRINT PEEK(25),PEEK (26). The COLOR Computer will give you two numbers. Write these down.
Next, type PEEK(28). You will get one number.
If that number is 0 (zero) then type POKE 25,Peek(27)-1:POKE 26,254.
If that number is 1 then type POKE 23,PEEK(27):POKE 26,255.
If that number is more than 1, type POKE 23,PEEK(27):POKE 26,PEEK(28)-2
If you try to LIST your program in memory at this stage, you won't get anything. Except for the "PRINT MEM", your computer acts like there is no program in memory.
Now, CLOAD the second program.
Finally, POKE the two numbers you wrote down at the start into addresses 25 and 26. Both programs will now be resident in the computer at the same time.
One thing. The line numbers will NOT be changed. In other words, line 10 in program #1 will show up as line 10 ... and line 10 in program #2 will ALSO show up as line 10.
For this reason, it is sometimes best to CLOAD the second program first, assigning it high line numbers with RENUM. Then, CSAVE that program, clear memory, and load the first program with the original line numbers intact. After you. go through this procedure, you can RENUM the whole thing (if you have Extended Color Basic) and all the GOTOs, GOSUBs and their lines will be changed correctly. Otherwise, those assignments can be messed up by the RENUM command.
You can CLOAD as many programs onto one tape as you like using this operation. The only constraint is having enough memory to hold everything.
One use of this can be if you, have a whole lot of short programs -- like the graphics examples in the Tandy documentation -- and want to have them in just one program to you don't have to CLOAD back and forth. Just write a short menu after loading a bunch of these programs in and you will have a, graphics display program with a number of options.
We've done this, and its a nice answer to the question from people who ask, "what's this thing do, anyway?"