dyer@atari.UUcp (Landon Dyer) (04/16/86)
----------------------------------------------------------------- | | | AAA TTTTT AAA RRRR III **** SSS TTTTT | | A A T A A R R I **** S S T | | A A T A A R R I **** S T | | AAAAA T AAAAA RRRR I ****** SSS T | | A A T A A R R I ** ** ** S T | | A A T A A R R I ** ** ** S S T | | A A T A A R R III ** ** ** SSS T | | | | DDDD EEEEE V V EEEEE L OOO PPPP EEEEE RRRR SSS | | D D E V V E L O O P P E R R S S | | D D E V V E L O O P P E R R S | | D D EEEE V V EEEE L O O PPPP EEEE RRRR SSS | | D D E V V E L O O P E R R S | | D D E V V E L O O P E R R S S | | DDDD EEEEE V EEEEE LLLLL OOO P EEEEE R R SSS | | | ----------------------------------------------------------------- Question and Answer Bulletin April 1986 Copyright (C) 1986 by Atari Corp. "all rights reserved" 1196 Borregas Ave., Sunnyvale, Ca. 94086 ----------------------------------------------------------------- Here are the latest questions from the Atari developers mailbag as answered by John Feagans, Director of Software Technology. Leave questions on Compuserve for PIN 70007,1072 or GO PCS57 for Atari developer SIG information. ----------------------------------------------------------------- This months contents numeric pad that it has and the VT-220 style that the ST 1 Corrections...............1 has is that the cursor keys 2 BIOS......................1 are located in the positions 3 DOS.......................2 of the *, -, +, and Enter key 4 VDI.......................2 on the numeric pad. The enter 5 AES.......................2 key itself is split into two 6 Desktop...................3 smaller keys. 7 Accessories...............3 8 BASIC.....................3 ------------------------------ 9 LOGO......................3 10 Development tools.........4 11 New On Compuserve.........4 2. BIOS ------------------------------ * Q: How do I make the buffer 1. Corrections larger for communication over the MIDI port? In the March 1986 issue I mis-stated a description of A: Use the xbios call the real VT-52 keyboard. This Iorec(MIDI) to get the address device actually does have a of a structure which contains numeric pad and cursor keys. a pointer to the existing The difference between the buffer. Change it to point to _________________________________________________________________ ATARI ST DEVELOPERS -1- April 1986 Question and Answer Bulletin _________________________________________________________________ your new and bigger buffer. Be sure to restore things when A: You need to construct a you exit your program for the mono-plane mask with zeros benefit of the application where the image in memory will that follows yours. be transparent and ones where the image in memory will ------------------------------ occupy space. Use the copy raster transparent (vrt_cpyfm) with transparent mode to cut a 3. DOS hole into the screen. Second use vro_cpyfm with "or" mode 7 * to move the color image to the Q: How do I get the address of screen. See section 6 of the the DTA buffer for use with VDI manual for further the Fsfirst() command? details. A: There are two ways that you ------------------------------ can do this: 1) Allocate a buffer yourself and use the Fsetdta(ptr) to tell the 5. AES system about it, or 2) ptr=Fgetdta to use the one * already defined. Q: How do I hide and show the mouse? * Q: I am running out of stack A: Use the graf_mouse call. A space when I link with useful thing to include in a apstart.o. Where do I edit to header file are the following increase the size? definitions: #define HIDE_MOUSE A: Look for the label ustk in graf_mouse(256,0x0L) apstart.s. Directly preceding it you will find a statement #define SHOW_MOUSE ".ds.l 256". This statement graf_mouse(257,0x0L) allocates 256 * 4 words, or about 1k of stack. To increase the stack to 8k, make * it ".ds.l 2048". Remember Q: In the mentst.c example that declaring local arrays in program, why are so many C will eat more stack space-- parameters in the evnt_multi allocate accordingly. To make call zeroed out? the apstart.o you must assemble your new source by A: The reason for this is that as68 -l -u apstart.s. in this example program we are only interested in returning ------------------------------ if there was mouse event. We are not interested in keyboard, timer, or button 4. VDI events, hence we have a dummy pointer as place holders in * those parameter positions of Q: How do I transfer a color the evnt_multi. image from memory to the screen without copying the ------------------------------ background around the image? _________________________________________________________________ ATARI ST DEVELOPERS -2- April 1986 Question and Answer Bulletin _________________________________________________________________ 7. Accessories 6. Desktop ------------------------------ * Q: How does the AUTO folder work? 8. BASIC A: If you create a folder * named AUTO, the system looks Q: The accountants in my 50 for it on power-up boot and million dollar company do not will execute any programs it like my basic programs as finds inside. If there is large numbers will end up with more than one program, the a few pennies added to the programs will be executed in end. What can I do? the order that they were created in the folder. These A: You are seeing the effect programs are named *.prg but of a single precision it is not possible to have an scientific math package. The auto-starting GEM application. maximum number of significant However, the programs may use digits that can be stored is 6 the VDI, DOS, and BIOS. A to 7. Decimal fractions good example to try is to cannot be accurately place STWriter inside an AUTO represented by a binary folder and it will start floating point structure. To running on power-up. When you overcome the latter exit STWriter, initialization limitation, you can store all resumes and execution brings numbers as pennies, only up the desktop. AUTO folders inserting the decimal point are generally used for drivers when inputting or outputting such as those for the them. To gain extra hard-disk and printers. significant digits you can save each number as an integer Q: How can you get the name of whole and fractional part. To the data file that initiated a really gain significant digits program with an installed you might consider writing document type? some math routines which operate and store numbers in A: For programs that have strings. undergone the install application option at the ------------------------------ desktop, it is easy to get the name of the document. The desktop program places the 9. LOGO file name string in the command tail. The command * tail starts 80 hex into the Q: I keep getting an edit base page. You can get this buffer full error. I have information by accessing the tried turning off buffered base page directly, or by graphics and not loading desk main(argv,argc) from a C accessories to get more space. program that uses gemstart.o. Will getting ROMs help me? ------------------------------ A: The edit buffer is a fixed size. You need to break up your program into smaller _________________________________________________________________ ATARI ST DEVELOPERS -3- April 1986 Question and Answer Bulletin _________________________________________________________________ segments and load them in. option specifies the drive on Getting the ROMs would only which temporary files are give you more program storage created. The variable d: is and would not increase the the drive designation. For size of the edit buffer. LINK68 TEM[d:]. ------------------------------ ------------------------------ 10. Development Tools 11. New On Compuserve * In data library 7 (for Q: How do I get the C-Compiler registered Atari Developers to make a listing of my only) in the Atari Developers program with line numbers SIG on Compuserve, the following files are new this A: The Alcyon C currently month: supplied in the developers kit does not have an option for WRITE.O C RTL fix generating a listing. Errors LSTOUT.O " " that are reported can be found CC.BAT " " by using the editor to step to that line in your source. I GEMDOS.DOC New improved. hope that someone out there will write a print/header and BCD.DOC Math package. line number generating program GETDOB.C " " to share with us in the data MATH.OBJ " " libraries in the developers PRINTD.C " " SIG. RELMOD.C New improved. * Q: I am including stdio.h and SLDSET.PRG Image service. linking with gemlib and libf, SLIDE.DOC " " but I still have undefined SNPSHT.TOS " " symbols etoa and ftoa in the SNPSVE.PRG " " link step when I use printf. TEMPLA.C GEM skeleton. A: The order of the library files in the link are FED.PRG font editor. important. Make sure that FEDFIX.TTP " " libf is listed after gemlib. FEDFIX.C " " If you have any doubts you can FED.DOC " " also list it as libf gemlib FRDME.DOC " " libf. FONTUSE.DOC " " FONTUSE.S " " * Q: I have a RAM disk program. STHDW.DOC New document. I would like to speed up my links by putting all the LARGE.S Porting aids. linker created temporary files on the RAM disk. How do I QA2.DOC Previous Q/A. command the linker to do this? A: For LO68, -F d: The -F _________________________________________________________________ ATARI ST DEVELOPERS -4- April 1986