gfxmem.c - graphically display available memory. Quick program that's a freebie. Give it to anyone you please, just don't sell it. Version 0.0 - initial version, released on INFO-AMIGA. Version 0.1 - added numeric indication of available and used memory in bar graphs. Version 0.2 - added condition compilation for timer.device code. If I can figure out how to make it create timer signals, then I can define USE_TIMER for much more prompt response to window sizing attempts. Oh well. Version 0.3 - removed conditional compilation for timer.device code. We now use the timer, and all seems well. Version 0.4 - calculate character data placement according to display preferences. Check for updated preferences while running. Version 0.5 - don't display fast memory if none exists. Handle Lattice C 3.03 in V1.1 update kit that insists on creating a window for stdin, stdout and stderr with- out asking. Foo! source size = 19,728 bytes running size= 32,088 bytes Version A.6 - converted to assembly by Darrel Schnieder. source size = 1,576 running size= 9,984 Changes: 1. Window now SMART_REFRESH. This simplifies what messages need to be responded to. The only time the window needs to be refreshed is if the window is resized. 2. Used RMBTRAP so that the window wouldn't get menu messages. 3. Got rid of the SetWindowTitles message that was written when the window became active. 4. HorizSpace = AvailWidth>>5 in place of HorizSpace = AvailWidth/20 This has the effect of the margin being smaller. 5. The loop that sets ChipMax & FreeMax is only called once. This means that if the user adds memory to the system while running gfxmem that memory will not show up. Also in the same loop comparisons are made to MEMF_FAST+1 and MEMF_CHIP+1 rather than MEMF_FAST and MEMF_CHIP as the original program did. This works on my system and I don't understand the need for the difference. 6. The redraw subroutine uses FORBID/PERMIT so that once it starts tasks of a higher priority will not preempt it. 8. The numerical sizes of the memory are displayed to the far left and right rather than the middle. I did this so that it would be easier to use the middle to display some more info. I also made the text colors opposite. 9. When the numerical amount is printed it only prints the actual number with no preceeding blank spaces. This means it is more likely that the number can be printed since it takes up less space. 10. Used SetDrMd to set the mode to JAM1 and thus need never worry about setting the background pen. This got rid of 6 calls to SetBPen. 11. Consolidated the natural parrallelism between ChipMem and FastMem code in redraw. This roughly cut the size of redraw in half. 12. Will now run with a stack as small as 1600 bytes. 13. Displays graphically most recent change. This is done by a bar in the middle. Copyright (C) 1985, Louis A. Mamakos Software & Stuff