--------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD300009 Date: 09/02/96 From: LAWRENCE GORDON Time: 11:37am \/To: SANDER SMEENK (Read 5 times) Subj: FossilRoutines Quoting Sander Smeenk to Ronald Schlegel: SS> BNU Version 1.70... SS> If you could help me, i'll be most thankfull. Here are some routines for X00 that you might find helpful, Sander: An X00 Fossil Driver-SUB to use Ray Gwinn's X00 >= Version 1.54 under Power Basic. sub X00initializedriver (X00PORT) 'X00 initialisieren AX = &h1C00 :' Initialize driver ' Parameters: ' Entry: DX = port number DX = x00port -1 reg 1, AX reg 4, DX call interrupt &h14 AX = reg(1) if AX<>&H1954 then print "Fossil driver not found !":beep:end REM sound 1000,.5 rem sound 2000,1 end sub sub X00deinitializedriver (X00PORT) 'X00 Deinitialisieren AX = &h1d00:' Deinitialize driver DX = X00PORT - 1 ' Exit: None reg 1, ax reg 4, dx call interrupt &h14 rem sound 2000,.5 rem sound 1000,2 end sub sub X00baudrate (X00PORT,X00BAUD) 'X00 Baudrate setzen Ah = &h1E :' Initialize driver setze baudrate ' Parameters: ' Entry: DX = port number DX = x00port -1 al= 00 : rem kein Break = 00 - Break = 01 bh= 00 : rem 00 = no parity rem 01 = ODD rem 02 = EVEN rem 03 = Mark rem 04 = Space bl= 00 : rem 00 = one stop bit rem 01 = two stop bit ch= 03 : rem 00 = 5 daten bit rem 01 = 6 rem 02 = 7 rem 03 = 8 if x00baud=115200 then cl=&h84 if x00baud=57600 then cl=&h82 if x00baud=38400 then cl=&h81 if x00baud=28800 then cl=&h80 if x00baud=19200 then cl=&h08 if x00baud= 9600 then cl=&h07 if x00baud= 4800 then cl=&h06 if x00baud= 2400 then cl=&h05 if x00baud= 1200 then cl=&h04 if x00baud= 0 then cl=&hFF ax=al+(ah*256) bx=bl+(bh*256) cx=cl+(ch*256) reg 1, AX reg 2, BX reg 3, CX call interrupt &h14 rem sound 1000,.5 rem sound 2000,.5 rem sound 3000,.5 end sub sub X00CTSINIT (X00PORT,X00CTS) 'X00CTS/RTS XON/XOFF AH = &h0f :' Initialize driver ' Parameters: ' Entry: DX = port number DX = x00port -1 if x00cts=0 then al=&B11110100 :' alles aus if x00cts=1 then al=&B11110101 :' Xon/Xoff senden if x00cts=2 then al=&B11110110 :' CTS/RTS on if x00cts=3 then al=&B11110111 :' Xon/Xoff senden + CTS/RTS if x00cts=4 then al=&B11111100 :' Xon/Xoff empfang if x00cts=5 then al=&B11111101 :' Xon/Xoff empfang + senden if x00cts=6 then al=&B11111110 :' Xon/Xoff empfang + CTS/RTS if x00cts=7 then al=&B11111111 :' Xon/Xoff emfang + senden + CTS/RTS ax=256*ah+al reg 1, ax reg 4, DX call interrupt &h14 end sub sub X00watchdog (X00PORT,x00watch) 'X00 Watchdog steuern AH = &h14 :' Initialize driver ' Parameters: ' Entry: DX = port number DX = x00port -1 al=x00watch:' 0 = watchdog off ' 1 = watchdog on ax=256*ah+al reg 1, ax reg 4, DX call interrupt &h14 end sub sub X00send (X00PORT,a$) 'X00 Datenstring senden txit$=a$ txstart=1 maxtx=len(txit$) AH = &h19 :' Initialize driver do until txstart > maxtx txnow$ = mid$(txit$,txstart) offset = strptr(txnow$) segment = strseg(txnow$) ES=segment DI=offset cx=len(txnow$) ' Parameters: ' Entry: DX = port number DX = x00port -1 al=0:' 0 = watchdog off ' 1 = watchdog on ax=256*ah+al reg 1, ax reg 4, DX reg 3, CX reg 9, ES reg 6, DI call interrupt &h14 txstart = txstart + reg(1) loop end sub function x00cd% (x00port) public 'X00 Status Variable setzen 'Carrier Detect CHECK AH = &h03 :' Initialize driver al = 0 ' Parameters: ' Entry: DX = port number DX = x00port -1 ax=256*ah+al reg 1, ax reg 4, DX call interrupt &h14 x00CD% = int((reg (1) and 128)/128) end function function x00outroom% (x00port) public 'X00 Status Variable setzen 'OUTROOM in Buffer AH = &h03 :' Initialize driver al = 0 ' Parameters: ' Entry: DX = port number DX = x00port -1 ax=256*ah+al reg 1, ax reg 4, DX call interrupt &h14 ax=reg(1) ah= int(ax/256) x00outroom% =int((ah and 64)/64) end function function x00instat% (x00port) public 'X00 Status Variable setzen 'Is anything in COM-Buffer? AH = &h03 :' Initialize driver al = 0 ' Parameters: ' Entry: DX = port number DX = x00port -1 ax=256*ah+al reg 1, ax reg 4, DX call interrupt &h14 ax=reg(1) ah= int(ax/256) x00instat%=int((ah and 1)/1) end function sub X00dtr (X00PORT,x00dummy%) 'X00 DTR setzen Lschen AH = &h06 :' Initialize driver ' Parameters: ' Entry: DX = port number DX = x00port -1 al= x00dummy%:' 0 = watchdog off ' 1 = watchdog on ax=256*ah+al reg 1, ax reg 4, DX call interrupt &h14 end sub sub X00reboot () 'X00 Rechner Rebooten AH = &h17 :' Initialize driver ' Parameters: al=0 ax=256*ah+al reg 1, ax call interrupt &h14 end sub sub X00receive (X00PORT,x$) 'X00 Datenstring empfangen x$=space$(1) offset = strptr(x$) segment = strseg(x$) AH = &h18 :' Initialize driver ES=segment DI=offset cx=1 ' Parameters: ' Entry: DX = port number DX = x00port -1 al=0 ax=256*ah+al reg 1, ax reg 4, DX reg 3, CX reg 9, ES reg 6, DI call interrupt &h14 ax=reg(1) if ax =0 then x$="" end sub sub X00clroutbuffer (x00port) 'X00 Rechner clear output buffer AH = &h09 :' Initialize driver dx =x00port-1 ' Parameters: al=0 ax=256*ah+al reg 1, ax reg 4, dx call interrupt &h14 end sub sub X00clrinbuffer (x00port) 'X00 Rechner clear input buffer AX = &h0A00 :' Initialize driver dx =x00port-1 ' Parameters: reg 1, ax reg 4, dx call interrupt &h14 end sub * WCE 2.1G1/2081 * --- InterEcho 1.19 * Origin: Toast House * (314) 994-0312 * (1:100/560) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD300010 Date: 08/29/96 From: MARCEL VELDHUIZEN Time: 10:39pm \/To: MARK BERGSMA (Read 5 times) Subj: String constants Hi Mark Bergsma, hope you are having a nice day 26-Aug-96 19:35:50, Mark Bergsma wrote to Marcel Veldhuizen Subject: String constants MB> Yes, it is. Every expression which is not a variable (and doesn't contain MB> one) is a constant. MB> You probably mean integer constants like: MB> %False = 0: %True = NOT %False MB> Those are constants too. It's a bit confusing... Hmm, but A$ is still not a constant... It can still be altered and constants can't be altered, that's why they are called constants .. >>> Marcel Veldhuizen <<<<<<<< Fido USA (2:2802/337.0) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD300011 Date: 09/03/96 From: ROBERT KOHL Time: 01:43am \/To: ALL (Read 5 times) Subj: Is Power Basic's FirstBasic off topic he01:43:3809/03/96 I just downloaded a copy of First Basic, the shareware compiler from Power Basic. Mr. Moderator, is this considered off topic? Thank you for time, Bob Kohl - Rio Rancho, NM, Monday, 2 September 1996 at 21:45. Fido : 1:301/1701 - Internet : bobakohl@abq-ros.com --- FMailX 1.02 * Origin: The Gate: Rio Rancho, New Mexico (505) 896-2419 (1:301/1701) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD300012 Date: 09/02/96 From: RONALD SCHLEGEL Time: 09:13am \/To: LAWRENCE GORDON (Read 5 times) Subj: Greetings LG> The PB run-time library tends to make smaller compiled programs a LG> little larger than the same code compiled in MS BASIC, but the size LG> differential disappears with larger programs. PMFBI, I _hope_ I didn't miss your point, here. More times than not, I run PKLite on my PowerBASIC *.EXEs & that definitely decreases the size of the program with no loss in performance. :) -Ron * RM 1.3 03129 * Unnatural vices are fathered by our heroism. --Eliot. --- TriToss (tm) Professional 10.0 - #229 * Origin: * Dynasty BBS * The home of Dungeon Software * (1:110/1065.0) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD500000 Date: 09/03/96 From: LAWRENCE GORDON Time: 09:04am \/To: RONALD SCHLEGEL (Read 5 times) Subj: Multiple COMMAND$ params. On 08-31-96, Ronald Schlegel wrote to All: RS> Hello, RS> Does anyone know how to pass more than 1 variable to COMMAND$? I RS> am trying to trap DOS environment variables...here is my example: RS> TEST.BAT RS> -------- RS> UPLOAD %1 %2 RS> The program reads the %1 fine, but never sees the %2. The program RS> that will pass the %1 & %2, passes the filename as %1 and the RS> file-extention as %2. I've got other programs that I need to pass RS> multiple parameters to (ie. "TEST 1 3 OUTPUT.TXT"), but can on RS> figure how to pass 1 of the parameters...the first one. DEFINT A-Z TEST$ = COMMAND$ NumberOfWords? = DimParse(Test$) IF NumberOfWords? <> 2 GOTO FOOBAR DIM Words$(NumberOfWords?) FOR I = 1 TO NumberOfWords? Words$(I) = Parse(Test$) NEXT VAR1$ = Words$(1) VAR2$ = Words$(2) 'VAR3$ = Words$(3) 'VAR4$ = Words$(4) 'etc PRINT VAR1$ PRINT VAR2$ 'PRINT VAR3$ 'PRINT VAR4$ 'etc Foobar: PRINT PRINT "Usage: PROGRAM %1 %2 PRINT END FUNCTION DimParse% (TIn$) STATIC TIn$ = RTRIM$(LTRIM$(TIn$)) Parses = 0 Length = LEN(TIn$) IF Length = 0 THEN DimParse% = 0 EXIT FUNCTION END IF FOR I = 1 TO Length IF MID$(TIn$, I, 1) = " " THEN Parses = Parses + 1 NEXT I DimParse% = Parses + 1 END FUNCTION FUNCTION Parse$ (TIn$) STATIC ParseAt%, Length IF ParseAt% = 0 THEN ParseAt% = 1 Length = LEN(TIn$) END IF IF Length = 0 OR ParseAt% > Length THEN EXIT FUNCTION Offset% = INSTR(ParseAt%, TIn$, " ") IF Offset% = 0 THEN Offset% = Length + 1 Parse$ = MID$(TIn$, ParseAt%, Offset% - ParseAt%) ParseAt% = Offset% + 1 IF ParseAt% = Length + 2 THEN ParseAt% = 0 END FUNCTION --- GEcho 1.20/Pro * Origin: Toast House Remote (1:100/560.1) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD500001 Date: 08/31/96 From: MARCEL VELDHUIZEN Time: 01:53pm \/To: LAWRENCE GORDON (Read 5 times) Subj: Temporary Moderator Hi Lawrence Gordon, hope you are having a nice day 29-Aug-96 09:21:03, Lawrence Gordon wrote to Bob Dunnell Subject: Temporary Moderator LG> Thanks for acting as moderator for me, Bob. I'm back now. TriBBS software LG> and Mark Goodwin are off topic in this conference. :-)))) I know this is off-topic too, but, should I mention my Fido-address in my Origin or something? Right now, you can't even netmail me when I'm off-topic... >>> Marcel Veldhuizen <<<<<<<< Fido USA (2:2802/337.0) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD500002 Date: 09/04/96 From: LAWRENCE GORDON Time: 07:07pm \/To: MARCEL VELDHUIZEN (Read 5 times) Subj: Temporary Moderator Quoting Marcel Veldhuizen to Lawrence Gordon: LG> Thanks for acting as moderator for me, Bob. I'm back now. TriBBS oftware LG> and Mark Goodwin are off topic in this conference. MV> :-)))) Just a little moderator humor. :) MV> I know this is off-topic too, but, should I mention my Fido-address in MV> my Origin or something? Right now, you can't even netmail me when I'm MV> off-topic... Thanks for your address, Marcel. I just love spending my money to send moderator netmail messages overseas. :^) * WCE 2.1G1/2081 * --- InterEcho 1.19 * Origin: Toast House * (314) 994-0312 * (1:100/560) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD500003 Date: 09/04/96 From: LAWRENCE GORDON Time: 08:27pm \/To: ROBERT KOHL (Read 5 times) Subj: Is Power Basic's FirstBasic off topic he20:27:0009/04/96 On 09-03-96, Robert Kohl wrote to All: RK> I just downloaded a copy of First Basic, the shareware compiler from RK> Power Basic. Mr. Moderator, is this considered off topic? RK> Thank you for time, First Basic is the shareware version of PowerBASIC v2.1 and, therefore, is on topic in this conference. The Moderator --- FMail 1.20 * Origin: Toast House Remote (1:100/560.1) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DD500004 Date: 09/04/96 From: LAWRENCE GORDON Time: 08:29pm \/To: RONALD SCHLEGEL (Read 5 times) Subj: Greetings On 09-02-96, Ronald Schlegel wrote to Lawrence Gordon: LG> The PB run-time library tends to make smaller compiled programs a LG> little larger than the same code compiled in MS BASIC, but the size LG> differential disappears with larger programs. RS> PMFBI, I _hope_ I didn't miss your point, here. More times than RS> not, I run PKLite on my PowerBASIC *.EXEs & that definitely RS> decreases the size of the program with no loss in performance. :) PKLite is a good executable compression program. I use the freeware Diet program. PB executables compress very well. --- FMail 1.20 * Origin: Toast House Remote (1:100/560.1) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: DDA00000 Date: 09/03/96 From: WAYNE ZIMMERLE Time: 06:50pm \/To: ALL (Read 5 times) Subj: Compiling question 1/2 'I've cropped this down as much as possible to illustrate 'my problem. Why does this compile fine with x = (DtaSize) 'in the code or references to (DtaTime) or (DtaDate) 'But when they are commented out It won't compile because 'SplitDate is an undefined sub 'I've also gotten parameter mismatch error on SplitDate 'I wish that when you got that error the IDE would show 'what it expected 'My main problem is I made the calender part for one program 'and it worked fine but when I went to transfer the calender 'subroutine to another program all of a sudden I can't compile 'it. Someone educate me on what I'm doing wrong or not 'understanding. Thanks $INCLUDE "c:\lib\PB32.INC" ' link PB32 library 'x = (DtaSize) 'print (DtaTime); 'print (DtaDate); defint A-Z esc$ = CHR$(27) up$ = CHR$(0) + chr$(72) : down$ = CHR$(0) + chr$(80) goleft$ = CHR$(0) + chr$(75) : goright$ = CHR$(0) + chr$(77) pagedown$ = CHR$(0) + chr$(81) : pageup$ = CHR$(0) + chr$(73) goend$ = CHR$(0) + chr$(79) : gohome$ = CHR$(0) + chr$(71) usedate$ = date$ SplitDate usedate$, orgMonth,orgDay,orgYear 'gets seperate values for date monthswitchpoint: color 15,1 cls print" [ F1 = Help ] [ ESC = EXI print" +----------+---------+---------+---------+---------+---------+-------- print" | | | | | | | print" | | | | | | | print" +----------+---------+---------+---------+---------+---------+-------- print" | | | | | | | print" | | | | | | | print" +----------+---------+---------+---------+---------+---------+-------- print" | | | | | | | print" | | | | | | | print" +----------+---------+---------+---------+---------+---------+-------- print" | | | | | | | print" | | | | | | | print" +----------+---------+---------+---------+---------+---------+-------- print" | | | | | | | print" | | | | | | | print" +----------+---------+---------+---------+---------+---------+-------- print" | | | | | | | print" | | | | | | | print" +----------+---------+---------+---------+---------+---------+-------- print" | | | [ TIME ] USE THE KEYS BELOW TO CHANGE print" | | | CALENDERS print"