Hello Randy,

In PowerBASIC's 32-bit Console Compiler for Windows (PB/CC), there is a command included with the Scrnio.inc file that is used as follows (example from my wf.bas PB/CC code file):

QPRINT 1, 1, SPACE$(80), &H14F:QPRINT 1, 2, "Westfront PC - " +TIME$+" Name: "+naa$+" Level:"+MID$(STR$(lv),2)+" HP:"+MID$(STR$(hp&),2)+" EXP:"+MID$(STR$(ex&),2)+" Act: "+aa$,&H14F

QPRINT 2, 1, SPACE$(80), &H5F:QPRINT 2,2, "Version 18.15 - Jun 9, 2002 : Smile! :) : http://westfrontpc.cjb.net/ ",&H5F:IF fald=1 THEN fh&=mh(156):IF ackward=0 THEN ackward=1:fhm&=fh&

QPRINT 3, 1, SPACE$(80), &H6F:QPRINT 3,2, "Faldor's tab: "+MID$(STR$(ftab),2)+" : Wolf's XP: "+MID$(STR$(we&),2)+" : Quest: "+MID$(STR$(qs),2)+" : Items: "+MID$(STR$(ic),2),&H6F

The closest equivalent in HLA that I have used/found is:

console.cls();
console.gotoxy( 0,0 );
console.setOutputAttr( win.fgnd_White | win.bgnd_Red );
stdout.put(" ");
console.gotoxy( 0,0 );
stdout.put("Westfront PC-ASM - Version 1.25 : hp: ",h," g: ",g," exp: ",e,nl);
console.gotoxy( 1,0 );
console.setOutputAttr( win.fgnd_White | win.bgnd_Magenta );
stdout.put(" ");
console.gotoxy( 1,0 );
stdout.put("http://www.geocities.com/dunric/westfront.html",nl);

However, this appears to reposition the cursor. I'd prefer to keep the cursor at the current location (where the text ends) and QPRINT (or stdout.put) the information on the top two or three lines of the console screen (without affecting the current cursor position).

Is this possible or am I confusing the issue here? :)

Sincerely,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-13 00:32:15 by Paul Panks

Hello Randy,

In PowerBASIC's 32-bit Console Compiler for Windows (PB/CC), there is a command included with the Scrnio.inc file that is used as follows (example from my wf.bas PB/CC code file):



However, this appears to reposition the cursor. I'd prefer to keep the cursor at the current location (where the text ends) and QPRINT (or stdout.put) the information on the top two or three lines of the console screen (without affecting the current cursor position).

Is this possible or am I confusing the issue here? :)

Sincerely,

Paul Panks
dunric@yahoo.com


Well, although the HLA console module doesn't support a feature like this, the win32 console library does (writing text without moving the cursor position). I just never added the function to the HLA console module.

You should note that the HLA console module is really a thin layer over the top of the Win32 API console calls. So don't be afraid to look up those console calls (on MSDN) and make the API calls directly. You can (kind of) look at the source code to the console module in HLA to see how this is done (though I'd warn you that the code is crude because it was written before I added @stdcall and @cdecl calling conventions to HLA).

Your recent work with HLA has brought the fact that a lot of people are interested in a portable version of the console library (something I didn't believe, before). So perhaps I will take some time and try to come up with a portable set of routines (Linux and windows) in the near future.

In the meantime, look up console on MSDN.
I'll be more than happy to explain how to create an HLA prototype for any API function you find there that you want to use.
Cheers,
Randy Hyde
Posted on 2003-05-13 23:37:47 by rhyde
Hello Randall,

I can envision a lot of people using such a console library. I know with e-mail programs it might be nice to have the responses in, say, cyan and the main text in light gray. Certainly with telnet applications the ability to set the screen to a different color is well suited for readability purposes.

I'd also imagine an ANSI library would be something of interest as well.

Sincerely,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-14 11:43:48 by Paul Panks

Hello Randall,

I can envision a lot of people using such a console library. I know with e-mail programs it might be nice to have the responses in, say, cyan and the main text in light gray. Certainly with telnet applications the ability to set the screen to a different color is well suited for readability purposes.

I'd also imagine an ANSI library would be something of interest as well.

Sincerely,

Paul Panks
dunric@yahoo.com


I am currently working on an ANSI terminal console library (that I will back port to Windows once
I get it complete under Linux).
Cheers,
Randy Hyde
Posted on 2003-05-20 12:49:50 by rhyde
Sweet! I look forward to the update. :) Anything that is vt100 compatible should work fine over telnet.

Sincerely,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-20 13:02:09 by Paul Panks

Sweet! I look forward to the update. :) Anything that is vt100 compatible should work fine over telnet.

Sincerely,

Paul Panks
dunric@yahoo.com


ANSI is, effectively, the standardization of the VT100 terminal codes.
Another thing I should have mentioned is that I'm currently working on
this book "Windows Programming in Assembly" and the chapter that discusses
text (Chapter Five) contains a fair description of many of the Win32 console APIs.
Not something you want to use if you want portability to Linux with your code,
but very, very, powerful (e.g., the HLA console library is a thin layer between HLA
and *some* of the Win32 API console routines).
I've still got to finish Chapter Five and write Chapter Three (a discussion of using
RadASM with HLA) and then I'll post the first five chapters on Webster.
This is probably a month away, at this point.
Cheers,
Randy Hyde
Posted on 2003-05-20 15:21:37 by rhyde