home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY1 / EXAMP2.ZIP / PB071690 < prev    next >
Text File  |  1990-07-12  |  5KB  |  119 lines

  1. 2-5
  2. H#: 56271 S12/SPECTRA Publishing
  3.     12-Jul-90  16:21:00
  4. Sb: GET graphics bug
  5. Fm: Kurt Inman (PowerBASIC) 71141,2330
  6. To: ALL
  7.  
  8. We have confirmed an error in the PowerBASIC Reference Guide concerning the
  9. formula used to determine the size of an array required for a GET graphics
  10. statement.  Internally, the current version of PowerBASIC uses the same
  11. incorrect formula.  This frequently results in too small of a data area to hold
  12. the graphics image, which may cause serious side effects. Please change page
  13. 133 in your manual as follows:
  14.  
  15. The correct formula is:
  16.  
  17. # of bytes required = 4 + INT((X * BitsPerPixelPerPlane + 7) / 8) *
  18.                       Planes * Y
  19.  
  20. where X is the horizontal image length, Y is the vertical image length, and
  21. BitsPerPixelPerPlane and Planes depend on the screen mode selected:
  22.  
  23. Screen mode    BitsPerPixelPerPlane    Planes -----------   
  24. --------------------    ------
  25.     1                  2                 1
  26.     2                  1                 1
  27.     3                  1                 1
  28.     7                  1                 4
  29.     8                  1                 4
  30.     9                  1                 4
  31.     10                 1                 2
  32.     11                 1                 1
  33.     12                 1                 4
  34.  
  35.  
  36. Kurt Inman PowerBASIC R&D
  37.  
  38. Press <CR> for next or type CHOICES !
  39. H#: 56272 S12/SPECTRA Publishing
  40.     12-Jul-90  16:23:04
  41. Sb: Calling PB SUBs from ASM
  42. Fm: Kurt Inman (PowerBASIC) 71141,2330
  43. To: ALL
  44.  
  45. As described on pages 290-291 of the Users Manual, PowerBASIC SUBs and
  46. FUNCTIONs may be called from assembler routines which are $LINKed into your
  47. programs.  The manual fails to point out, however, that when a SUB or FUNCTION
  48. is called, it may alter the contents of the AX, BX, CX, DX, SI, DI, and ES
  49. registers.  If your assembler routine expects the contents of any of these
  50. registers to remain constant, both before and after a PowerBASIC routine is
  51. called, you must save the appropriate registers before performing the call and
  52. restore them afterwards.  Also, prior to calling a PowerBASIC routine, the DS
  53. register must contain the same value that it had when your assembler routine
  54. was invoked (PowerBASIC's main data segment).
  55.  
  56.  
  57. Kurt Inman PowerBASIC R&D
  58.  
  59. Press <CR> for next or type CHOICES !
  60. H#: 56586 S12/SPECTRA Publishing
  61.     15-Jul-90  14:37:35
  62. Sb: #COM3/COM4
  63. Fm: Bob Zale: PowerBASIC R&D 76304,1303
  64. To: ALL
  65.  
  66. Help ? ?    Who is an expert on COM3 and COM4 implementations?  We know that
  67. frequently they share IRQ3 and IRQ4 with COM1 and COM2, but that prevents
  68. simultaneous serial i/o on COM1/COM3 and COM2/COM4.  It seems likely that some
  69. implementations would utilize the slave interrupt controller (IRQ9,10,etc.) to
  70. avoid this problem.  Who has the answers? We would REALLY APPRECIATE hearing
  71. from you!  Thanks!
  72.   Bob Zale (PowerBASIC R&D)
  73.  
  74. There is 1 Reply.
  75.  
  76. Press <CR> for next or type CHOICES !
  77. H#: 56623 S12/SPECTRA Publishing
  78.     15-Jul-90  23:15:35
  79. Sb: #56586-COM3/COM4
  80. Fm: David A.J. Wedell 70215,151
  81. To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
  82.  
  83. I'm no expert, but I do know that since most I/O cards are 8-bit, they can't
  84. use IRQ's 9-15.  However, you might consider talking with the Novell forum
  85. (NOVA), their NetWare 386 can communicate with LPT1-3, and COM1-4 for 7
  86. printers AT THE SAME TIME, and they don't use the Interrupts.  I don't know if
  87. that helps, but it certainly dosen't hurt.
  88.  
  89. David Wedell 70215,151
  90.  
  91.  
  92.  
  93. Press <CR> for next or type CHOICES !
  94. H#: 56659 S12/SPECTRA Publishing
  95.     16-Jul-90  07:52:59
  96. Sb: put,get arrays
  97. Fm: John Gessner 71131,3256
  98. To: all
  99.  
  100. Thanks for the help on the array corrupting while getting and putting. Here is
  101. a suggestion:  I would like to be able to get into a multidemensional array to
  102. make it easier to do selective putting.  For instance:  I have the picture of
  103. the six sides of a die.  It would be nice to do DIM DIE( 6 , 420 ) and then get
  104. each picture into a separate demension.  Then it is easy to roll the die and
  105. PUT DIE(1), DIE(2) and so on.  Without that I have to go through a small bit of
  106. extra code to put the right array.  Just a suggestion.
  107.  
  108. Press <CR> for next or type CHOICES !
  109. HPC Vendor B ForumHSubjects Menu
  110.  
  111. Subject (# msgs)
  112.  
  113. Section 12 - SPECTRA Publishing
  114.  1 Suggestion for PB  (3)
  115.  2 GET graphics bug  (1)
  116.  3 Calling PB SUBs from ASM  (1)
  117.  4 COM3/COM4  (2)
  118.  5 put,get arrays  (1)
  119. HEnter choice(s) !