Metropoli BBS
VIEWER: tvhc.dif MODE: TEXT (ASCII)
  TVHC, a Help Compiler example from Borland Pascal

  In order for the original source code from Borland to work with
  Virtual Pascal for OS/2, the following changes need to me made.  Note,
  that the source will still work with Borland Pascal after the changes
  have been made.

  * Add Use32 to all the Uses clause of all units

  * Change TVHC.PAS:
    The CopyToBuffer procedure is implemented using 16 bit assembler code,
    which must be changed to 32 bit in the Virtual Pascal version.
    Change the body of the procedure by inserting
      {$IFNDEF OS2}
    just before the "asm" statement block.  Just before the final "end" of
    the asm statement block, insert the VP/2 code:
      {$ELSE}
        {$USES esi,edi} {$FRAME-}
        asm
          cld
          mov     edi,OFFSET Buffer
          add     edi,Ofs
          mov     esi,Line
          xor     eax,eax
          lodsb
          add     Ofs,eax
          xchg    eax,ecx
          rep     movsb
          xor     al,al
          test    Wrapping,1
          je      @@1
          mov     al,' '-13
        @@1:
          add     al,13
        @@2:
          stosb
          inc     Ofs
      {$ENDIF}

  * Change TVHC.PAS:
    - After the Uses clause, add the following:

        {$IFDEF VPDEMO}
          {$Dynamic VP11Demo.Lib}
        {$ENDIF}

      This means, that the program will use all units stored in the
      Demo Licence DLL (vp11demo.dll) when the program is compiled with
      the demonstration version of VP/2.

[ RETURN TO DIRECTORY ]