home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-05-14 | 62.6 KB | 2,408 lines |
- 11-May-88 21:30:18-MDT,66505;000000000000
- Return-Path: <u-lchoqu%sunset@cs.utah.edu>
- Received: from cs.utah.edu by SIMTEL20.ARPA with TCP; Wed, 11 May 88 21:29:09 MDT
- Received: by cs.utah.edu (5.54/utah-2.0-cs)
- id AA04243; Wed, 11 May 88 21:29:34 MDT
- Received: by sunset.utah.edu (5.54/utah-2.0-leaf)
- id AA29332; Wed, 11 May 88 21:29:26 MDT
- Date: Wed, 11 May 88 21:29:26 MDT
- From: u-lchoqu%sunset@cs.utah.edu (Lee Choquette)
- Message-Id: <8805120329.AA29332@sunset.utah.edu>
- To: rthum@simtel20.arpa
- Subject: qDial.asm.shar
-
- #--------------------------------CUT HERE-------------------------------------
- #! /bin/sh
- #
- # This is a shell archive. Save this into a file, edit it
- # and delete all lines above this comment. Then give this
- # file to sh by executing the command "sh file". The files
- # will be extracted into the current directory owned by
- # you with default permissions.
- #
- # The files contained herein are:
- #
- # 13 qDial.doc
- # 15 qDial.asm
- # 2 qEqu.asm
- # 2 qData.asm
- # 3 qHelp.asm
- # 5 qModem.asm
- # 5 qParam.asm
- # 12 qVBL.asm
- # 4 qDial.r
- #
- echo 'Extracting qDial.doc'
- if test -f qDial.doc; then echo 'shar: will not overwrite qDial.doc'; else
- sed 's/^X//' << '________This_Is_The_END________' > qDial.doc
- XDocumentation for Version 1.1
- X ,
- XLeo Laporte, 15 March 1986
- XSan Francisco, CA
- X
- X[ Mac metacharacters removed and lines wrapped by Lee Choquette ]
- X
- XMacQueue dialer (or QDial for short) is a desk accesory that installs a
- Xsmall auto-dialing routine into the system RAM of the Macintosh
- Xcomputer. The dialing routine works in the background, dialing up to
- Xfive numbers at a time, until one of them answers.
- X
- XQDial requires a Hayes or Hayes compatible modem. I've used it
- Xsuccessfully on Hayes, Prometheus, and U.S. Robotics modems. It will
- Xwork on any Macintosh computer, even the 128K models.
- X
- X
- XFeatures of MacQueue Dialer
- X
- X* QDial lets you dial up to five numbers sequentially. It will
- Xkeep dialing until one of them answers.
- X
- X* QDial works in the background, so your computer is not tied up
- Xin any way.
- X
- X* QDial is free. You may use it and give it to your friends
- Xwithout charge. The latest version, full documentation, and the
- Xassembly language source code is available from MacQueue BBS (415)
- X661-7374. I will endeavor to provide support to all users through my
- XBBS.
- X
- XBugs
- X
- XQDial has one serious bug (that I know of). If you run a terminal
- Xprogram while QDial is running, or if you open QDial while within a
- Xterminal program, it may hang your Macintosh. So, do not to use any
- Xother terminal program at the same time as MacQueue.
- X
- X
- X
- XGetting Started
- X
- XUsing the MacQueue Dialer is simple. But, first you must install it.
- XUse Apple's Font/DA Mover to install QDial into the System files on the
- Xdisks you plan to use it with.
- X
- XI'd also recommend installing it into the System you use with your
- Xterminal program, so that you can conveniently cancel QDial before
- Xrunning your terminal program.
- X
- XAfter you've installed QDial into your System file, follow these steps
- Xto run it for the first time.
- X
- X1. Open the QDial desk accessory. (Once you've installed it, it should
- Xappear under the Apple menu.)
- X
- X2. Next, enter the names and numbers of the BBS's you want to dial. You
- Xcan use the TAB key to move from box to box. The boxes on the left are
- Xfor the BBS names. Enter the appropriate dialing string in the right
- Xhand boxes. The first three letters of the dialing string should be ATD
- Xfollowed by P if your phone uses Pulse Dialing, or T if it uses Touch
- XTones. Check your modem manual if you're not sure. The characters ATDT
- Xor ATDP should be followed by the phone number of the BBS. The dialing
- Xstring can be up to 40 characters long. If it's longer, QDial will
- Xshorten it to 40 characters.
- X
- X4. Click in the check box under the words Dial? if you want QDial to
- Xdial the number. QDial will only dial those numbers whose Dial? box has
- Xbeen checked. If no boxes are checked, QDial will save your entries and
- Xexit without doing any dialing at all.
- X
- X5. After you've entered all the names and numbers you want to dial,
- Xselect the baud rate by clicking on the appropriate radio button.
- X
- X6. Press the Dial button to begin dialing.
- X
- XQDial will access the disk briefly as it saves the names and numbers
- Xyou've entered. Each time you use QDial, it saves your settings for
- Xnext time.
- X
- XAfter QDial takes a second to initialize the modem it will begin
- Xdialing. Each time it dials, QDial blinks a small phone icon to the
- Xleft of the Apple in your menu bar to let you know it's working.
- X
- XQDial will dial each number in sequence until one of them answers. If
- Xyour telephone rings during that time, QDial will stop dialing
- Ximmediately. Since it dials so quickly, however, your phone will be
- Xeffectively tied up during the time you use QDial.
- X
- XWhile QDial is working you can use your Macintosh normally. It will
- Xcontinue dialing no matter what you do. It even continues dialing
- Xthrough some system crashes!
- X
- XMost programs will not be affected in any way by QDial. Of course, you
- Xwon't be able to use your modem or telephone while QDial is dialing.
- XNor will you be able to run any terminal programs. If you run a
- Xterminal program while QDial is dialing it may crash your Macintosh.
- X
- XWhen a BBS answers QDial, the program will flash the telephone icon
- Xrapidly, and beep at you if you have the sound turned up. It's fairly
- Xinsistent, but don't let it scare you. You can finish up what you're
- Xdoing before responding to QDial. Like the dialing, the beeping and
- Xblinking should not affect your work (unless you're playing music, in
- Xwhich case you may get a very strange combination of sounds). If you're
- Xrunning under Switcher, QDial will blink, but won't make any sound.
- X
- XWhen you're ready to turn off QDial's alarm, just reopen the desk
- Xaccessory. The alarm will stop immediately. QDial will also display a
- Xmessage telling you which BBS you're on-line with. Press the Cancel
- Xbutton now, and run your terminal program. Log on as usual. QDial has
- Xdone its job!
- X
- X
- XModem Information
- X
- XQDial is designed to work with Hayes or Hayes compatible modems. Most
- Xauto-dialing modems on the market today will work. When you first open
- Xthe desk accessory it send the initialization string "ATE0Q0V0S0=0" to
- Xthe modem. The AT is to get your modem's attention. E0 means don't
- Xecho commands, Q0 means send result codes, V0 tells the modem to use
- Xdigits not words for the result codes, and S0=0 makes sure the modem
- Xdoesn't answer the phone if it rings.
- X
- XThis initialization makes it much easier for QDial to communicate with
- Xthe modem, but it may make it more difficult for you. To restore your
- Xold settings after QDial has messed them up, type ATZ<return> followed
- Xby an AT<return>, your modem should answer back with the familiar "OK."
- XDon't do this before QDial has finished its dialing, though, or it will
- Xstop working!
- X
- XIf your modem doesn't respond as expected to the initialization, QDial
- Xwill display a "Modem Not Responding" error and exit. Check to make
- Xsure your modem is on and connected correctly to the modem port. QDial
- Xdoes not talk to the Printer port, since Apple does not recommend using
- Xthat port at speeds higher than 300 baud. If I get a lot of complaints
- Xabout this, I'll release a version that uses the printer port.
- X
- XQDial knows about the standard Hayes numeric result codes, and can also
- Xunderstand extended codes returned by U.S. Robotics Courier 2400 modems
- X(in the ATX3-6 modes) and Prometheus ProModems. QDial will be confused
- Xby the ProModem's extended numeric codes, however (ATV2). For other
- Xmodems, make sure you're in the most Hayes compatible state before using
- XQDial.
- X
- XThese are the result codes that QDial understands:
- X
- XNumeric Verbal Action
- X0 OK Next number
- X1 CONNECT Honk and blink like crazy
- X2 RING Suspend operation
- X3 NO CARRIER Dial next number
- X4 ERROR Dial next number
- X5 CONNECT 1200 Honk and blink
- X6 NO DIAL TONE Suspend operation
- X7 BUSY Dial next number
- X8 NO ANSWER Dial next number
- X9 unused Dial next number
- X10 CONNECT 2400 Honk and blink
- X11 RINGING No action
- X12 VOICE Next number
- X
- XIf QDial does not receive one of these result codes after 40 seconds, it
- Xwill hang up and try the next number in sequence.
- X
- XIf you are using a modem that recognizes busy signals QDial will work
- Xespecially quickly. QDial on a ProModem can dial up to eight times a
- Xminute. That's because it hangs up as soon as it hears a busy signal.
- XYou can set your Courier modem to do the same by running a terminal
- Xprogram and typing "ATX3<return>" before you run QDial. Or you can add
- Xthe X3 command to one of the dialing strings within the QDial dialog
- Xbox (e.g. ATX3DT 661-7374).
- X
- XUnfortunately, Hayes modems do not recognize busy signals. They will
- Xwait 30 seconds before hanging up and returning the NO CARRIER result
- Xcode. At that rate you'll only be able to dial twice a minute.
- X
- XYou can speed things up by opening a terminal program and typing
- X"ATS7=15<return>". (Make sure to exit the terminal program before you
- Xrun QDial.) You can also use this command from within QDial by adding
- Xthe S7=15 to one of the dialing strings (e.g. ATS7=15DT 661-7374).
- X
- XThe ATS7 commands sets the length of time the modem waits for carrier.
- XATS7=15 tells it to wait 15 seconds. You can set it for an even shorter
- Xlength of time, but experiment to make sure you're giving the telephone
- Xcompany enough time to reach the BBS you're dialing. You could even
- Xgive different BBS's different amounts of time to respond by varying the
- XS7 command within QDial's dialing strings. Consult your modem manual
- Xfor more information.
- X
- XTechnical Background
- X
- XQDial was written in assembly language using Apple's MDS Assembler and
- XLinker. All the source files are available from MacQueue BBS. I will
- Xalso post the source on CompuServe, Delhpi, and GEnie.
- X
- XIf you modify QDial, please leave my copyright notices intact. If you
- Xpost modified versions of QDial, please indicate that you have modified
- Xit. I'd also appreciate it if you'd send me a copy, or upload it to
- XMacQueue.
- X
- XQDial is really two programs. The desk accessory gets the dialing
- Xinformation from the user and passes it to a small autodialing routine,
- Xinstalled into the system heap. If you want to find the dialing routine
- Xusing a debugger, just trace down the VBL queue until you find a routine
- Xwith 'QQQQ' in bytes 3-6.
- X
- XThe dialing routine runs as a VBL task. 60 times a second the
- XMacintosh suspends processing for a few milliseconds while it waits for
- Xthe electron gun in the monitor to move from the bottom of the screen to
- Xthe top. During that period - called the Vertical BLank interval -
- Xshort routines may take over the system briefly.
- X
- XQDial uses that interval to dial the telephone and later to wait for the
- Xmodem's response. By using the VBL interval, QDial can autodial without
- Xtaking processor time away from any other running programs. In effect,
- XQDial implements multi-tasking on the Macintosh.
- X
- XThis, incidentally, is why QDial can cause another program trying to use
- Xthe modem port to crash. QDial tries to be well behaved. Before it
- Xuses the modem port it checks to see if anyone else is using it. If
- Xsomeone is, QDial will stop working. Unfortunately, if the other
- Xprogram still manages to use the modem port at the same time as QDial,
- Xthe computer will hang. I'm still working on ways around this, but
- Xuntil then, remember not to use the modem port while QDial is running!
- X
- XQDial uses private resources to store important information. All
- Xstrings used within QDial are stored in STR# resources. Your dialing
- Xinformation and baud rate is stored in a resource of type QDIL. All of
- XQDial's resources are named to make them easy to find using ResEdit.
- X
- X
- XError Messages
- X
- XIf Qdial has a problem, it will return one of the following error
- Xmessages before exiting.
- X
- XCouldn't install VBL task
- X
- XSomething went wrong when QDial was trying to install its VBL routine.
- XYou'll probably have to reboot the computer to get it to work. If that
- Xdoesn't help, there may be some incompatibility between the System
- Xhardware or software. Please drop me a line at one of the addresses
- Xlisted in the Info box in QDial and let me know about the problem.
- X
- XCan't load QDIL resource
- X
- XThe data QDial saved from your last use has been damaged or is missing.
- XYou'll have to reinstall QDial. If you continue to get this message,
- Xyou have an incomplete copy of the QDial desk accessory.
- X
- XCouldn't create qDial window
- X
- XInsufficient memory to install the window, or the window resource is
- Xmissing from the QDial program.
- X
- XCouldn't read or write parameters
- X
- XThe resource manager won't let QDial save your BBS names and numbers.
- XProbably caused by insufficient disk space.
- X
- XModem not responding
- X
- XThis is the only error message you're likely to see. Maybe your modem
- Xis turned off, or isn't connected to the modem port, or the cabling is
- Xwrong, or it's not a true Hayes Compatible. Try turning your modem off
- Xand on again. You modem must be capable of responding to the Hayes/AT
- Xcommand set.
- X
- XInsufficient memory to run Qdial
- X
- XThere wasn't enough memory in the System heap to copy the QDial dialing
- Xroutine. QDial only needs 1200 bytes, but some programs use so much
- Xmemory in the System heap that there's no room for QDial. Try running
- XQDial with a different combination of programs running. You may have to
- Xturn the computer off and on again to recover enough memory.
- X
- X
- XI hope QDial proves of use to you. Please let me know how you like it!
- X ,
- X Leo Laporte
- X Sysop, MacQueue BBS
- X 637 Frederick St.
- X San Francisco, CA 94117
- X
- X CompuServe 75106,3135
- X Delphi LAPORTE
- X GEnie LAPORTE
- X UUCP hplabs!well!laporte
- X
- ________This_Is_The_END________
- if test `wc -l < qDial.doc` -ne 289; then
- echo 'shar: qDial.doc was damaged during transit'
- echo ' (should have been 289 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qDial.asm'
- if test -f qDial.asm; then echo 'shar: will not overwrite qDial.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qDial.asm
- X;----------------------------------------------------------------
- X; qdial.asm
- X;----------------------------------------------------------------
- X;
- X; QDial - a program that installs a dialing routine into VBL
- X; ,
- X; (c)1986 Leo Laporte, all rights reserved
- X;
- X; This is the main program, it sets up a desk accessory to
- X; get user input, installs the VBL routine, and starts it running.
- X;
- X; cf. qParam.asm - user parameter routines (maintains QDIL resource)
- X; qModem.asm - modem initialization routines
- X; qHelp.asm - the help routines
- X; qVBL.asm - the actual VBL dialing routine
- X;
- X; all files are formatted for 9-point Monaco
- X;
- X; v1.0 21-Feb-86
- X;
- X;-----------------------------------------------------------------
- X; Includes
- X;-----------------------------------------------------------------
- X
- X INCLUDE qEqu.ASM ; q equates
- X
- X; defined in this file
- XXDEF qEntry,qTitle,qOpen,GetParams,ItemTable,Failure
- XXDEF Done,NoWindow,QDone,Install,SetBtn,ClearStr,ItemSet
- XXDEF InstDone,ChkItem,ClearEm,CheckIt,KillOldVBL
- XXDEF TestTask,Running,SetUpRes,CreateWindow,DialogOK
- XXDEF CWDone,GetIndString,FindStr,NextStr,GotStr
- X
- X; defined in qParam.ASM
- XXREF SaveParams, ReadOldParms,GetCtlHandle
- X
- X; defined in qModem.asm
- XXREF SetUpModem
- X
- X; defined in qVBL.asm
- XXREF TaskStart, TaskStop, VBLEntry
- XXREF pbIn, pbOut,numbers,currStr,VBLCode
- X
- X; defined in qHelp.asm
- XXREF Help
- X
- X; defined in qData.ASM
- XXREF itemHit,theType,theControl,theRect,myResBase,connected,bbs
- X
- X;-----------------------------------------------------------------
- X; REGISTER USAGE
- X;-----------------------------------------------------------------
- X
- X; A3 contains a handle to the QDIL resource
- X; A4 contains a pointer to the DCE
- X
- X;-----------------------------------------------------------------
- X; DRVR FLAGS
- X;-----------------------------------------------------------------
- X
- XqEntry:
- X DC.W $0000 ; respond to no calls
- X DC.W 0 ; no periodic action
- X DC.W $016A ; mousedown, keydown, update, activate
- X DC.W 0 ; no menu
- X
- X DC.W qOpen-qEntry ; open routine
- X DC.W qDone-qEntry ; prime - unused
- X DC.W qDone-qEntry ; control - unused
- X DC.W qDone-qEntry ; status - unused
- X DC.W qDone-qEntry ; close -unused
- X
- XqTitle:
- X DC.B 6, 0, 'QDial' ; Pascal string, begin name with null
- X DC.B ')1986 Lo Laporte,'
- X DC.B 'all rights reserved.'
- X DC.B 'Electronic distribution OK' ; room for longer name
- X
- X .ALIGN 2
- X
- X
- X;-----------------------------------------------------------------
- X; OPEN
- X;-----------------------------------------------------------------
- X
- XqOpen:
- X MOVEM.L A0-A4/D0-D5,-(SP) ; save regs
- X MOVE.L A1,A4 ; move DCE pointer to a safe register
- X
- X; Save the application's port because the ROM doesn't do it for us on Open.
- X CLR.L -(SP) ; keep the current port here
- X PUSH.L SP ; pass GetPort a pointer
- X _GetPort ; get it, now it's on top of stack
- X
- X MOVE.L #VBLErr,D6 ; error code, just in case
- X BSR KillOldVBL ; remove old VBL task, if any
- X BNE Failure ; error handler
- X
- X MOVE.L #NoResErr,D6
- X BSR SetUpRes ; load in parameters resource
- X BNE Failure
- X
- X MOVE.L #WindErr,D6
- X BSR CreateWindow ; create the dialog window
- X BNE Failure
- X
- X MOVE.L #ParmErr,D6
- X BSR ReadOldParms ; insert last values
- X BNE Failure
- X
- X _InitCursor ; get arrow cursor
- X
- XGetParams:
- X; main program loop
- X PUSH.L #0 ; no filter proc
- X PEA itemHit ; returns item
- X _ModalDialog
- X
- X; case out on item hit
- X MOVE.W itemHit, D0
- X MOVE.W D0, D4 ; save the item hit (for chkItem)
- X
- X ADD D0,D0 ; *2 for table index
- X MOVE ItemTable(D0),D0 ; Point to routine offset
- X JMP ItemTable(D0) ; and jump to it
- X
- XItemTable:
- X DC.W GetParams-ItemTable ; Item 0 - unused
- X DC.W GetParams-ItemTable ; StatText
- X DC.W Install-ItemTable ; DialButton
- X DC.W Help-ItemTable ; Help Button
- X DC.W Done-ItemTable ; Cancel Button
- X DC.W GetParams-ItemTable ; StatText
- X DC.W GetParams-ItemTable ; StatText
- X DC.W GetParams-ItemTable ; StatText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W GetParams-ItemTable ; EditText
- X DC.W ChkItem-ItemTable ; ChkItem 1
- X DC.W ChkItem-ItemTable ; ChkItem 2
- X DC.W ChkItem-ItemTable ; ChkItem 3
- X DC.W ChkItem-ItemTable ; ChkItem 4
- X DC.W ChkItem-ItemTable ; ChkItem 5
- X DC.W GetParams-ItemTable ; StatText
- X DC.W ChkItem-ItemTable ; RadioButton 300
- X DC.W ChkItem-ItemTable ; RadioButton 1200
- X DC.W ChkItem-ItemTable ; RadioButton 2400
- X
- XFailure:
- X; general purpose error handler
- X; error code in D6
- X MOVE.W myResBase, D0
- X ADD.W #ErrStr,D0 ; get resource id
- X
- X CLR.L -(SP)
- X PUSH.L #'STR#'
- X PUSH.W D0
- X _GetResource ; get error strings
- X
- X POP.L A0
- X CMPA.L #0,A0 ; did we get them?
- X BGT.S @1 ; yes, continue
- X
- X BRA.S Done ; no, just quit
- X
- X@1:
- X MOVE.L D6, D0 ; error code is actually index into STR#
- X BSR GetIndString
- X
- X PUSH.L A1 ; error string #1
- X
- X ADDQ.L #1, D0
- X BSR GetIndString
- X
- X PUSH.L A1 ; error string #2
- X
- X PUSH.L #0 ; rest are blank
- X PUSH.L #0
- X _ParamText ; set text in Alert
- X
- X; display error alert and exit
- X MOVE.W myResBase, D0
- X ADD.W #ErrAlert,D0 ; get resource id
- X
- X CLR.W -(SP)
- X PUSH.W D0
- X PUSH.L #0 ; no filter proc
- X _StopAlert
- X
- X POP.W D0
- X
- XDone:
- X; release the resource handle
- X MOVE.L A3,A0
- X _HUnlock
- X
- X PUSH.L A3
- X _ReleaseResource
- X
- X; throw away the window
- X TST.L DCtlWindow(A4) ; is there a window?
- X BEQ.S NoWindow
- X
- X MOVE.L DCtlWindow(A4),-(SP) ; push the window
- X CLR.L DCtlWindow(A4) ; clear it
- X _DisposWindow ; and forget it
- X
- XNoWindow:
- X _SetPort ; old port still on the stack
- X MOVEM.L (SP)+,A0-A4/D0-D5
- XQDone:
- X MOVE #NoErr,D0 ; no error
- X RTS ; all through, return to Finder
- X
- X;----------------------------------------------------------------
- X; ROUTINES
- X;----------------------------------------------------------------
- X
- XInstall:
- X; copies dialing routine and associated data structures into system heap,
- X; initializes VBL queue element, and installs it into VBL task queue.
- X
- X MOVE.L #ParmErr,D6
- X BSR SaveParams ; save user's parameters
- X BNE Failure
- X
- X MOVE.L #ModemErr,D6
- X BSR SetUpModem ; initialize modem
- X BNE Failure ; no modem on line
- X
- X MOVE.L (A3),A1 ; pointer to parameters
- X
- X; jump to buttons
- X ADD.L #strSpace, A1
- X
- X; make sure at least one button was checked
- X CLR.L D1 ; zero counter
- X MOVE.L #chkB-chkT, D0 ; count -1
- XSetBtn:
- X ADD.W (A1)+, D1
- X DBRA D0, SetBtn
- X
- X TST.L D1 ; any numbers to dial?
- X BEQ.S Done ; no, do nothing
- X
- X; Copy dialing data into VBL task
- X MOVE.L (A3), A0 ; pointer to parameters (source)
- X LEA numbers, A1 ; pointer to VBL data space (dest)
- X MOVE.L #strSpace, D0 ; count
- X _Blockmove ; copy dialing data
- X
- X; zero out the count byte of numbers we don't want to dial
- X MOVE.L (A3),A0 ; index into parameters
- X ADDA.L #strSpace, A0 ; now points to buttons
- X LEA numbers,A1 ; VBL data space
- X ADDA.L #strLen,A1 ; point to BBS numbers
- X
- X MOVE.W #chkB-chkT,D0 ; loop counter
- XClearStr:
- X TST.W (A0)+ ; is check item set?
- X BGT.S ItemSet ; yes, next string
- X
- X CLR.B (A1) ; no, zero count byte in dialing string
- X
- XItemSet:
- X ADDA.L #strLen*2,A1 ; jump to next dialing string
- X DBRA D0,ClearStr ; loop
- X
- X; initialize VBL task flags
- X LEA currStr,A0
- X CLR.W (A0) ; start with first number
- X
- X LEA VBLCode,A0
- X CLR.W (A0) ; start at beginning
- X
- X; get some memory in system heap for VBL task
- X MOVE.L #TaskStop-TaskStart, D0 ; space for the code
- X _NewPtrSYS
- X
- X MOVE.L #memErr,D6
- X TST.L D0 ; did we get a pointer?
- X BNE Failure ; no
- X
- X MOVE.L A0,A2 ; yes, save pointer
- X
- X LEA VBLEntry, A1
- X MOVE.L A2, vblAddr(A1) ; initialize VBL queue entry
- X
- X; copy the whole thing into system heap
- X LEA TaskStart, A0 ; source
- X MOVE.L A2, A1 ; dest
- X MOVE.L #TaskStop-TaskStart, D0 ; size
- X _BlockMove
- X
- X; install task
- X LEA VBLEntry-TaskStart(A2), A0 ; new address of VBLEntry
- X _VInstall ; go baby - should be dialing now
- X
- X BEQ InstDone
- X
- X; VInstall error
- X MOVE.L #VBLErr, D6
- X BRA Failure
- X
- XInstDone:
- X; all through, say bye, bye
- X BRA Done
- X
- X;----------------------------------------------------------------
- X
- XChkItem:
- X; inverts state of item hit (radio button or check box)
- X; D4 contains the item hit
- X
- X CMP.W #radioT, D4 ; was it a radio button?
- X BLT.S CheckIt ; no, continue
- X
- X MOVE.L #radioT, D5 ; yes, clear old radio settings first
- XClearEm:
- X MOVE.L D5,D0
- X BSR GetCtlHandle ; get a handle to that control (in theControl)
- X
- X; clear the radio button
- X PUSH.L theControl
- X PUSH.W #0
- X _SetCtlValue ; clear it
- X
- X ADDQ.L #1, D5 ; next radio btn
- X CMP.L #radioB, D5 ; any left?
- X BLE.S ClearEm ; no
- X
- XCheckIt:
- X; get a handle to the item
- X MOVE.W D4, D0 ; the item number
- X BSR GetCtlHandle
- X
- X; get its current value
- X CLR.W -(SP)
- X PUSH.L theControl ; handle to our item
- X _GetCtlValue
- X
- X POP.W D0 ; current value
- X
- X; invert it
- X EORI.W #1, D0
- X
- X; and reset the value
- X PUSH.L theControl
- X PUSH.W D0
- X _SetCtlValue
- X
- X BRA GetParams ; all done
- X
- X;----------------------------------------------------------------
- X; SUBROUTINES
- X;----------------------------------------------------------------
- X
- XKillOldVBL:
- X; this routine removes the old VBL task if there was one
- X; also sets a flag (connected), so that da can display appropriate
- X; message later
- X
- X; default to "not connected"
- X LEA connected,A0
- X CLR.W (A0) ; clear already connected flag
- X
- X; check to see if a task has been installed
- X MOVE.L #VBLQueue, A0 ; VBL Queue header
- X MOVE.L qHead(A0), A0 ; address of first entry
- X
- XTestTask:
- X CMPA.L #0, A0 ; is there a task?
- X BEQ KODone
- X MOVE.L VBLAddr(A0), A1 ; address of task
- X ADDQ.L #2, A1 ; jump past BRA instruction
- X MOVE.L (A1), D0
- X CMP.L #'QQQQ', D0 ; is this our routine?
- X BEQ.S Running
- X MOVE.L qLink(A0), A0 ; get next entry
- X BRA.S TestTask ; continue testing
- X
- XRunning:
- X; there is a dialing task running, so remove it
- X MOVE.L A0,A2 ; save pointer
- X _VRemove ; remove the task from the queue
- X TST.L D0 ; removed OK?
- X BNE KODone
- X
- X; are we on line?
- X MOVE.L VBLAddr(A2),A0 ; address of the task
- X MOVE.W VBLCode-TaskStart(A0),D0 ; the current VBL state
- X CMPI.W #QDOnline,D0 ; on-line?
- X BNE.S RecoverPtr ; no
- X
- X; set connected flag
- X LEA connected,A0
- X MOVE.W #-1,(A0) ; connected true
- X
- X; save BBS name (get it from VBL data area)
- X MOVE.L VBLAddr(A2),A0 ; address of the task
- X
- X MOVE.W currStr-TaskStart(A0),D0
- X SUBI.W #2,D0 ; restore last # dialed
- X
- X LEA numbers-TaskStart(A0),A0 ; pointer to numbers
- X MULU #strlen,D0 ; offset to current BBS
- X ADDA.L D0,A0 ; now A0 points to the BBS String
- X
- X LEA bbs,A1 ; where to copy it
- X CLR.L D0
- X MOVE.B (A0),D0 ; string size
- X ADDQ.L #1,D0 ; +1 for count byte
- X _BlockMove
- X
- XRecoverPtr:
- X; dispose of the memory used by the task
- X MOVE.L VBLAddr(A2),A0 ; pointer to the routine
- X _DisposPtr ; release it
- X
- XKODone:
- X _DrawMenuBar ; erase phone icon
- X MOVE.L #NoErr,D0
- X RTS
- X
- X;----------------------------------------------------------------
- X
- XSetUpRes:
- X; get the QDIL parameter resource, keep it in A3
- X
- X; Get DRVR reference number
- X MOVE.W DCtlRefNum(A4), D0
- X NOT.W D0 ; this is the DRVR resource id
- X
- X; Get the starting number of DRVR's private resources
- X LSL.W #5, D0 ; shift it into position
- X ORI.W #$C000, D0 ; turn it into the base resource ID #
- X LEA myResBase, A0
- X MOVE.W D0, (A0) ; save it
- X
- X; load resource
- X ADD.W #myParms,D0 ; get resource id
- X
- X CLR.L -(SP)
- X PUSH.L #'QDIL'
- X PUSH.W D0
- X _GetResource
- X
- X POP.L A3 ; keep handle in A3
- X
- X CMPA.L #0,A3 ; is there a handle??
- X BGT.S @1 ; yes
- X
- X MOVE.L #Error,D0 ; no
- X BRA.S @2
- X@1:
- X MOVE.L A3,A0
- X _HLock ; make sure it ain't going anywhere
- X
- X MOVE.L #noErr,D0
- X
- X@2:
- X RTS
- X
- X;-----------------------------------------------------------------
- X
- XCreateWindow:
- X
- X; initialize message to user (^0 ^1 in dialog box)
- X MOVE.W myResBase,D0
- X ADDI.W #msgStr,D0 ; get resource id of message strings
- X
- X CLR.L -(SP)
- X PUSH.L #'STR#'
- X PUSH.W D0
- X _GetResource
- X
- X POP.L A2 ; GetIndString will check for bad handle
- X
- X MOVE.W connected,D0 ; are we connected?
- X BEQ.S NotOnLine ; no
- X
- X; yes, display "on-line with" message and name of BBS
- X MOVE.L A2,A0 ; handle to strings
- X MOVE.W #OnLineMsg,D0 ; index to online message
- X BSR GetIndString
- X PUSH.L A1 ; first string
- X
- X LEA bbs,A1 ; name of BBS
- X PUSH.L A1
- X
- X PUSH.L #0 ; rest are blank
- X PUSH.L #0
- X _ParamText ; display strings
- X
- X BRA.S OpenDLOG
- X
- XNotOnLine:
- X; "not on-line" message
- X MOVE.L A2,A0 ; handle to strings
- X MOVE.W #NOLMsg1,D0 ; index to not on-line message 1
- X BSR GetIndString
- X
- X PUSH.L A1
- X
- X MOVE.W #NOLMsg2,D0 ; index to not on-line message 2
- X BSR GetIndString
- X
- X PUSH.L A1
- X
- X PUSH.L #0 ; rest are null
- X PUSH.L #0
- X _ParamText ; display string
- X
- XOpenDLOG:
- X; opens the QDial modal dialog box
- X MOVE.W myResBase,D0
- X ADDI.W #myDialog, D0 ; The ID of the dialog resource
- X
- X; Create dialog
- X CLR.L -(SP) ; returns dialog ptr
- X PUSH.W D0 ; resource ID
- X PUSH.L #0 ; allocate storage on the heap
- X PUSH.L #-1 ; put it on top
- X _GetNewDialog ; get it
- X
- X MOVE.L (SP), A0 ; the DLOG pointer
- X ; (leave on stack for SetPort)
- X TST.L (SP) ; did we get a dialog box?
- X BNE.S DialogOK
- X
- X POP.L D0 ; pop off the faulty pointer
- X MOVE.L #Error,D0 ; set error flag
- X BRA.S CWDone ; return
- X
- XDialogOK:
- X MOVE.L A0, DCtlWindow(A4) ; save it in the DCE
- X
- X; normally da's mark their windows as system windows, but for modal
- X; dialog to work, ours must be a dialog window
- X
- X MOVE.W #dialogKind, windowKind(A0)
- X _SetPort ; pointer is still on stack
- X MOVE.L #NoErr,D0 ; clear error flag
- XCWDone:
- X RTS
- X
- X;-----------------------------------------------------------------
- X
- XGetIndString:
- X; A0 contains the handle to the STR# resource
- X; D0 contains the index of the desired string (index starts at 0)
- X; On return A1 contains the address of the requested string
- X; If the index in D0 is out of range, A1 returns NIL
- X
- X MOVEM.L A0/D0-D1, -(SP)
- X
- X CMPA.L #0,A0 ; valid handle?
- X BGT.S @1 ; yes
- X MOVE.L #0,A1 ; error return
- X BRA.S GotStr
- X
- X@1:
- X MOVE.L (A0), A1 ; A1 contains a pointer to the string
- X MOVE.W (A1), D1 ; first word in resource is number of strings
- X
- X CMP.W D0, D1 ; does index exceed limit?
- X BGT.S FindStr ; ok, find it
- X
- X MOVE.L #0, A1 ; index out of range, return NULL pointer
- X BRA.S GotStr
- X
- XFindStr:
- X ADDQ.W #2, A1 ; skip past count to actual string data
- X TST.W D0 ; is index zero?
- X BEQ.S GotStr ; yes, we already have address in A1
- X SUBQ.W #1, D0 ; DBRA terminates on -1
- X
- XNextStr:
- X CLR.L D1
- X MOVE.B (A1), D1 ; D1 contains count byte
- X ADDQ.W #1, D1 ; string length + 1 for count byte
- X ADDA.W D1, A1 ; add length to pointer
- X DBRA D0,NextStr ; go to next string
- X
- XGotStr:
- X MOVEM.L (SP)+, A0/D0-D1
- X RTS
- X
- X;-----------------------------------------------------------------
- X; EOF qdial.asm
- X;-----------------------------------------------------------------
- ________This_Is_The_END________
- if test `wc -l < qDial.asm` -ne 598; then
- echo 'shar: qDial.asm was damaged during transit'
- echo ' (should have been 598 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qEqu.asm'
- if test -f qEqu.asm; then echo 'shar: will not overwrite qEqu.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qEqu.asm
- X; qEqu.ASM
- X; Equates for QDial
- X; ,
- X; (c)1985 Leo Laporte, all rights reserved
- X
- X INCLUDE MacTraps.D
- X INCLUDE SysEqu.D
- X INCLUDE ToolEqu.D
- X INCLUDE QuickEqu.D
- X INCLUDE PushMacs.TXT
- X
- X; resource ID's
- XmyDialog EQU 0 ; DLOG
- XHelpDialog EQU 1 ; DLOG
- X
- XHelpPict EQU 0 ; PICT
- X
- XmyParms EQU 0 ; QDIL
- X
- XErrAlert EQU 0 ; ALRT
- X
- XerrStr EQU 0 ; STR#
- XmsgStr EQU 1 ; STR#
- X
- XHelpText EQU 0 ; TEXT
- X
- X; misc equates
- XstrLen EQU 40 ; string length
- XnumStr EQU 10 ; number of strings
- XstrSpace EQU strlen*numstr ; size of string data
- XQDOnline EQU 7 ; on-line code from VBL routine
- XbufLen EQU 64 ; 64 bytes, should be divisible by 4
- XScratch EQU -256 ; size of stack frame for locals
- X
- X; dialog items
- XstringT EQU 8 ; first string (string Top)
- XstringB EQU 17 ; last string (string Bottom)
- XchkT EQU 18 ; first check box
- XchkB EQU 22
- XradioT EQU 24 ; first radio button
- XradioB EQU 26
- X
- X; error
- XNoErr EQU 0
- XError EQU -1
- X
- XVBLErr EQU 0
- XNoResErr EQU 2
- XWindErr EQU 4
- XParmErr EQU 6
- XModemErr EQU 8
- XMemErr EQU 10
- X
- X; messages
- XNOLMsg1 EQU 0
- XNOLMsg2 EQU 1
- XOnLineMsg EQU 2
- X
- X; serial port equates
- XAIn EQU -6
- XAout EQU -7
- X
- Xbaud300 EQU 380
- Xbaud1200 EQU 94
- Xbaud2400 EQU 46
- Xstop10 EQU 16384
- XnoParity EQU 8192
- Xdata8 EQU 3072
- X
- XOKStr EQU $300D
- X
- X
- X; CSCode values
- X
- XserReset EQU 8
- XserGetBuf EQU 2
- XserSetBuf EQU 9
- X
- X; Traps
- X
- X .TRAP _ReadAsync $A002 ! $400
- X .TRAP _WriteAsync $A003 ! $400
- X .TRAP _StatusAsync $A005 ! $400
- X .TRAP _NewPtrSYS $A11E ! $400
- X
- X; eof qEqu.ASM
- ________This_Is_The_END________
- if test `wc -l < qEqu.asm` -ne 86; then
- echo 'shar: qEqu.asm was damaged during transit'
- echo ' (should have been 86 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qData.asm'
- if test -f qData.asm; then echo 'shar: will not overwrite qData.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qData.asm
- X;----------------------------------------------------------------
- X; qData.Asm
- X;----------------------------------------------------------------
- X;
- X; Data for QDial
- X; ,
- X; (c)1985 Leo Laporte, all rights reserved
- X;
- X;-----------------------------------------------------------------
- X; defined in this file
- X;-----------------------------------------------------------------
- X
- X INCLUDE qEqu.asm
- X
- XXDEF itemHit,theType,theControl,theRect,myResBase
- XXDEF InitStr,AttnStr,endStr,connected,bbs,serConfig,serialIn,serialOut
- X
- X;-----------------------------------------------------------------
- X
- XitemHit DC.W 0 ; last item pushed
- XtheType DC.W 0 ; its type (unused)
- XtheControl DC.L 0 ; handle to control
- XtheRect DC.W 0,0,0,0 ; control rect
- Xconnected DC.W 0 ; currently online flag
- Xbbs DCB.B strlen,0 ; name of BBS we've hit
- XmyResBase DC.W 0 ; DRVR's private resource #
- XserConfig DC.W 0 ; serial port config word
- X
- X
- XInitStr DC.B 'ATE0Q0V0S0=0',$D ; sets up modem
- XAttnStr DC.B 'AT',$D ; attention string
- XendStr
- X
- X STRING_FORMAT 2 ; Pascal type strings...
- X
- XSerialIn DC.B '.Ain'
- XSerialOut DC.B '.Aout'
- X
- X;-----------------------------------------------------------------
- X; EOF QData.asm
- X;-----------------------------------------------------------------
- X
- ________This_Is_The_END________
- if test `wc -l < qData.asm` -ne 42; then
- echo 'shar: qData.asm was damaged during transit'
- echo ' (should have been 42 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qHelp.asm'
- if test -f qHelp.asm; then echo 'shar: will not overwrite qHelp.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qHelp.asm
- X;----------------------------------------------------------------
- X; qHelp.asm
- X;----------------------------------------------------------------
- X;
- X; QDial - a program that installs a dialing routine into VBL
- X; ,
- X; (c)1986 Leo Laporte, all rights reserved
- X;
- X; The routines in this file are called from QDial.asm
- X; v1.0 21-Feb-86
- X;
- X;-----------------------------------------------------------------
- X; Includes
- X;-----------------------------------------------------------------
- X
- X INCLUDE qEqu.ASM ; q equates
- X
- X; defined in this file
- XXDEF Help
- X
- X; defined in qDial.asm
- XXREF GetParams
- X
- X;defined in qData.asm
- XXREF myResBase,itemHit,theRect
- X
- X
- X;-----------------------------------------------------------------
- X
- XHelp:
- X; displays help dialog, then returns
- X MOVEM.L A0-A4/D0-D3,-(SP)
- X
- X; push grafPort
- X CLR.L -(SP)
- X PUSH.L SP
- X _GetPort
- X
- X MOVE.W myResBase, D0
- X ADD.W #HelpDialog,D0 ; get resource id
- X
- X CLR.L -(SP) ; returns dialog ptr
- X PUSH.W D0 ; resource ID
- X PUSH.L #0 ; allocate storage on the heap
- X PUSH.L #-1 ; put it on top
- X _GetNewDialog ; get it
- X
- X POP.L A0 ; the DLOG pointer
- X CMPA.L #0,A0
- X BEQ HelpDone
- X
- X MOVE.L A0,A3 ; save it
- X
- X PUSH.L A0
- X _SetPort
- X
- X; draw the title picture
- X MOVE.W myResBase, D0
- X ADD.W #HelpPict,D0 ; get resource id
- X
- X CLR.L -(SP) ; returns picture handle
- X PUSH.L #'PICT'
- X PUSH.W D0 ; resource ID
- X _GetResource ; get it
- X
- X POP.L A0
- X CMPA.L #0,A0 ; did we get it?
- X BEQ.S @0
- X
- X LEA theRect,A1 ; initialize rectangle
- X MOVE.L #$000A0053,(A1)+
- X MOVE.L #$0039016A,(A1)
- X
- X PUSH.L A0 ; pic handle
- X PEA theRect
- X _DrawPicture
- X
- X@0:
- X MOVE.L grafglobals(A5),A0
- X MOVE.L thePort(A0),A0
- X MOVEM.L portRect(A0),D0-D1 ; get the port's rectangle
- X
- X ADDI.L #$00410014,D0 ; inset the rect a little bit
- X SUBI.L #$00320014,D1
- X
- X LEA theRect,A0
- X MOVE.L D0,(A0)+
- X MOVE.L D1,(A0) ; save rect
- X
- X PEA theRect
- X _FrameRect
- X
- X; draw text
- X MOVE.W myResBase, D0
- X ADD.W #HelpText,D0 ; get resource id
- X
- X CLR.L -(SP)
- X PUSH.L #'TEXT'
- X PUSH.W D0
- X _GetResource ; get help text
- X
- X POP.L A2 ; handle
- X CMPA.L #0,A2 ; anything there?
- X BGT.S @1 ; yes
- X
- X PUSH.W #30
- X PUSH.W #85
- X _MoveTo
- X
- X PEA 'No help available.'
- X _DrawString
- X
- X BRA.S HelpWait
- X
- X@1:
- X; draw the help text in 9 point geneva
- X PUSH.W #geneva
- X _TextFont
- X
- X PUSH.W #9
- X _TextSize
- X
- X PEA theRect ; rectangle
- X PUSH.W #4
- X PUSH.W #4
- X _InsetRect ; shrink the rectangle a little
- X
- X MOVE.L A2,A0
- X _GetHandleSize ; length in D0
- X
- X PUSH.L (A2) ; pointer to text
- X PUSH.L D0 ; length
- X PEA theRect ; rect
- X PUSH.W #1 ; centered text
- X _TextBox ; draw it!
- X
- X; wait for button click
- XHelpWait:
- X PUSH.L #0 ; no filter proc
- X PEA itemHit ; returns item
- X _ModalDialog
- X
- X; case out on item hit
- X MOVE.W itemHit, D0
- X CMPI.W #1,D0
- X BNE.S HelpWait
- X
- X; restore state
- XHelpDone:
- X PUSH.L A3 ; dialog ptr
- X _DisposDialog
- X
- X _SetPort
- X MOVEM.L (SP)+,A0-A4/D0-D3
- X
- X; return to ModalDialog loop
- X BRA GetParams
- X
- X;----------------------------------------------------------------
- X; EOF qHelp.asm
- X;----------------------------------------------------------------
- ________This_Is_The_END________
- if test `wc -l < qHelp.asm` -ne 161; then
- echo 'shar: qHelp.asm was damaged during transit'
- echo ' (should have been 161 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qModem.asm'
- if test -f qModem.asm; then echo 'shar: will not overwrite qModem.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qModem.asm
- X;----------------------------------------------------------------
- X; qModem.Asm
- X;----------------------------------------------------------------
- X;
- X; Modem Subroutines for QDial
- X; ,
- X; (c)1985 Leo Laporte, all rights reserved
- X;
- X; These routines are called from QDial.asm
- X; v1.0 21-Feb-86
- X;-----------------------------------------------------------------
- X; Includes
- X;-----------------------------------------------------------------
- X
- X INCLUDE qEqu.ASM ; q equates
- X
- X; defined in this file
- XXDEF SetUpModem,SetUpError,SetUpOK,WakeUpModem
- XXDEF InitModem,GetAttn,ModemOK,TryAgain
- X
- X; defined in qdial.asm
- XXREF pbIn, pbOut, inBuf, checkPort, readPort
- X
- X; defined in qData.ASM
- XXREF SerialIn,SerialOut,attnStr,initStr,EndStr,serConfig
- X
- X;-----------------------------------------------------------------
- X
- XSetUpModem:
- X; configures modem and returns
- X; if modem doesn't respond z flag will be cleared
- X
- X; open .AIn
- X LEA pbIn, A0
- X CLR.L ioCompletion(A0) ; clear all parameters, since
- X CLR.L ioFileName(A0) ; this may be the same pb left
- X CLR.W ioResult(A0) ; over from a previous incarnation
- X CLR.L ioBuffer(A0) ; of QDial
- X CLR.L ioByteCount(A0)
- X CLR.B ioPermssn(A0)
- X LEA SerialIn,A1
- X MOVE.L A1,ioFileName(A0) ; name of driver
- X _Open
- X
- X TST.W ioResult(A0)
- X BNE SetUpError
- X
- X; open .AOut
- X LEA pbOut, A0
- X CLR.L ioCompletion(A0)
- X CLR.L ioFileName(A0)
- X CLR.W ioRefNum(A0)
- X CLR.L ioBuffer(A0)
- X CLR.L ioByteCount(A0)
- X CLR.B ioPermssn(A0)
- X LEA SerialOut,A1
- X MOVE.L A1,ioFileName(A0)
- X _Open
- X
- X TST.W ioResult(A0)
- X BNE SetUpError
- X
- X; kill any pending calls
- X LEA pbIn,A0
- X CLR.L ioCompletion(A0)
- X MOVE #1,CSCode(A0) ; why? cause Don Brown does it!
- X _KillIO
- X
- X; tell serial driver where its buffer is
- X LEA pbIn,A0
- X MOVE #SerSetBuf,csCode(A0)
- X CLR.L csparam(A0) ; use yer own buffer
- X CLR.L ioBuffer(A0)
- X _Control
- X
- X TST.W ioResult(A0)
- X BNE SetUpError
- X
- X; configure serial port (.AIn)
- X LEA pbIn, A0
- X MOVE.W #serReset, csCode(A0) ; this is a reset call
- X MOVE.W serConfig, csParam(A0) ; sets baud rate, etc.
- X _Control
- X
- X TST.W ioResult(A0)
- X BNE SetUpError
- X
- X; configure serial port (.AOut)
- X; kill any pending calls
- X LEA pbOut,A0
- X CLR.L ioCompletion(A0)
- X MOVE #1,CSCode(A0) ; why? cause Don Brown does it!
- X _KillIO
- X
- X LEA pbOut, A0
- X MOVE.W #serReset, csCode(A0)
- X MOVE.W serConfig, csParam(A0)
- X CLR.L ioCompletion(A0)
- X _Control
- X
- X TST.W ioResult(A0)
- X BNE.S SetUpError
- X
- X BSR WakeUpModem ; initialize modem, then say hello
- X
- X CMP.L #2, D0 ; we must have received at least 2 OK's
- X BLT.S SetUpError ; couldn't wake it up
- X
- X BRA.S SetUpOK
- X
- XSetUpError:
- X MOVE.L #Error, D0
- X RTS
- X
- XSetUpOK:
- X MOVE.L #NoErr, D0
- X RTS
- X
- X;-----------------------------------------------------------------
- X
- XWakeUpModem:
- X; this routine sends three AT's to modem to give it a chance
- X; to sense baud rate. Returns number of times modem responded
- X; in D0.
- X
- X; D4 is used as a counter, D5 a result flag
- X
- X; Before anything, sends out the initialization string
- X; as delivered string is ATE0Q0V0S0=0 (for Hayes type modems)
- X; ATE0 Suppress echoing of commands
- X; ATQ0 Permit result codes
- X; ATV0 Numeric result codes
- X; ATS0=0 Don't pick up phone,
- X;
- X; after this initialization, modem should respond to an AT with 0<cr>
- X
- X MOVEM.L A0-A2/D1-D5, -(SP) ; save regs
- X
- X; send out the initialization string a couple of times
- X
- X MOVE.L #2, D4 ; we'll do this three times actually
- X
- XInitModem:
- X; initialize modem
- X LEA pbOut, A0 ; output parameter block
- X LEA InitStr, A1 ; the attention string
- X MOVE.L A1, ioBuffer(A0)
- X MOVE.L #AttnStr-InitStr,ioReqCount(A0) ; number of bytes to write
- X _Write
- X
- X DBRA D4,InitModem
- X
- X MOVE.L #30,A0
- X _Delay ; give it a sec to settle down
- X
- X LEA pbOut,A0
- X _KillIO ; flush buffer
- X
- X; now send out a couple of AT's to make sure we're talking to modem
- X
- X MOVE.L #3, D4 ; send four AT's
- X CLR.L D5 ; D5 contains number of resp rec'd from modem
- X
- XGetAttn:
- X; send an AT to modem
- X LEA pbOut, A0 ; output parameter block
- X LEA AttnStr, A1 ; the attention string
- X MOVE.L A1, ioBuffer(A0)
- X MOVE.L #endStr-AttnStr,ioReqCount(A0) ; number of bytes to write
- X _Write
- X
- X MOVE.L #30, A0 ; give modem .5 sec to respond
- X _Delay
- X
- X; let's see if we got an acknowlegement from modem (0<cr>)
- X BSR CheckPort ; any chars waiting?
- X
- X MOVE.L csParam(A0),D0 ; characters waiting
- X BEQ.S TryAgain ; nope
- X
- X BSR ReadPort ; yes, get them in inBuf
- X@2 TST.W ioResult(A0)
- X BGT.S @2 ; wait til ASYNC call returns
- X
- X LEA inBuf, A0
- X CMP.W #OKStr, (A0) ; did we get a 0<cr>?
- X BNE.S TryAgain ; no
- X
- XModemOK:
- X ADDQ.L #1, D5 ; modem responded, set flag
- X
- XTryAgain:
- X DBRA D4,GetAttn ; do it again
- X
- X MOVE.L D5,D0 ; return number of hits
- X
- X MOVEM.L (SP)+, A0-A2/D1-D5 ; restore regs
- X RTS
- X
- X;-----------------------------------------------------------------
- X; EOF qModem.asm
- X;-----------------------------------------------------------------
- X
- ________This_Is_The_END________
- if test `wc -l < qModem.asm` -ne 203; then
- echo 'shar: qModem.asm was damaged during transit'
- echo ' (should have been 203 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qParam.asm'
- if test -f qParam.asm; then echo 'shar: will not overwrite qParam.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qParam.asm
- X;----------------------------------------------------------------
- X; qParam.Asm
- X;----------------------------------------------------------------
- X;
- X; Parameter Subroutines for QDial
- X; ,
- X; (c)1985 Leo Laporte, all rights reserved
- X;
- X;
- X; The routines in this file are called from QDial.asm
- X; v1.0 21-Feb-86
- X;-----------------------------------------------------------------
- X; Includes
- X;-----------------------------------------------------------------
- X
- X INCLUDE qEqu.ASM ; q equates
- X
- X; defined in this file
- XXDEF ReadOldParms,StuffItem,CheckEm,ReadDone
- XXDEF SaveParams,GetText,SaveStr,SaveChecks,GetCheck
- XXDEF NextRB,GotRB,Its1200,Its300,Its2400,MakeWord
- XXDEF SaveDone,GetCtlHandle
- X
- X; defined in qData.ASM
- XXREF itemHit,theType,theControl,theRect,serConfig
- X
- X;-----------------------------------------------------------------
- X
- XReadOldParms:
- X; reads old resource record and posts strings into dialog box
- X
- X; stuff EditText records with strings from last time
- X MOVE.L (A3), A2 ; parms pointer
- X MOVE.W #stringT, D3 ; starting item number
- X
- XStuffItem:
- X; walk through myParams, setting up the text items in the dialog
- X MOVE.W D3, D0 ; the item number for the EditText box
- X BSR GetCtlHandle
- X
- X PUSH.L theControl
- X PUSH.L A2 ; address of string from QDIL
- X _SetIText ; post the string
- X
- X ADDA.L #strLen, A2 ; next string
- X
- X ADDQ.W #1, D3 ; next item
- X CMP.W #stringB, D3 ; last item?
- X
- X BLE.S StuffItem
- X
- X; now set check buttons
- X MOVE.L #chkT, D3 ; first check box
- X
- XCheckEm:
- X MOVE.W D3, D0
- X BSR GetCtlHandle
- X
- X PUSH.L theControl
- X PUSH.W (A2)+ ; item state from QDIL
- X _SetCtlValue
- X
- X ADDQ.W #1,D3 ; next item
- X CMP.W #chkB,D3 ; keep going til out of check boxes
- X BLE.S CheckEm
- X
- X; handle radio buttons
- X MOVE.L #radioT, D3 ; first radio button
- X ADD.W (A2), D3 ; offset from QDIL resource
- X
- X MOVE.W D3, D0 ; the item number
- X BSR GetCtlHandle
- X
- X PUSH.L theControl
- X PUSH.W #1 ; turn this one on
- X _SetCtlValue
- X
- XReadDone:
- X MOVE.L #noErr,D0
- X RTS
- X
- X;-----------------------------------------------------------------
- X
- XSaveParams:
- X; save parameters from the dialog as currently configured
- X LINK A6, #Scratch ; use the stack for scratch space
- X
- X; get QDIL resource
- X MOVE.L (A3),A2 ; QDIL resource pointer
- X
- X; stuff the new strings into the old resource
- X MOVE.L #stringT, D3 ; starting item number for EditText boxes
- XGetText:
- X MOVE.W D3, D0
- X BSR GetCtlHandle
- X
- X PUSH.L theControl
- X PEA Scratch(A6) ; where to store the string
- X _GetIText ; get the string
- X
- X LEA Scratch(A6),A0 ; pointer to string
- X
- X CMPI.B #strlen-1,(A0) ; is it bigger than limit?
- X BLE.S SaveStr ; no
- X
- X MOVE.B #strlen-1,(A0) ; shorten it to 40 chars
- X
- XSaveStr:
- X MOVE.L A2, A1 ; destination
- X MOVE.L #strlen, D0 ; count
- X _BlockMove ; copy string
- X
- X; go to next string
- X ADDA.W #strlen, A2 ; bump string pointer
- X ADDQ.W #1, D3 ; next item
- X CMP.W #stringB, D3 ; stop when we've added in all strings
- X BLE.S GetText
- X
- XSaveChecks:
- X; save the chkItems
- X MOVE.W #chkT, D3 ; starting item #
- X
- XGetCheck:
- X MOVE.W D3, D0 ; the item number
- X BSR GetCtlHandle
- X
- X CLR.W -(SP)
- X PUSH.L theControl
- X _GetCtlValue
- X
- X POP.W (A2)+ ; save control state
- X
- X ADDQ.W #1,D3 ; next item
- X CMP.W #chkB,D3 ; keep going til out of check boxes
- X BLE.S GetCheck
- X
- X; save radio button
- X MOVE.L #radioT,D3 ; first radio button
- XNextRB:
- X MOVE.W D3, D0
- X BSR GetCtlHandle
- X
- X CLR.W -(SP)
- X PUSH.L theControl
- X _GetCtlValue ; get its value
- X
- X POP.W D0 ; was it set?
- X BGT.S GotRB ; yes
- X
- X ADDQ.L #1,D3 ; next item
- X CMPI.W #radioB,D3 ; out of items?
- X BLE.S NextRB ; no, keep going
- X
- X MOVE.L #radioT+1,D3 ; no buttons set, so default to 1200 baud
- X
- XGotRB:
- X SUBI.W #radioT, D3 ; we want offset only
- X MOVE.W D3, (A2) ; save it
- X
- X; build serial configuration word (now that we know the baud rate)
- X SUBQ.W #1, D3
- X BMI.S Its300
- X BGT.S Its2400
- X
- XIts1200:
- X MOVE.L #baud1200, D3
- X BRA.S MakeWord
- X
- XIts300:
- X MOVE.L #baud300, D3
- X BRA.S MakeWord
- X
- XIts2400:
- X MOVE.L #baud2400, D3
- X
- XMakeWord:
- X; 1 stop, no parity, 8 data bits
- X ADDI.L #(stop10+noParity+data8), D3
- X
- X LEA serConfig, A0
- X MOVE.W D3,(A0) ; save it
- X
- X; we've read all the parameters, now save them
- X PUSH.L A3
- X _ChangedResource
- X
- X PUSH.L A3
- X _WriteResource ; save changes
- X
- XSaveDone:
- X UNLK A6 ; release scratch
- X RTS
- X
- X;-----------------------------------------------------------------
- X
- XGetCtlHandle:
- X; a subroutine since we do this so much
- X; the item number is in D0
- X
- X PUSH.L DCtlWindow(A4) ; the window pointer
- X PUSH.W D0
- X PEA theType
- X PEA theControl
- X PEA theRect
- X _GetDItem
- X
- X RTS
- X
- X
- X;-----------------------------------------------------------------
- X; EOF qParam.asm
- X;-----------------------------------------------------------------
- ________This_Is_The_END________
- if test `wc -l < qParam.asm` -ne 212; then
- echo 'shar: qParam.asm was damaged during transit'
- echo ' (should have been 212 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qVBL.asm'
- if test -f qVBL.asm; then echo 'shar: will not overwrite qVBL.asm'; else
- sed 's/^X//' << '________This_Is_The_END________' > qVBL.asm
- X;---------------------------------------------------------------------------
- X; qVBL.asm
- X;---------------------------------------------------------------------------
- X;
- X; The dialing routine installed into heap by QDial
- X; ,
- X; (c)1985 Leo Laporte, all rights reserved
- X;
- X; This is actually the heart of the program...
- X; v1.1 11-Mar-86
- X;
- X;---------------------------------------------------------------------------
- X; INCLUDES
- X;---------------------------------------------------------------------------
- X
- X INCLUDE qEqu.ASM
- X
- X;---------------------------------------------------------------------------
- X; SYMBOLS
- X;---------------------------------------------------------------------------
- X
- X; defined in this file
- XXDEF TaskStart,CheckPort,ReadPort,pbIn,pbOut,inBuf,TaskStop
- XXDEF vblcode,vblentry,numbers,currstr
- X
- X;---------------------------------------------------------------------------
- X; CODE
- X;---------------------------------------------------------------------------
- X
- XTaskStart:
- X BRA.S DoIt ; jump around identifier
- X DC.L 'QQQQ' ; identifying long word (used by QDial.asm)
- X
- XDoIt:
- X; the VBL dialing task
- X MOVEM.L D0-D7/A0-A6, -(SP) ; save all Regs
- X MOVE.L CurrentA5,A5 ; make sure A5 is valid
- X
- X; check to see if anyone else is using the serial port - if so, stop
- X; running immediately so as not to conflict...
- X BTST #7,PortAUse ; port in use?
- X BEQ KillVBL ; yes, stop
- X
- X; check for other routines in serial i/o queue
- X MOVE.L UTableBase,A0 ; address of unit table
- X MOVE.L 20(A0),A0 ; handle to input device driver
- X MOVE.L (A0),A0 ; now a pointer
- X TST.L dCtlQHead(A0) ; anything in the queue?
- X BGT KillVBL ; yes, stop
- X
- X MOVE.L UTableBase,A0 ; address of unit table
- X MOVE.L 24(A0),A0 ; handle to input device driver
- X MOVE.L (A0),A0 ; now a pointer
- X TST.L dCtlQHead(A0) ; anything in the queue?
- X BGT KillVBL ; yes, stop
- X
- X; make sure we're not still waiting for an ASYNC call
- X LEA pbOut, A0
- X TST.W ioResult(A0)
- X BGT.S NotYet ; in an ASYNC call
- X
- X LEA pbIn, A0
- X TST.W ioResult(A0)
- X BGT.S NotYet ; in an ASYNC call
- X
- X; see what the current state is, and act accordingly
- XRunTask:
- X MOVE.W VBLCode, D0 ; current state
- X
- X ADD D0,D0 ; *2 for table index
- X MOVE TaskTable(D0),D0 ; Point to routine offset
- X JMP TaskTable(D0) ; and jump to it
- X
- XTaskTable:
- X DC.W DrawPhone-TaskTable ; Turn on phone icon
- X DC.W Prepare-TaskTable ; Prepare for dialing
- X DC.W DialIt-TaskTable ; Send out dialing string
- X DC.W WriteCR-TaskTable ; Send a carriage return
- X DC.W DrawPhone-TaskTable ; Turn off phone icon
- X DC.W CheckModem-TaskTable ; Wait for modem's reponse
- X DC.W ParseResponse-TaskTable ; Handle modem's reponse
- X DC.W OnLine-TaskTable ; On line
- X
- XNotYet:
- X MOVE.L #10,D5 ; come back later
- X BRA VBLReturn
- X
- X
- X;---------------------------------------------------------------------------
- X
- XPrepare:
- X; set up BBS and Number to dial
- X
- X; get next string
- X MOVE.W currStr,D0 ; next str
- X CMPI.W #numStr,D0 ; at end?
- X
- X BLT.S @1 ; not yet
- X
- X LEA currStr,A0
- X MOVE.W #0,(A0) ; reset currStr
- X CLR.L D0
- X
- X@1:
- X LEA numbers,A2
- X MULU #strLen,D0 ; offset into string array
- X
- X ADD.W D0,A2 ; A1 points to next BBS
- X ADDA.L #strLen,A2 ; now it points to next number
- X
- X; should we dial it? Test count byte to see...
- X TST.B (A2) ; has it been cleared?
- X
- X BNE.S GetNumber ; no, get number to dial
- X
- X LEA currStr,A0 ; yes, go to next number
- X ADDQ.W #2,(A0) ; bump it
- X
- X BRA PDone ; come back later
- X
- XGetNumber:
- X; setup to write strings
- X
- X; empty out buffer (so that no stray characters confuse us later)
- X LEA pbOut, A0
- X _KillIO
- X
- X CLR.L D0
- X MOVE.B (A2), D0 ; count byte
- X MOVE.L D0, ioByteCount(A0) ; number of bytes to write
- X ADDQ.L #1,A2 ; step past count byte
- X MOVE.L A2, ioBuffer(A0) ; string to write
- X
- X; initialize timeout counter
- X LEA timeout,A0
- X MOVE.W #240,(A0) ; timeout after 40 seconds
- X
- X LEA VBLCode, A0
- X ADDQ.W #1, (A0) ; go to next task, next time
- X
- XPDone:
- X MOVE.L #10, D5 ; come back in 10 ticks
- X BRA VBLreturn ; return from VBL
- X
- X;---------------------------------------------------------------------------
- X
- XDrawPhone:
- X; posts the phone in the menu bar
- X BSR FlipPhone ; invert the phone
- X
- X LEA VBLCode, A0
- X ADDQ.W #1, (A0) ; go to next task, next time
- X
- X MOVE.L #10, D5 ; come back later
- X BRA VBLreturn ; return from VBL
- X
- X;---------------------------------------------------------------------------
- X
- XDialIt:
- X; now, output the dialing string
- X LEA currStr, A0 ; the current string index
- X ADDQ.W #2,(A0) ; bump it (by 2 to point to next BBS)
- X
- X LEA VBLCode, A0
- X ADDQ.W #1, (A0) ; go to next task, next time
- X
- X MOVE.L #10, D5
- X
- X LEA pbOut, A0 ; pb already initialized
- X _WriteASYNC
- X
- X BRA VBLreturn
- X
- X;---------------------------------------------------------------------------
- X
- XWriteCR:
- X; now, finish dialing by sending out a CR
- X LEA VBLCode, A0
- X ADDQ.W #1, (A0) ; go to next task, next time
- X
- X MOVE.L #10, D5
- X
- X BSR CROut ; write the CR
- X
- X LEA pbIn,A0 ; the input parameter block
- X CLR.L CSParam(A0) ; clear out character count
- X
- X BRA VBLreturn
- X
- X;---------------------------------------------------------------------------
- X
- XCheckModem:
- X; we've dialed the number - now wait for a response from the modem
- X LEA pbIn,A0
- X TST.L csParam(A0) ; anything waiting?
- X
- X BLE.S KeepWaiting ; no wait some more
- X
- X MOVE.L csParam(A0),D0 ; char count
- X BSR ReadPort ; get the response
- X
- X LEA VBLCode, A0
- X ADDQ.W #1, (A0) ; go to ParseResponse next time
- X
- X BRA.S CMDone
- X
- XKeepWaiting:
- X MOVE.W timeout, D0 ; check timeout counter
- X BEQ NextNumber ; timed out, dial next number
- X
- X LEA timeout, A0
- X SUBQ.W #1, (A0) ; decrement timeout counter
- X
- X; let's see if we got anything in the buffer...
- X BSR CheckPort
- X
- XCMDone:
- X MOVE.L #10, D5 ; check Status 6X a sec
- X BRA VBLreturn ; come back later
- X
- X;---------------------------------------------------------------------------
- X
- XParseResponse:
- X; we have a response, get it...
- X LEA inBuf, A0
- X CLR.L D0
- X MOVE.W (A0),D0 ; here's the response
- X
- X SUBI.W #OKStr,D0 ; turn into numeric code
- X LSR.W #8,D0
- X
- X BMI.S NextNumber ; don't understand code
- X
- X CMPI.W #$C,D0 ; maximum code returned
- X BGT.S NextNumber ; too high
- X
- X ADD.W D0,D0 ; *2 for table index
- X MOVE.W RespTable(D0),D0 ; Point to routine offset
- X JMP RespTable(D0) ; and jump to it
- X
- XRespTable:
- X DC.W NextNumber-RespTable ;0 OK (huh? try again)
- X DC.W Connect-RespTable ;1 CONNECT!
- X DC.W KillVBL-RespTable ;2 Ring
- X DC.W NextNumber-RespTable ;3 No Carrier
- X DC.W NextNumber-RespTable ;4 Error
- X DC.W Connect-RespTable ;5 Connect 1200
- X DC.W KillVBL-RespTable ;6 No Dial Tone (USR)
- X DC.W NextNumber-RespTable ;7 Busy (USR)
- X DC.W NextNumber-RespTable ;8 No Answer (USR)
- X DC.W NextNumber-RespTable ;9 Unused
- X DC.W Connect-RespTable ;A Connect 2400 (USR)
- X DC.W VBLReturn-RespTable ;B Ringing (wait some more)
- X DC.W KillVBL-RespTable ;C Voice
- X
- XConnect:
- X; notify user we have connect!
- X LEA pbIn,A0
- X MOVE #SerSetBuf,csCode(A0)
- X CLR.L ioBuffer(A0)
- X CLR.L csparam(A0) ; don't use my buffer anymore
- X CLR.L csParam+4(A0)
- X LEA pbIn,A0
- X _Control
- X
- X LEA pbIn,A0
- X _KillIO ; kill any pending i/o calls
- X
- X LEA pbOut,A0
- X _KillIO
- X
- X LEA VBLCode, A0
- X MOVE.W #QDOnline,(A0) ; next time do OnLine
- X
- X MOVE.L #10, D5 ; back in 10 ticks
- X BRA VBLreturn
- X
- X;---------------------------------------------------------------------------
- X
- XOnLine:
- X MOVE.L #20, D5 ; blink phone rapidly
- X
- X TST.L $282 ; is Switcher running?
- X BGT.S @1 ; yes, don't beep
- X BSR Beep
- X@1:
- X BSR FlipPhone
- X
- X BRA.S VBLreturn
- X
- X;---------------------------------------------------------------------------
- X
- XNextNumber:
- X; dial next number
- X; first send a carriage return (to hang up if still on line)
- X BSR CROut
- X
- X LEA VBLCode, A0
- X MOVE.W #0, (A0) ; start over again
- X
- X; this is the delay between dialing numbers - currently 1/2 sec
- X; in later versions this should be a user modifiable parameter
- X MOVE.L #30, D5 ; come back in 1/2 sec to dial next #
- X
- X BRA.S VBLreturn
- X
- X;---------------------------------------------------------------------------
- X
- XKillVBL:
- X; emergency exit
- X MOVE.W #0, D5 ; 0 VBLCount (i.e. never return)
- X
- X;---------------------------------------------------------------------------
- X
- XVBLreturn:
- X LEA VBLEntry, A0
- X MOVE.W D5, vblCount(A0) ; reset countdown
- X
- X MOVEM.L (SP)+, D0-D7/A0-A6 ; restore all Regs
- X RTS
- X
- X;----------------------------------------------------------------------
- X; SUBROUTINES
- X;----------------------------------------------------------------------
- X
- XCheckPort:
- X; checks to see if any characters are waiting
- X
- X LEA pbIn, A0 ; serial in
- X MOVE.W #serGetBuf, csCode(A0) ; check buffer
- X _Status ; get character count
- X
- X RTS
- X
- X;----------------------------------------------------------------------
- X
- XReadPort:
- X; reads characters from the modem port
- X; on entry D0 contains number of characters to read
- X
- X LEA pbIn, A0 ; serial in
- X LEA inBuf,A1
- X MOVE.L A1,ioBuffer(A0) ; where to put characters
- X MOVE.L D0, ioByteCount(A0) ; number of chars waiting
- X _ReadASYNC
- X
- X RTS
- X
- X;----------------------------------------------------------------------
- X
- XFlipPhone:
- X; draws a cute little phone in upper left
- X
- X; but only if the cursor isn't there (looks ugly)
- X CLR.B -(SP)
- X PUSH.L Mouse ; current mouse position
- X PEA PhoneRect ; telephone rectangle
- X _PtInRect ; is the mouse in the point?
- X
- X POP.B D0
- X BNE.S FPDone ; yes, don't draw phone
- X
- X; XOR phone onto menu bar
- X LEA Phone, A0 ; phone bit image
- X MOVE.L ScrnBase, A1 ; pointer to screen memory
- X
- X MOVE.W ScreenRow,D0 ; width of screen (rowBytes)
- X LSL.W #2,D0 ; *4 (=move down four lines)
- X ADDA.W D0, A1 ; jump down a bit
- X
- X MOVE.L #12, D3 ; copies 13 lines
- X
- XCopyImage:
- X MOVE.L (A1), D0 ; get current bit image
- X SWAP D0 ; phone goes on left side
- X
- X MOVE.W (A0)+,D1 ; get phone image
- X EOR.W D1, D0 ; copy it on
- X
- X SWAP D0 ; restore proper order
- X
- X MOVE.L D0, (A1) ; move it back
- X
- X ADDA.W ScreenRow, A1 ; next line down
- X DBRA D3, CopyImage ; do it again
- X
- XFPDone:
- X RTS
- X
- X;----------------------------------------------------------------------
- X
- XBeep:
- X; does a square wave beep
- X
- X LEA pbOut,A0 ; reuse old parameter block
- X
- X MOVE.W #-4, $18(A0) ; sound
- X LEA SWSynRec, A1
- X MOVE.L A1, ioBuffer(A0) ; my sound
- X MOVE.L #phone-SWSynRec, ioByteCount(A0)
- X _WriteASYNC ; make the sound
- X
- X RTS
- X
- X;----------------------------------------------------------------------
- X
- XCROut:
- X; outputs a carriage return
- X LEA pbOut, A0 ; output parameter block
- X LEA cr, A1 ; send a carriage return
- X MOVE.L A1, ioBuffer(A0)
- X MOVE.L #2, ioByteCount(A0) ; number of bytes to write
- X _WriteASYNC
- X
- X RTS
- X
- X;----------------------------------------------------------------------
- X; DATA
- X;----------------------------------------------------------------------
- X
- XVBLEntry:
- X DC.L 0 ; qLink
- X DC.W vType ; qType
- X DC.L 0 ; vblAddr
- X DC.W 10 ; vblCount
- X DC.W 0 ; vblPhase
- X
- Xnumbers DCB.B strSpace,0 ; dialing strings
- XcurrStr DC.W 0 ; next number to dial
- XVBLCode DC.W 0 ; VBLCode flag
- Xtimeout DC.W 0 ; countdown timer
- Xcr DC.W $0D,0 ; a carriage return
- XphoneRect DC.W 0,0,20,20 ; the little phone's rect
- XpbIn DCB.B ioQElSize, 0 ; io parameter block (input)
- XpbOut DCB.B ioQElSize, 0 ; io parameter block (output)
- XinBuf DCB.B bufLen,0 ; input buffer
- X
- X; here's the sound
- XSWSynRec DC.W -1 ; square wave synthesizer mode
- X DC.W 11875 ; count
- X DC.W 150 ; amplitude
- X DC.W 10 ; duration (in ticks)
- X DC.W -1
- X DC.W 0,0,0 ; terminating record
- X
- XPhone:
- X; this is the bit image of the telephone
- X DC.W $1FFC,$2002,$22A2,$3C1E
- X DC.W $0948,$1224,$1004,$1224
- X DC.W $1144,$1004,$1FFC
- X DC.W $0000,$0000
- X
- XTaskStop:
- X
- X;----------------------------------------------------------------
- X; EOF qVBL.asm
- X;----------------------------------------------------------------
- ________This_Is_The_END________
- if test `wc -l < qVBL.asm` -ne 457; then
- echo 'shar: qVBL.asm was damaged during transit'
- echo ' (should have been 457 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'Extracting qDial.r'
- if test -f qDial.r; then echo 'shar: will not overwrite qDial.r'; else
- sed 's/^X//' << '________This_Is_The_END________' > qDial.r
- X* qDial.r
- X* The RMAKER file for the Qdial Desk Accessory
- X* ,
- X* (c)1986 Leo Laporte, all rights reserved
- X* v1.1 11-Mar-86
- X
- Xb:QDial 1.1
- XDFILDMOV
- X
- XTYPE DRVR = PROC
- XQDial, 31 (32)
- Xb:qdial.code
- X
- XInclude b:qDial.PICT
- X
- X* The QDial dialog box
- X
- XTYPE DLOG
- XQDial Dialog, -15392 (32)
- XMacQueue Dialer 1.1
- X50 35 325 480
- XVisible NoGoAway
- X4
- X0
- X-15392
- X
- XTYPE DITL
- XQDial Dialog, -15392 (32)
- X26
- X
- XStatText Disabled
- X207 10 227 440
- X^0 ^1I
- X
- XBtnItem Enabled
- X240 50 260 140
- XDial
- X
- XBtnItem Enabled
- X240 177 260 267
- XInfo
- X
- XBtnItem Enabled
- X240 305 260 395
- XCancel
- X
- XStatText Disabled
- X7 10 23 166
- XName of BBS
- X
- XStatText Disabled
- X7 170 23 321
- XNumber to Dial
- X
- XStatText Disabled
- X7 403 23 450
- XDial?
- X
- XEditText Enabled
- X30 10 47 160
- X
- XEditText Enabled
- X30 170 47 390
- X
- XEditText Enabled
- X60 10 77 160
- X
- XEditText Enabled
- X60 170 77 390
- X
- XEditText Enabled
- X90 10 107 160
- X
- XEditText Enabled
- X90 170 107 390
- X
- XEditText Enabled
- X120 10 137 160
- X
- XEditText Enabled
- X120 170 137 390
- X
- XEditText Enabled
- X150 10 167 160
- X
- XEditText Enabled
- X150 170 167 390
- X
- XChkItem Enabled
- X30 410 48 445
- X
- XChkItem Enabled
- X60 410 78 445
- X
- XChkItem Enabled
- X90 410 108 445
- X
- XChkItem Enabled
- X120 410 138 445
- X
- XChkItem Enabled
- X150 410 168 445
- X
- XStatText Disabled
- X182 10 200 90
- XBaud Rate:
- X
- XRadioButton Enabled
- X180 130 200 190
- X300
- X
- XRadioButton Enabled
- X180 205 200 265
- X1200
- X
- XRadioButton Enabled
- X180 280 200 420
- X2400
- X
- X
- XType ALRT
- XQDial Error,-15392 (32)
- X100 50 200 462
- X-15391
- X7777
- X
- XType DITL
- XQDial Error, -15391 (32)
- X3
- X
- XButton
- X70 300 90 370
- XQuit
- X
- XStatText Disabled
- X11 70 31 400
- XError: ^0
- X
- XStatText Disabled
- X36 70 51 400
- X^1
- X
- X* The Help dialog
- XTYPE DLOG
- XQDial Help, -15391 (32)
- X
- X30 35 325 480
- XVisible NoGoAway
- X1
- X0
- X-15390
- X
- XType DITL
- XQDial Help,-15390 (32)
- X1
- X
- XBtnItem Enabled
- X260 177 280 267
- XOK
- X
- X
- X* This is the special QDial resource, composed of 10 strings
- X* of 40 charcters each, followed by the
- X* five check item settings and an offset for the baud rate
- X* (0=300, 1=1200, 2=2400)
- X
- XType QDIL = GNRL
- XQdial Numbers,-15392 (32)
- X.I
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0 0 0 0 0 0
- X0 0 0 0 0
- X1
- X
- X
- XType STR#
- XQDial Error Messages,-15392 (32)
- X12
- XCouldn't install VBL task
- XClosing qDial
- XCan't load QDIL resource
- XClosing qDial
- XCouldn't create qDial window
- XClosing desk accessory
- XCouldn't read or write parameters
- XClosing qDial
- XModem not responding
- XCheck connections and try again
- XInsufficient memory to run Qdial
- XClosing desk accessory
- X
- XType STR#
- XQDial Messages, -15391 (32)
- X3
- XNot online.
- XPress Dial to begin
- XPress Cancel - you're online with
- X
- X
- XType TEXT = GNRL
- XQdial Help,-15392 (32)
- X.S
- XMacQueue Dialer is not public domain, but you may use it without charge.\D
- X.S
- X Please give copies to anyone who might find it useful.\D\D
- X.S
- X% MacQueue Dialer only works with Hayes modems and compatibles.\D
- X.S
- X% Don't run a terminal program while MacQueue Dialer is dialing!\D
- X.S
- X% To stop dialing (or beeping), re-open MacQueue Dialer.\D\D
- X.S
- XFor the latest version, documentation, and complete assembly source call\D
- X.S
- XMacQueue I (415) 661-7374 - MacQueue II (415) 753-3002\D\D
- X.S
- XPlease forward comments and bug reports to Lo Laporte:\D
- X.S
- XCIS: 75106,3135 - Delphi: LAPORTE - GEnie: LAPORTE - Fidonet 125/2\D
- X.S
- XUSENET: {ptsfa, hplabs, dual, lll-crg, glacier}!well!laporte\D
- X.S
- XThanks to the MacQueue Founders for their help in bug testing this program!
- X
- X* EOF Q.R
- ________This_Is_The_END________
- if test `wc -l < qDial.r` -ne 243; then
- echo 'shar: qDial.r was damaged during transit'
- echo ' (should have been 243 bytes)'
- fi
- fi ; : end of overwriting check
- exit 0
-