TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: John Poltorak
date: 1995-12-18 11:40:10
subject: OS/2 code

Thursday December 14 1995, Peter Fitzsimmons writes to Internet:

 e>> I'd like to have your permission to redistribute some
 e>> of the reboot code that
 e>> you've posted in the Fido OS2PROG echo.  One of my

 PF> Sure -- any code I post in the echoes or newsgroups is PD.

 PF> Here's some more (there's a LOT more, but finding it is not that easy):

 PF>  // VIO "hello world" program
 PF>  // compiled with ibm cset++ v2:
 PF>  // icc /Kb+ /O /Oi /Rn /Sse /G4  vio.c

 PF>  #define INCL_NOPMAPI
 PF>  #define INCL_VIO
 PF>  #include 
 PF>  #include 
 PF>  #include 

 PF>  int main(void)
 PF>  {
 PF>      int i;
 PF>      char msg[40];
 PF>      BYTE attr;

 PF>      VioScrollUp(0, 0, 0xffff, 0xffff, 0xffff, " \x7", 0);  // cls
 PF>      VioSetCurPos(23, 0, 0);      // so cursor is at bottom when program
 PF> ends

 PF>      attr = 15;  // start off with bold on black background.
 PF>      for(i=0; i<22; i++){
 PF>          sprintf(msg, "Line %2d: Programming is fun!", i);
 PF>          VioWrtCharStrAtt(msg, strlen(msg), i, i, &attr, 0);

 PF>          attr += 16;     // change background colour.  Note: attributes
 PF>                          // are just like they are under dos when poking
 PF>                          // into video memory.
 PF>      }
 PF>      return 0;
 PF>  }
 PF>     ==================================

I was very pleased that I managed to open up Brief with the above code,
press Alt-F10 (compile buffer) and be able to run the executable program!
That's a bit of an accomplishment for me - being able to compile someone
else's code :-).

As a result, I may have another attempt at writing a program to output
Teletext pages to the screen. Do you have any idea where I may be able to
get some sample code for doing this?

In case you don't know, Teletext pages are composed of text and graphics
characters, where the graphics are built up from six blocks such as:-

     Û
    Û
     Û

There are no equivalent ASCII characters which I can use. I have a DOS
program (but no source), which displays the screens properly in full
screen, and I would like to be able to do the same thing in OS/2, but I
have no idea how to code it. I don't expect that I can use the Vio commands
since I think it will have to be full screen. Any tips would be
appreciated...


John
----------------------------------
mailto://jpolt{at}bradnet.demon.co.uk

---
* Origin: (2:250/313)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515
SEEN-BY: 712/517 628 713/888 800/1 7877/2809
@PATH: 250/313 440/4 141/209 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.