home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
BASIC
/
POWBASIC
/
LIBRARY1
/
EXAMP2.ZIP
/
PB062190
< prev
next >
Wrap
Text File
|
1990-06-21
|
7KB
|
230 lines
all
H#: 52846 S12/SPECTRA Publishing
20-Jun-90 15:54:20
Sb: #52648-Com Routines
Fm: Eddie Menendez 73347,3407
To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
Thanks for the quick reply Bob. Now I still don't understand what you mean by
"Opening withe divisor of zero to get 115,200".
Do you mean actaully putting that in the OPEN statment? And also, do you
knowof off hand when the new Com features would be implemented in PB? It's a
great program, but recently i've been doing alot of work with Com routines, and
am kinda in a bind because there's no way of doing it. And doing it with OUT
would be kinda slow (I could be wrong). Well, again thanks for the reply...
Press <CR> for next or type CHOICES !
H#: 52684 S12/SPECTRA Publishing
19-Jun-90 18:20:13
Sb: PB
Fm: B Jones 76166,2542
To: [F] Bob Zale 76304,1303 (X)
Bob ....
Just a thought ... it would be nice if some (short) explanation of what was
wrong with the original program could be added to the patchxx.doc files. (not
just 'this was what was broken', but a 'this is what the program was doing to
cause it to be broken'). Just would satisfy my curiosity if there was a little
more info! :)
Things have been working just great otherwise! Sometimes I do get error
messages that reference an incorrect line (runtime error), but normally the
error is within 10 or 15 lines of where the runtime error said it was (this
happens to my HUGE program files - ones with lots of $include's). But this
isn't something that worries me too much (used to happen with TB too).
Do you have any 'expected' announcment date for the changes you are making to
PB? Will we have another upgrade fee to face? (I don't mind if it's under
$50.00). Are you able to 'pre-announce' any of the features you have added
(just to make us drool)?
Well, keep up the good work. Isn't it about time you took a vacation?
Brett Jones
P.S. .... can you please add a 'SOUND KILL' statement for turning off the
background music buffer once it's been started? My users hate me when I make
my programs play music that lasts longer than it takes for the reports to
print!
Press <CR> for next or type CHOICES !
H#: 52767 S12/SPECTRA Publishing
20-Jun-90 06:50:14
Sb: LPT as COM?
Fm: Eric Pearson 71641,717
To: All
I'm coming up on a PB project that will require more than two com ports.
Would it be possible to add a third "serial port" by opening LPT2: and
connecting a bi-directional, parallel-to-serial converter between the output of
the parallel board and the modem?
Also, is parallel-to-parallel communication between 2 computers possible with
PB?
-- Eric P.
Press <CR> for next or type CHOICES !
H#: 52922 S12/SPECTRA Publishing
20-Jun-90 22:51:14
Sb: #PB & ASM
Fm: BRAD A ANDERSON 75216,614
To: [F] Spectra Support 75300,214 (X)
I've been having some trouble passing string data to and from ASM using Power
Basic. I seem to be having trouble accessing the data segment. I'm running 2.0b
and have applied both patches. It must be something simple that I'm missing.
I've included and example below. I've also tried compiling using both MASM &
TASM. Hope you can help shed some light on where I've gone off course. Thanks
for the help.
;----------------------------------------------------------------------------;DEFINT
A-Z; ;DECLARE SUB Sample(INTEGER) ; ;CLS ; ;CALL Sample (MonitorBase) ; ;PRINT
MonitorBase ; ;LOCATE 25,1 ;PRINT "Press any key"; ; ;100 I$=INKEY$ :IF I$=""
THEN 100 ; ;END ; ;$LINK "SAMPL.OBJ"
;-----------------------------------------------------------------------------
; I cannot access anything in the data segment. ; I have assembled the below
routine with MASM 5.0 and TASM ; ; Is the data segment being defined correctly
? ; This is the only way I can create it without getting PowerBASIC Error 507:
DATA SEGMENT WORD
;----------------------------------------------------------------------------;
MonBase DW 0B800h
;----------------------------------------------------------------------------;
DATA ENDS
;****************************************************************************;
;****************************************************************************;
; Program starts here ;
;****************************************************************************;
;****************************************************************************;
CODE SEGMENT BYTE
ASSUME CS:CODE, DS:DATA
PUBLIC Sample Sample PROC FAR
PUSH BP
MOV BP,SP
PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH SI
PUSH DI
PUSH DS
PUSH ES
MOV AX,MonBase
MOV SI,[BP+6]
MOV [SI],AX
POP ES
POP DS
POP DI
POP SI
POP DX
POP CX
POP BX
POP AX
POP BP
RETF 4
Sample ENDP CODE ENDS
END
There are 3 Replies.
Press <CR> for next or type CHOICES !
H#: 52945 S12/SPECTRA Publishing
21-Jun-90 03:01:35
Sb: #52922-PB & ASM
Fm: B Jones 76166,2542
To: BRAD A ANDERSON 75216,614
Brad,
PB doesn't pass the string to the .asm code, it passes a two byte 'handle'
which you can pass to GET$LOC (declared external and far) to return the string
address in dx:ax. So, what you would do would look something like this:
les di,[bp + 06h]
push word ptr es:[di]
call get$loc
Now DX contains the string segment, and AX contains the offset. For further
information you can read the section 'Manipulating Strings in externally linked
routines' starting on page 291 of the PowerBasic User's Manual.
Brett Jones
Press <CR> for next or type CHOICES !
H#: 52952 S12/SPECTRA Publishing
21-Jun-90 04:19:28
Sb: #52922-PB & ASM
Fm: Barry Erick for Spectra 75300,214
To: BRAD A ANDERSON 75216,614
Brett shows one way, andother way is to use the StrSeg(string) to pass the
segment and StrPtr(string) to pass the offset of the string to the routine. The
file "EXISTS.ZIP" in Library 12 shows the difference between how this would be
done in PowerBASIC and how it would be accomplished using TurboBasic.
--- Barry
Press <CR> for next or type CHOICES !
H#: 52966 S12/SPECTRA Publishing
21-Jun-90 06:56:30
Sb: #52922-PB & ASM
Fm: Bob Zale: PowerBASIC R&D 76304,1303
To: BRAD A ANDERSON 75216,614
Brad--
I see you've gotten a couple of ideas on passing strings from others.
However, remember that in BASIC, all DATA is initialized to ZERO at program
startup. Therefore, your DW with B800h in it will be zero'd. You either need
to initialize it explicitly, or move the DW to the CODE segment.
Bob Zale (PowerBASIC R&D)
Press <CR> for next or type CHOICES !
HPC Vendor B ForumHSections Menu
Section names (#subjs/# msgs)
1 Quarterdeck (62/122)
3 Korenthal Assocs. (2/4)
4 Personics Corp. (11/22)
5 Quicksoft (2/3)
6 TurboPower Software (38/108)
7 ChipSoft, Inc. (1/5)
8 DacEasy (3/4)
10 J.P. Software (9/20)
11 PDC Prolog (2/6)
12 SPECTRA Publishing (4/7)
HEnter choice(s) or ALL !