jwhitman@stl-06sima.army.mil (Jerry Whitman) (10/04/89)
Well it seems I have finally gotten some time to resume my attempt to do a little BASIC programming on the AMY. Having been soundly rebuffed in my attempts to scroll, input control strings for the monitor, do keytrapping, etc, I am now trying to do some more generic things but I keep stubbing my toe, so I need a few pointers on how AMY implements some things in BASIC. I need a borderless window of 640 x 200, all usable by the program. I have tried a variety of combinations of screen and window parameters, and the closest I can get is a bordered, untitled window of 620 x 186. I need to display 25 lines of text, but this will only allow me 20 lines. How can I get AmigaBASIC to let me have the whole window area? If I cannot get the whole 640 x 200 there is another possible way to get there from here. The BASIC reference manual indicates it uses the height and width of the uppercase oh of the windows current font to determine cursor position. This implies that if I had a slightly smaller font size I could possibly get my 25 lines in the available 186 pixle high display. If this is true how can I tell a window to use a different font? I presume it would be through the Library and Call functions, but the BASIC manual does not give any reasonable explanation, let alone examples! I believe there is a program in BasicDemos that will display each of the standard fonts. Would this be a good example to draw from? Would this allow me to mix different fonts of the same size in one window? What about different size fonts in the same window? Different subject! The program I am working on is too large to load without increasing the stack and data areas with the clear command. I have put the clear command in the top of the program but as I suspected it made no difference because it was not executed until the program was fully loaded. That prevents me from running the program from an icon. If I start up BASIC and issue the clear command in immediate mode I can load and run the program just fine. How can I start up BASIC from an icon and get it to recognize the increased space? If I cannot do that then perhaps this is a good candidate for CHAIN or MERGE. Any ideas?? These are probably very elementary questions, but the time I have to experiment is very, very limited since my sessions on the AMY are usually short and far between. Consequently I would greatly appreciate any help that would keep me from re-inventing the wheel. BTW!! Since the Commodore AmigaBASIC manual is not very helpful on how to utilize much of the functionality of the AMY what would be a good book to use as reference for BASIC programming on the AMY?? Thanks for your patience and for the usual excellent response. Regards, Jerry.
galvey@sts.sts.COM (10/05/89)
/* Written by jwhitman@stl-06sima.army.mil */ /* ---------- "Basic program questions" ---------- */ > >[Window stuff deleted] > >Different subject! The program I am working on is too large to load >without increasing the stack and data areas with the clear command. >I have put the clear command in the top of the program but as I suspected >it made no difference because it was not executed until the program was >fully loaded. That prevents me from running the program from an icon. >If I start up BASIC and issue the clear command in immediate mode I can >load and run the program just fine. How can I start up BASIC from an >icon and get it to recognize the increased space? If I cannot do that >then perhaps this is a good candidate for CHAIN or MERGE. Any ideas?? > I had the same problem when a program I was working on got to be larger than 25K. After a while I figured out what to do to make it run. I simply made a "loader" program (it runs when you click the icon). All the LOADER does is CLEAR enough space (using the CLEAR command) and then loads & runs the "MAIN" program. I don't recall what command is used to load & run the main program. One thing to watch out for - I made a custom ICON for the loader program (it looked like a business form), and it got wiped out whenever I did an EDIT after running the program (BASIC EDITOR replaced loader.info instead of main.info). I finally made a copy of the ICON & copied it when I was done editing for the day. Another possible option is to get a Basic compiler! I have thought about this but can't seem to get motivated since I started looking at C. >[more stuff deleted] >Thanks for your patience and for the usual excellent response. > >Regards, Jerry. Hope I have helped. Greg A. ============================================================================= |Greg Alvey | Internet: galvey@sts.sts.COM | |Semiconductor Test Solutions | Phone : (408) 727-2885 (work) | |4101 Burton Dr. | | |Santa Clara, CA 95054 | When all else fails, read the instructions! | =============================================================================