Sirald@cup.portal.com (Andrew Lionel Dalrymple) (07/14/89)
[HELP NEEDED]: Sending DOS commands after changing modes... ____________________________________________________________ Having a curious problem here that has cropped up more than once in the past I'm sure. It's called doing something prior in a program you've written that unintent- ionally locks out access to DOS commands. What I have writ- ten here is a text-mode changing program for the LASER 128 computer. It uses combinations of Open-Apple (LA) and the Closed-Apple (RA) keys to dertermine what you want it to do. In this case, any of the four states doesn't appear to mat- ter. All that matters is that I moved from 40col to 80col, and the program some how has blocked DOS access. Even if I put the 'RECONNECT DOS 3.3' call (40383) into the program right before the BRUN command, the call quitely ends the programs run. Below is a copy of the program. I don't know if other Apple 2 systems have this feature or not, but the ON/OFF, C025/C024, X=PEEK 49189/49188, does interlace - ie. (DOUBLE-HIRES) text. A bit blury for high-persistant mon- itors, but better with low-persistance and a polarized glare guard. I would be most appreciative if someone has an idea as to why CTRL-D commands are ignored, but RUN, LIST, and the others are intact. Cordially, A. DALRYMPLE sirald@cup.portal.com sun!portal!cup.portal.com!sirald ____________________________________________________________ 300 HOME 400 LA = PEEK ( - 16287):RA = PEEK ( - 16286) 500 IF LA > 160 AND RA > 160 THEN GOTO 1500: REM INTERLACE/INVERSE 600 IF LA < 160 AND RA > 160 THEN GOTO 1600: REM INTERLACE/NORMAL 700 IF LA > 160 AND RA < 160 THEN GOTO 1700: REM PLAIN/INVERSE 800 IF LA < 160 AND RA < 160 THEN GOTO 1800: REM PLAIN/NORMAL 1500 PR# 3:X = PEEK (49189): PRINT CHR$ (15): HOME : PRINT : PRINT 1501 PRINT "INTERLACED text and INVERSE background." 1502 GOTO 9999 1600 PR# 3:X = PEEK (49189): PRINT CHR$ (14): HOME : PRINT : PRINT 1601 PRINT "INTERLACED text and NORMAL background." 1602 GOTO 9999 1700 PR# 3:X = PEEK (49188): PRINT CHR$ (15): HOME : PRINT : PRINT 1701 PRINT "PLAIN text and INVERSE background." 1702 GOTO 9999 1800 PR# 3:X = PEEK (49188): PRINT CHR$ (14): HOME : PRINT : PRINT 1801 PRINT "PLAIN text and NORMAL background." 9999 PRINT CHR$ (4)"BRUN AE" ____________________________________________________________
IRPGMR7@OUACCVMB.BITNET (07/15/89)
Andrew, Just finished checking those lines you gave... I don't know if this helps or not (on a //e & //gs, it does), but try using a PRINT CHR$(4)"PR#3" instead of just PR#3. The command PR#_ affects DOS and I believe is a DOS Command as far as my ancient Applesoft, Dos 3.3, and ProDOS knowledge goes. Hope it helps.... David William Wrage a.k.a. The Frenchman 'I don't have a nifty saying yet, but I'll think of one.....' US Mail: Userid: 134 East Beechwood Estates IRPGMR7@OUACCVMB.BITNET Athens, Ohio 45701 United States of America
fitzpatrick@obsess.dec.com (Dave FitzPatrick) (07/15/89)
In article <20399@cup.portal.com>, Sirald@cup.portal.com (Andrew Lionel Dalrymple) writes... >[HELP NEEDED]: Sending DOS commands after changing modes... > > 1700 PR# 3:X = PEEK (49188): PRINT CHR$ (15): HOME : PRINT : PRINT > 1701 PRINT "PLAIN text and INVERSE background." > 1702 GOTO 9999 > 1800 PR# 3:X = PEEK (49188): PRINT CHR$ (14): HOME : PRINT : PRINT > 1801 PRINT "PLAIN text and NORMAL background." > 9999 PRINT CHR$ (4)"BRUN AE" Your use of PR#3 is incorrect. You are using the Applesoft command, when you should be issuing it as a DOS command. IE: 1700 PRINT CHR$(4) "PR#3" This way DOS will not be disconnected and things will work as expected -- Dave FitzPatrick (UUCP) {decvax, ucbvax, allegra}!decwrl!obsess.dec.com!fitzpatrick (Internet) fitzpatrick%obsess.DEC@decwrl.ARPA (BITNET) fitzpatrick@obsess.dec.com (BIX) dave.f (co-moderator of the 'television' conference) (US MAIL) DEC, 77 Reed Rd. MS: HLO2-1/E11, Hudson, MA 01749
rich@pro-exchange.cts.com (Rich Sims) (07/15/89)
Comment to message from: pnet01!crash!uunet.uu.net!portal!cup.portal.com!Sirald (Andrew Lionel Dalrymple) > I would be most appreciative if someone has an idea > as to why CTRL-D commands are ignored, but RUN, LIST, and > the others are intact. The CTRL-D commands are =DOS= commands, RUN, LIST, (and, presumably, the 'others' you speak of) are APPLESOFT commands. Applesoft is active, but you're disconnecting DOS 4 times in the code you posted. > 1500 PR# 3:X = PEEK (49189): PRINT CHR$ (15): HOME : PRINT : PRINT > 1600 PR# 3:X = PEEK (49189): PRINT CHR$ (14): HOME : PRINT : PRINT > 1700 PR# 3:X = PEEK (49188): PRINT CHR$ (15): HOME : PRINT : PRINT > 1800 PR# 3:X = PEEK (49188): PRINT CHR$ (14): HOME : PRINT : PRINT > 9999 PRINT CHR$ (4)"BRUN AE" Try using... PRINT CHR$(4)"PR#3" instead of just... PR# 3 UUCP: crash!pro-exchange!rich ARPA: crash!pro-exchange!rich@nosc.mil INET: rich@pro-exchange.cts.com
dseah@wpi.wpi.edu (David I Seah) (07/16/89)
In article <20399@cup.portal.com> Sirald@cup.portal.com (Andrew Lionel Dalrymple) writes: [STUFF DELETED] >In this case, any of the four states doesn't appear to mat- >ter. All that matters is that I moved from 40col to 80col, >and the program some how has blocked DOS access. Even if I >put the 'RECONNECT DOS 3.3' call (40383) into the program >right before the BRUN command, the call quitely ends the >programs run. > > I would be most appreciative if someone has an idea >as to why CTRL-D commands are ignored, but RUN, LIST, and >the others are intact. I almost *always* make this mistake every time I turn on the 80 column mode. You have to turn on the 80 column card with a PRINT CHR$(4)"PR#3", not just "PR#3". The PR#n command gives control to slot n, which also ends up taking away DOS's control of the system. DOS monitors character input and output from the "console" (slot 0) consisting of textscreen & keyboard. By issuing the PR#3 command, you change I/O "hooks" that DOS has set to intercept and monitor the world, and DOS gets disconnected. Since people like to use slots, DOS can "fake" the PR#n and IN#n Applesoft commands while keeping control of the console itself. Incidentally, the term "console" here is probably only valid for the DOS 3.3 / Applesoft environment. So just change lines 1500,1600,1700,and 1800 example: 1500 PR# 3:X = PEEK (49189): PRINT CHR$ (15): HOME : PRINT : PRINT becomes ... 1500 PRINT CHR$(4)"PR#3":X=PEEK(49189):PRINT CHR$(15):HOME:PRINT:PRINT ^^^^^^^^^^^^^^^^^^^ Dave Seah | O M N I D Y N E S Y S T E M S - M | Internet: dseah@wpi.wpi.edu | "User Friendly Killing Machines" | AlinkPE: AFC DaveS | A Division of SLO, International | Bitnet: dseah@wpi.bitnet
matthew@sunpix.UUCP ( Sun Visualization Products) (07/16/89)
[Request for help with Applesoft program running under DOS deleted] Rule #1: Never use the Applesoft or Integer BASIC commands 'PR#' or 'IN#' in a BASIC program running under DOS 3.2, DOS 3.3 or ProDOS. These commands are available as DOS commands, that will not cause the disconnection of DOS. Example: Replace all occurances of: PR# 3 with: PRINT CHR$(4) "PR# 3" -- Matthew Lee Stier | Sun Microsystems --- RTP, NC 27709-3447 | "Wisconsin Escapee" uucp: { sun, mcnc!rti }!sunpix!matthew | phone: (919) 469-8300 fax: (919) 460-8355 |
bh1e+@ANDREW.CMU.EDU (Brendan Gallagher Hoar) (07/16/89)
Well, the first thing I would do is to try changing all of your PR#3 statements to print D$;"PR#3" that MIGHT change things a bit. D$, of course will have been previously set to CHR$(4) I remember that there are reasons to use the OS version ofthe output changing command, rather than the standard applesoft version...but don't remember why (grrr). Brendan bh1e+@andrew.cmu.edu
Sirald@cup.portal.com (Andrew Lionel Dalrymple) (07/18/89)
[ THANK YOU ALL FOR YOUR HELP. UNFORTUNATELY, MY LASER 128's MOTHERBOARD BASED DISC CONTROLLER CIRCUIT JUST FRIED. AS I DON'T KNOW OF ANY PLACE THAT KNOWS HOW TO FIX THIS APPLE CLONE... I'M NOW DEAD IN THE WATER. THANK YOU ANYWAYS. ]