★ APPLICATIONS ★ DIVERS ★ WINDOW SAVER|Amstrad Action) ★ |
Window Saver | Applications Divers |
As you know, it is possible to create windows under Amstrad Basic. These can open at any position on the screen a maximum of seven at a time. One annoyance, though, is that if one window is defined on top of another, the contents of the bottom one are lost forever. David Lincohi of Beeston, Nottingham, has produced a program that will save areas of the screen into memory These can be called back at any uime - not necessanly to the same position. To load and save a window, you are provided with two RSX commands: |W.SAVE,a,b,c,d,e|W.LOAD,o,b,c,d,e In both cases, a is the left position of the window, b its right, c top, d bottom. The final parameter, e, is the memory address where the wmdow is to be stored. By varying it, you can store more than one window. Anywhere from &4000 to &6000 is as good a place as any to start storing a window. If the whole screen is saved, though, you need &4000 bytes and the start address must be near to &4000. Obviously, the same address value must be used when restonng a window. It may be loaded back to a diffeient screen position, as long as the height and width are not altered. For example: |W.SAVE,10,20,10,20,&4000|W.LOAD,30,40,10,20,&4000 will generate a second copy of the first window, 10 characters to the right. It is possible to catadate the number of bytes needed for the window in memory: L*D*8, where L is the number of rows of characters in the window, and D - (right of window - left of window)*(width of character). The width of the character vanes accordmg to the current mode settmg. It will be 1 in mode 2, 2 in mode 1 and 4 in mode 0. To save the program as a binary file , type: SAVE"WINDOW.BIN",B,&A080,&F9. To reload, type in direct mode; MEMORY &A000:LOAD"WINDOW.BIN":CALL &A080
|