home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY1 / EXAMP2.ZIP / PB062190 < prev    next >
Text File  |  1990-06-21  |  7KB  |  230 lines

  1. all
  2. H#: 52846 S12/SPECTRA Publishing
  3.     20-Jun-90  15:54:20
  4. Sb: #52648-Com Routines
  5. Fm: Eddie Menendez 73347,3407
  6. To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
  7.  
  8. Thanks for the quick reply Bob.  Now I still don't understand what you mean by
  9. "Opening withe divisor of zero to get 115,200".
  10.  
  11. Do you mean actaully putting that in the OPEN statment?  And also, do you
  12. knowof off hand when the new Com features would be implemented in PB?  It's a
  13. great program, but recently i've been doing alot of work with Com routines, and
  14. am kinda in a bind because there's no way of doing it.  And doing it with OUT
  15. would be kinda slow (I could be wrong).  Well, again thanks for the reply...
  16.  
  17.  
  18.  
  19. Press <CR> for next or type CHOICES !
  20. H#: 52684 S12/SPECTRA Publishing
  21.     19-Jun-90  18:20:13
  22. Sb: PB
  23. Fm: B Jones 76166,2542
  24. To: [F] Bob Zale 76304,1303 (X)
  25.  
  26. Bob ....
  27.  
  28.  Just a thought ... it would be nice if some (short) explanation of what was
  29. wrong with the original program could be added to the patchxx.doc files. (not
  30. just 'this was what was broken', but a 'this is what the program was doing to
  31. cause it to be broken').  Just would satisfy my curiosity if there was a little
  32. more info! :)
  33.  
  34.  Things have been working just great otherwise!  Sometimes I do get error
  35. messages that reference an incorrect line (runtime error), but normally the
  36. error is within 10 or 15 lines of where the runtime error said it was (this
  37. happens to my HUGE program files - ones with lots of $include's).  But this
  38. isn't something that worries me too much (used to happen with TB too).
  39.  
  40.  Do you have any 'expected' announcment date for the changes you are making to
  41. PB?  Will we have another upgrade fee to face? (I don't mind if it's under
  42. $50.00).  Are you able to 'pre-announce' any of the features you have added
  43. (just to make us drool)?
  44.  
  45.  Well,  keep up the good work.  Isn't it about time you took a vacation?
  46.  
  47.  Brett Jones
  48.  
  49.  
  50.  
  51. P.S. .... can you please add a 'SOUND KILL' statement for turning off the
  52. background music buffer once it's been started?  My users hate me when I make
  53. my programs play music that lasts longer than it takes for the reports to
  54. print!
  55.  
  56.  
  57.  
  58. Press <CR> for next or type CHOICES !
  59. H#: 52767 S12/SPECTRA Publishing
  60.     20-Jun-90  06:50:14
  61. Sb: LPT as COM?
  62. Fm: Eric Pearson 71641,717
  63. To: All
  64.  
  65.  I'm coming up on a PB project that will require more than two com ports.
  66.  
  67.  Would it be possible to add a third "serial port" by opening LPT2: and
  68. connecting a bi-directional, parallel-to-serial converter between the output of
  69. the parallel board and the modem?
  70.  
  71.  Also, is parallel-to-parallel communication between 2 computers possible with
  72. PB?
  73.  
  74.  -- Eric P.
  75.  
  76. Press <CR> for next or type CHOICES !
  77. H#: 52922 S12/SPECTRA Publishing
  78.     20-Jun-90  22:51:14
  79. Sb: #PB & ASM
  80. Fm: BRAD A ANDERSON 75216,614
  81. To: [F] Spectra Support 75300,214 (X)
  82.  
  83. I've been having some trouble passing string data to and from ASM using Power
  84. Basic. I seem to be having trouble accessing the data segment. I'm running 2.0b
  85. and have applied both patches. It must be something simple that I'm missing.
  86. I've included and example below. I've also tried compiling using both MASM &
  87. TASM. Hope you can help shed some light on where I've gone off course. Thanks
  88. for the help.
  89.  
  90.  
  91. ;----------------------------------------------------------------------------;DEFINT
  92. A-Z; ;DECLARE SUB Sample(INTEGER) ; ;CLS ; ;CALL Sample (MonitorBase) ; ;PRINT
  93. MonitorBase ; ;LOCATE 25,1 ;PRINT "Press any key"; ; ;100 I$=INKEY$ :IF I$=""
  94. THEN 100 ; ;END ; ;$LINK "SAMPL.OBJ"
  95. ;-----------------------------------------------------------------------------
  96.  
  97. ; I cannot access anything in the data segment. ; I have assembled the below
  98. routine with MASM 5.0 and TASM ; ; Is the data segment being defined correctly
  99. ? ; This is the only way I can create it without getting PowerBASIC Error 507:
  100.  
  101.  
  102.  
  103. DATA  SEGMENT WORD
  104. ;----------------------------------------------------------------------------;
  105.  
  106. MonBase DW      0B800h
  107.  
  108. ;----------------------------------------------------------------------------;
  109. DATA ENDS
  110.  
  111.  
  112. ;****************************************************************************;
  113. ;****************************************************************************;
  114. ;                            Program starts here                             ;
  115. ;****************************************************************************;
  116. ;****************************************************************************;
  117.  
  118.  
  119. CODE    SEGMENT BYTE
  120.         ASSUME CS:CODE, DS:DATA
  121.  
  122.         PUBLIC  Sample Sample  PROC FAR
  123.  
  124.         PUSH    BP
  125.         MOV     BP,SP
  126.  
  127.         PUSH    AX
  128.         PUSH    BX
  129.         PUSH    CX
  130.         PUSH    DX
  131.         PUSH    SI
  132.         PUSH    DI
  133.         PUSH    DS
  134.         PUSH    ES
  135.  
  136.  
  137.         MOV     AX,MonBase
  138.         MOV     SI,[BP+6]
  139.         MOV     [SI],AX
  140.  
  141.  
  142.         POP     ES
  143.         POP     DS
  144.         POP     DI
  145.         POP     SI
  146.         POP     DX
  147.         POP     CX
  148.         POP     BX
  149.         POP     AX
  150.  
  151.         POP     BP
  152.  
  153.         RETF    4
  154.  
  155. Sample  ENDP CODE    ENDS
  156.         END
  157.  
  158.  
  159.  
  160. There are 3 Replies.
  161.  
  162. Press <CR> for next or type CHOICES !
  163. H#: 52945 S12/SPECTRA Publishing
  164.     21-Jun-90  03:01:35
  165. Sb: #52922-PB & ASM
  166. Fm: B Jones 76166,2542
  167. To: BRAD A ANDERSON 75216,614
  168.  
  169. Brad,
  170.  
  171.  PB doesn't pass the string to the .asm code, it passes a two byte 'handle'
  172. which you can pass to GET$LOC (declared external and far) to return the string
  173. address in dx:ax.  So, what you would do would look something like this:
  174.  
  175.  les    di,[bp + 06h]
  176.  push   word ptr es:[di]
  177.  call   get$loc
  178.  
  179.  Now DX contains the string segment, and AX contains the offset.  For further
  180. information you can read the section 'Manipulating Strings in externally linked
  181. routines' starting on page 291 of the PowerBasic User's Manual.
  182.  
  183.  Brett Jones
  184.  
  185.  
  186.  
  187. Press <CR> for next or type CHOICES !
  188. H#: 52952 S12/SPECTRA Publishing
  189.     21-Jun-90  04:19:28
  190. Sb: #52922-PB & ASM
  191. Fm: Barry Erick for Spectra 75300,214
  192. To: BRAD A ANDERSON 75216,614
  193.  
  194.  Brett shows one way, andother way is to use the StrSeg(string) to pass the
  195. segment and StrPtr(string) to pass the offset of the string to the routine. The
  196. file "EXISTS.ZIP" in Library 12 shows the difference between how this would be
  197. done in PowerBASIC and how it would be accomplished using TurboBasic.
  198.     --- Barry
  199.  
  200.  
  201.  
  202. Press <CR> for next or type CHOICES !
  203. H#: 52966 S12/SPECTRA Publishing
  204.     21-Jun-90  06:56:30
  205. Sb: #52922-PB & ASM
  206. Fm: Bob Zale: PowerBASIC R&D 76304,1303
  207. To: BRAD A ANDERSON 75216,614
  208.  
  209. Brad--
  210.   I see you've gotten a couple of ideas on passing strings from others.
  211. However, remember that in BASIC, all DATA is initialized to ZERO at program
  212. startup.  Therefore, your DW with B800h in it will be zero'd.  You either need
  213. to initialize it explicitly, or move the DW to the CODE segment.
  214.   Bob Zale (PowerBASIC R&D)
  215.  
  216. Press <CR> for next or type CHOICES !
  217. HPC Vendor B ForumHSections Menu
  218.  
  219. Section names (#subjs/# msgs)
  220.  1 Quarterdeck  (62/122)
  221.  3 Korenthal Assocs.  (2/4)
  222.  4 Personics Corp.  (11/22)
  223.  5 Quicksoft  (2/3)
  224.  6 TurboPower Software  (38/108)
  225.  7 ChipSoft, Inc.  (1/5)
  226.  8 DacEasy  (3/4)
  227. 10 J.P. Software  (9/20)
  228. 11 PDC Prolog  (2/6)
  229. 12 SPECTRA Publishing  (4/7)
  230. HEnter choice(s) or ALL !