Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.programmer Subject: Re: Help a rookie! Message-ID: <1991Mar22.151807.29233@kuhub.cc.ukans.edu> Date: 22 Mar 91 21:18:07 GMT References: <18d4fa1e.ARN0f18@cbmami.UUCP> <761@tnc.UUCP> Organization: University of Kansas Academic Computing Services Lines: 58 In article <761@tnc.UUCP>, m0154@tnc.UUCP (GUY GARNETT) writes: > > [Printing output to PRT:] > Don't forget to close it. Printer output is buffered, and I don't > believe that files are closed automagically when your program exits. > Closing the file will ensure that all the data gets printed (and > besides, it's good programming practice). If its been fopen()ed, it should close on exit, but you might try fflush() on the file handle (your checking that fopen() succeeds too I assume). > [reading RAW input from a console] > I believe that there is also a sequence to place the console into RAW > mode temporarily. (I think; I could be very wrong on this one) Check > the AmigaDOS manual. Yes there is, but it's somewhat non-trivial. You need to send an SET_RAW_MODE DOS packet to your console handler that will put your CON: only in an unbuffered mode. Remember, since there are several CON:s, you need to do DevProc("*"); not DevProc("CON:);. > You can probably write a simple library of these functions, and then > include it in each of your programs. If you don't already have them, > get a complete set of the Rom Kernal Manuals, and the AmigaDOS manual. > THe RKM's are published by Addison-Wesley, and the AmigaDOS manual is > published by Bantam. The DOS manual is out of print and can be hard to find though... > It is also a good idea to get a copy of the > Hardware Reference Manual, and the Intuition Manual (also from Addison > Wesley). Another recommended book is "Inside the Amiga with C", which > explains how to do many amiga-specific things. The "Intuition" RKM is obsolete. You want the new "Libraries and Devices" which includes the old Exec and Intuition manual, and (if you want to save a few bazillion pages of printing) the "Includes and Autodocs", also the Hardware Manual is updated. You can tell the "new" manual by its basically all-blue cover (older manuals are viturally all white). "Inside the Amiga with C" is a good book but its the second edtion of "Inside the Amiga" (no "with C" in the title) which you want to avoid because its older and obsolete, do don't get confused. > Good Luck! > > Wildstar -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: mgooderum \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~