PART 10: DOING SOMETHING WITH THE CODE LIBRARY Last time, I presented the final code for the arbitrary memory locations on the CoCo. Now I will actually present some code which may prove marginally useful. One might do any number of things from using the extra memory as a temporary location to store data to using it as a main storage for something like a word processor. Now, the word processor idea is rather complex, so we will not be doing anything quite like that in this series, at least not for some time. What we will do, however, is create a program that will take an arbitrary memory block in the BASIC 64K memory map and store it into the "extended" memory. This might give you some interesting ideas on how to interface with other assembly routines. The method I'm going to use here is actually a bit of a hack, but it is rather easy to use. Essentially it will work by doing an EXEC command in BASIC. That leaves the question of how to get the parameters into it. The most common method of so doing would involve using POKE to put the parameters into a known memory location. I don't like this method for two reasons. One is that it is ugly and values that need more than 8 bits are more complex to put into the parameter block. The other reason is that it requires several commands to do one essentially atomic task. So how are we going to get the parameters then? My method involves using some rather interesting features in the BASIC interpreter that comes with the CoCo. We will pass the parameters after the EXEC command. Essentially, our syntax will look as follows: EXEC
: