home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m110 / 1.ddi / HLL / HLL.DOC
Encoding:
Text File  |  1990-02-12  |  2.4 KB  |  47 lines

  1.       GRASP 3.5 -- High Level Language Examples -- January 1990
  2.  
  3. The directories beneath this one contain examples of interfaces between
  4. Grasp and programs written in Turbo Pascal (versions 3.x and 4.0), Turbo
  5. Basic (version 1.1), Turbo C (version 1.0), Microsoft and Quick C (version
  6. 5.0 and 5.1), Quick Basic (version 4.0), and Microsoft Macro Assembler
  7. (version 5.1). For each language there is a Grasp program and a program
  8. written in the appropriate language (source and compiled versions).  The
  9. programs are very simple; they're intended only to show the mechanics of
  10. the interface.
  11.  
  12. PLEASE NOTE THAT THE EXAMPLES USE CGA 4-COLOR MODE EXCLUSIVELY. If you
  13. want to use another mode (or if your system does not support CGA 4-color)
  14. you'll need to modify the code and provide your own pictures or clippings.
  15.  
  16. To run one of the examples, copy the image file Grasp.PIC from the Grasp
  17. directory to the example's subdirectory.  Then start Grasp and execute the
  18. small Grasp program.  It Executes the other language's program after three
  19. preparatory steps.
  20.  
  21. These steps are the same regardless of the language you're using.  The
  22. first step is automatic: on loading, Grasp sets up an interrupt handler
  23. for interrupt 10 function G, which the other language will use to call
  24. Grasp.
  25.  
  26. The second step is to set the video mode with the Video command.  The last
  27. step is to allocate memory for any pictures and clippings that will be
  28. loaded later, using the Pnewbuf command.
  29.  
  30. In some of the examples Pnewbuf has been given parameters telling it to
  31. set aside a buffer larger than the default screen size.  This is necessary
  32. with some languages to avoid a memory allocation error.  An alternative
  33. method is to use Microsoft's EXEMOD utility to set the Maximum Allocation
  34. field in the EXE file header to be equal to the Minimum Allocation field.
  35.  
  36. Grasp passes control to the other language's program with the Exec
  37. command. The other program can then execute one or a group of Grasp
  38. commands, by placing them in memory, setting registers, and issuing an
  39. interrupt 10 hex.
  40.     
  41. The registers must be loaded with the following values:
  42.       AH = `G' (47 hex)
  43.       CX = Length of the command string(s)
  44.       ES:DX = Segment:Offset address of the command string(s)
  45.  
  46. The string can contain any legal Grasp commands (for example, PFADE1,1).
  47. Separate commands with Carriage return-Line feed pairs.