Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!cbmnlux!cbmehq!cbmfra!swinjm!forgeas From: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Newsgroups: comp.sys.amiga.programmer Subject: Re: Help a rookie! Message-ID: <18dc31a2.ARN0bf7@swinjm.UUCP> Date: 21 Mar 91 08:36:50 GMT References: <18d4fa1e.ARN0f18@cbmami.UUCP> Reply-To: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Followup-To: comp.sys.amiga.programmer Organization: The Software Winery Lines: 32 In article <18d4fa1e.ARN0f18@cbmami.UUCP>, Jason Goldberg writes: > 2. What are, or where can I find the ANSI codes for controlling the cursor > in a colsole window (i.e. the CLI or WSHELL). I am trying to do stuff like The Rom Kernel Manual contains all this and more. > [...], and they have commands like gotoxy() to move around the > cursor. Any help/pointers are greatly appreciated... Something like this (certainely needs little more work): void gotoxy( char x0, char y0 ) { UBYTE temp[10]; UBYTE y1,y2, x1,x2, *ptr; ptr = temp; *(ptr++) = 0x9b; y1=y0/10; y2=y0%10; x1=x0/10; x2=x0%10; *(ptr++)=y1+0x30; *(ptr++)=y2+0x30; *(ptr++)=0x3b; *(ptr++)=x1+0x30; *(ptr++)=x2+0x30; *(ptr++)=0x48; *(ptr)=0; WriteConsole( temp ); // or what you want: fprintf... } -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?