home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1991 / 09_10 / tricks / tp3gr.mac < prev    next >
Encoding:
Text File  |  1991-06-11  |  3.0 KB  |  142 lines

  1. ;* ------------------------------------------------------- *
  2. ;*                      TP3GR.MAC                          *
  3. ;*                Konstantendeklaration                    *
  4. ;* ------------------------------------------------------- *
  5.  
  6. ;* Einsprungoffsets der Turbo Pascal 3.0 Grafikbibliothek  *
  7. ;* Werden diese Werte im Register DI der Prozedur          *
  8. ;* GRFUNCTION übergeben, wird automatisch die richtige     *
  9. ;* Grafikroutine aufgerufen.                               *
  10.  
  11. GraphMode        equ   0
  12. GraphColorMode   equ   3
  13. HiRes            equ   6
  14. HiResColor       equ   9
  15. Palette          equ  12
  16. GraphBackGround  equ  15
  17. GraphWindow      equ  18
  18. Plot             equ  21
  19. Draw             equ  24
  20. ColorTable       equ  27
  21. Arc              equ  30
  22. Circle           equ  33
  23. GetPic           equ  36
  24. PutPic           equ  39
  25. GetDotColor      equ  42
  26. FillScreen       equ  45
  27. FillShape        equ  48
  28. FillPattern      equ  51
  29. Pattern          equ  54
  30. Back             equ  57
  31. ClearScreen      equ  60
  32. ForWd            equ  63
  33. Heading          equ  66
  34. HideTurtle       equ  69
  35. Home             equ  72
  36. NoWrap           equ  75
  37. PenDown          equ  78
  38. PenUp            equ  81
  39. SetHeading       equ  84
  40. SetPenColor      equ  87
  41. SetPosition      equ  90
  42. ShowTurtle       equ  93
  43. TurnLeft         equ  96
  44. TurnRight        equ  99
  45. TurtleDelay      equ 102
  46. TurtleWindow     equ 105
  47. TurtleThere      equ 108
  48. Wrap             equ 111
  49. XCor             equ 114
  50. YCor             equ 117
  51.  
  52. ;* Macros, die den Umgang mit der Grafikbibliothek von
  53. ;* Turbo Pascal 3.0 erleichtern
  54.  
  55. PushReg macro
  56.   push ax
  57.   push bx
  58.   push cx
  59.   push dx
  60. endm
  61.  
  62. PopReg macro
  63.   pop  dx
  64.   pop  cx
  65.   pop  bx
  66.   pop  ax
  67. endm
  68.  
  69. PushAdr macro
  70.   push ds
  71.   push ax
  72. endm
  73.  
  74. ;* Nachfolgende Macros rufen entsprechende Routinen
  75. ;* der Grafikbibliothek auf.
  76. ;* Die erwarteten Parameter werden auf den Stack gelegt.
  77. ;* Beispiel:
  78. ;*    TP3_4 circle 160,100,80,2   ( zeichnet Kreis )
  79.  
  80. TP3 macro function
  81.   mov   di,function
  82.   call  grfunction
  83. endm
  84.  
  85. TP3_1 macro function,w1
  86.   mov   ax,w1
  87.   push  ax
  88.   mov   di,function
  89.   call  grfunction
  90. endm
  91.  
  92. TP3_2 macro function,w1,w2
  93.   mov   ax,w1
  94.   push  ax
  95.   mov   ax,w2
  96.   push  ax
  97.   mov   di,function
  98.   call  grfunction
  99. endm
  100.  
  101. TP3_3 macro function,w1,w2,w3
  102.   mov   ax,w1
  103.   push  ax
  104.   mov   ax,w2
  105.   push  ax
  106.   mov   ax,w3
  107.   push  ax
  108.   mov   di,function
  109.   call  grfunction
  110. endm
  111.  
  112. TP3_4 macro function,w1,w2,w3,w4
  113.   mov   ax,w1
  114.   push  ax
  115.   mov   ax,w2
  116.   push  ax
  117.   mov   ax,w3
  118.   push  ax
  119.   mov   ax,w4
  120.   push  ax
  121.   mov   di,function
  122.   call  grfunction
  123. endm
  124.  
  125. TP3_5 macro function,w1,w2,w3,w4,w5
  126.   mov   ax,w1
  127.   push  ax
  128.   mov   ax,w2
  129.   push  ax
  130.   mov   ax,w3
  131.   push  ax
  132.   mov   ax,w4
  133.   push  ax
  134.   mov   ax,w5
  135.   push  ax
  136.   mov   di,function
  137.   call  grfunction
  138. endm
  139. ;* ------------------------------------------------------- *
  140. ;*             Ende von TP3GR.MAC                          *
  141.  
  142.