80-Bus News |
July–August 1984 · Volume 3 · Issue 4 |
Page 12 of 43 |
---|
If you compile them, and run either, you will see them chaining each other alternately for ages. Unless you were not on drive A:, of course. CP/M insists on this, unfortunately, so I would like to know how to make drives A: and P: (my MAP-80 ramdisk) change their names by fiddling with the BIOS. If it can be done by some sort of poke from a Pascal program, that would be extra neat. Anybody know how?
Another little problem now arises. Programs that are so huge that they have to be broken up and chain each other are going to have lots of variables in them, which will be lost when CP/M takes over at the end of each program. Easy! Make sure the program saves the ones the other programs will need as a disk file. Compas lets you do it an easier way, you have to be using global variables, which are all the same for each program, and declared in the same order, and they will still be there when the next program is loaded, it says in the manual. I don’t think it sounds like a very safe way to go about things, as putting a new variable in one program will mean altering all of the other programs in a system, and if you forget, and try to run them, all hell will be let loose, as programs start assuming one variable to be another. So I will use files. In fact, given the speed of ramdisks, and the fact that the file you pass the data in can be on any drive, this is the easy way to do it. As it happens, there is a lot to be said, as your programs grow ever bigger, for designing them to use files anyway, rather than arrays. It gives you more room, although it does need the sort of fast access Winchesters and ramdisks give you.
Just to show it can be done, here is one half of the same thing in assembler. To make the other half, you want almost the same file again, with the exceptions that the message in line 40 should refer to Program chain 2, and the file name in line 44 should be altered to Chainone. The space before the file name is vital. I should still like to hear from anyone who knows why this is…
Page 12 of 43 |
---|