Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!swbatl!ammrk From: ammrk@swbatl.sbc.com (Mike R. Kraml) Newsgroups: comp.sys.amiga Subject: Re: Difficulty in programming Message-ID: <1535@swbatl.sbc.com> Date: 3 Jun 90 07:35:32 GMT References: <2487@zipeecs.umich.edu> <1990Jun2.063414.10292@agate.berkeley.edu> <136558@sun.Eng.Sun.COM> Reply-To: ammrk@swbatl.UUCP (Mike R. Kraml) Organization: Southwestern Bell Tele. Co. - Advanced Technology Lab - St. Louis Lines: 52 In article <136558@sun.Eng.Sun.COM> cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) writes: >In article <1990Jun2.063414.10292@agate.berkeley.edu> laba-1ei@e260-2f (Joseph Chung) writes: >>Try this one on for size: >> >>In an IBM (no flames please!), if I want to put a character anywhere on the >>screen, I just >>1. load a segment register with the segment of the screen. >>2. write the proper byte to the screen location (using a simple offset) (In >>short, is a basic POKE command!) >> >>How would you accomplish this in an Amiga? > >Well, how about : > win = fopen("CON:640/200/0/0","w+"); > fprintf(fp,"\e[%d;%dH%s",y,x,"X"); > >Prints the character X at x, y. > >Of course in your rather rude IBM example you just bang on the hardware, >the equivalently rude thing on the Amiga is : > IntuitionBase = OpenLibrary("intuition.library",0L); > GfxBase = OpenLibrary("graphics.library",0L); > rp = &(IntuitionBase->FirstScreen->RastPort); > Move(rp, x, y); > Text(rp, "X", 1); > >Of course this screws up the display, just like the IBM example given >does. The only difference between this and making it nice is getting >your own rastport which means opening your own window which is really >trivial in AmigaBASIC and in C it is also pretty trivial. > >My final comment on all this silliness is wait until you get a real job >and someone asks you to put characters on an "X11" window. Hooboy, >that may be too difficult for you. This is one of the reason why >"years and years" of experience programming the IBM PC just doesn't >cut it in my book. Yes... I had to Reprint all of this wonderfull Followup! Excellent reply Chuck, you took the words right out of my mouth!!!!!! >-- >--Chuck McManis Sun Microsystems >uucp: {anywhere}!sun!cmcmanis BIX: Internet: cmcmanis@Eng.Sun.COM >These opinions are my own and no one elses, but you knew that didn't you. >"I tell you this parrot is bleeding deceased!" -- ============================================================================= Mike Kraml - Manager-Separations MECHANIZATION - SWBT - (The Techies) UUCP: {uunet, bellcore, texbell}...!swbatl.sbc.com!ammrk =============================================================================