home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / code / asm_qdia.sit < prev    next >
Encoding:
Text File  |  1988-05-14  |  62.6 KB  |  2,408 lines

  1. 11-May-88 21:30:18-MDT,66505;000000000000
  2. Return-Path: <u-lchoqu%sunset@cs.utah.edu>
  3. Received: from cs.utah.edu by SIMTEL20.ARPA with TCP; Wed, 11 May 88 21:29:09 MDT
  4. Received: by cs.utah.edu (5.54/utah-2.0-cs)
  5.     id AA04243; Wed, 11 May 88 21:29:34 MDT
  6. Received: by sunset.utah.edu (5.54/utah-2.0-leaf)
  7.     id AA29332; Wed, 11 May 88 21:29:26 MDT
  8. Date: Wed, 11 May 88 21:29:26 MDT
  9. From: u-lchoqu%sunset@cs.utah.edu (Lee Choquette)
  10. Message-Id: <8805120329.AA29332@sunset.utah.edu>
  11. To: rthum@simtel20.arpa
  12. Subject: qDial.asm.shar
  13.  
  14. #--------------------------------CUT HERE-------------------------------------
  15. #! /bin/sh
  16. #
  17. # This is a shell archive.  Save this into a file, edit it
  18. # and delete all lines above this comment.  Then give this
  19. # file to sh by executing the command "sh file".  The files
  20. # will be extracted into the current directory owned by
  21. # you with default permissions.
  22. #
  23. # The files contained herein are:
  24. #
  25. #   13 qDial.doc
  26. #   15 qDial.asm
  27. #    2 qEqu.asm
  28. #    2 qData.asm
  29. #    3 qHelp.asm
  30. #    5 qModem.asm
  31. #    5 qParam.asm
  32. #   12 qVBL.asm
  33. #    4 qDial.r
  34. #
  35. echo 'Extracting qDial.doc'
  36. if test -f qDial.doc; then echo 'shar: will not overwrite qDial.doc'; else
  37. sed 's/^X//' << '________This_Is_The_END________' > qDial.doc
  38. XDocumentation for Version 1.1
  39. X ,
  40. XLeo Laporte, 15 March 1986
  41. XSan Francisco, CA
  42. X
  43. X[ Mac metacharacters removed and lines wrapped by Lee Choquette ]
  44. X
  45. XMacQueue dialer (or QDial for short) is a desk accesory that installs a
  46. Xsmall auto-dialing routine into the system RAM of the Macintosh
  47. Xcomputer.  The dialing routine works in the background, dialing up to
  48. Xfive numbers at a time, until one of them answers.  
  49. X
  50. XQDial requires a Hayes or Hayes compatible modem.  I've used it
  51. Xsuccessfully on Hayes, Prometheus, and U.S. Robotics modems.  It will
  52. Xwork on any Macintosh computer, even the 128K models.  
  53. X
  54. X
  55. XFeatures of MacQueue Dialer
  56. X
  57. X*     QDial lets you dial up to five numbers sequentially.  It will
  58. Xkeep dialing until one of them answers.
  59. X
  60. X*    QDial works in the background, so your computer is not tied up
  61. Xin any way. 
  62. X
  63. X*    QDial is free.  You may use it and give it to your friends
  64. Xwithout charge.  The latest version, full documentation, and the
  65. Xassembly language source code is available from MacQueue BBS (415)
  66. X661-7374.  I will endeavor to provide support to all users through my
  67. XBBS.
  68. X
  69. XBugs
  70. X
  71. XQDial has one serious bug (that I know of).  If you run a terminal
  72. Xprogram while QDial is running, or if you open QDial while within a
  73. Xterminal program, it may hang your Macintosh.  So, do not to use any
  74. Xother terminal program at the same time as MacQueue.   
  75. X
  76. X
  77. X
  78. XGetting Started
  79. X
  80. XUsing the MacQueue Dialer is simple.   But, first you must install it.
  81. XUse Apple's Font/DA Mover to install QDial into the System files on the
  82. Xdisks you plan to use it with.  
  83. X
  84. XI'd also recommend installing it into the System you use with your
  85. Xterminal program, so that you can conveniently cancel QDial before
  86. Xrunning your terminal program. 
  87. X
  88. XAfter you've installed QDial into your System file, follow these steps
  89. Xto run it for the first time.
  90. X
  91. X1. Open the QDial desk accessory.  (Once you've installed it, it should
  92. Xappear under the Apple menu.)
  93. X
  94. X2. Next, enter the names and numbers of the BBS's you want to dial.  You
  95. Xcan use the TAB key to move from box to box.  The boxes on the left are
  96. Xfor the BBS names.   Enter the appropriate dialing string in the right
  97. Xhand boxes.  The first three letters of the dialing string should be ATD
  98. Xfollowed by P if your phone uses Pulse Dialing, or T if it uses Touch
  99. XTones.  Check your modem manual if you're not sure.  The characters ATDT
  100. Xor ATDP should be followed by the phone number of the BBS.   The dialing
  101. Xstring can be up to 40 characters long.  If it's longer, QDial will
  102. Xshorten it to 40 characters. 
  103. X
  104. X4. Click in the check box under the words Dial? if you want QDial to
  105. Xdial the number.  QDial will only dial those numbers whose Dial? box has
  106. Xbeen checked.  If no boxes are checked, QDial will save your entries and
  107. Xexit without doing any dialing at all.
  108. X
  109. X5.    After you've entered all the names and numbers you want to dial,
  110. Xselect the baud rate by clicking on the appropriate radio button.
  111. X
  112. X6. Press the Dial button to begin dialing. 
  113. X
  114. XQDial will access the disk briefly as it saves the names and numbers
  115. Xyou've entered.  Each time you use QDial, it saves your settings for
  116. Xnext time.
  117. X
  118. XAfter QDial takes a second to initialize the modem it will begin
  119. Xdialing.  Each time it dials, QDial blinks a small phone icon to the
  120. Xleft of the Apple in your menu bar to let you know it's working.
  121. X
  122. XQDial will dial each number in sequence until one of them answers.  If
  123. Xyour telephone rings during that time, QDial will stop dialing
  124. Ximmediately.  Since it dials so quickly, however, your phone will be
  125. Xeffectively tied up during the time you use QDial.  
  126. X
  127. XWhile QDial is working you can use your Macintosh normally.   It will
  128. Xcontinue dialing no matter what you do.  It even continues dialing
  129. Xthrough some system crashes!
  130. X
  131. XMost programs will not be affected in any way by QDial.   Of course, you
  132. Xwon't be able to use your modem or telephone while QDial is dialing.
  133. XNor will you be able to run any terminal programs.  If you run a
  134. Xterminal program while QDial is dialing it may crash your Macintosh.
  135. X
  136. XWhen a BBS answers QDial, the program will flash the telephone icon
  137. Xrapidly, and beep at you if you have the sound turned up.  It's fairly
  138. Xinsistent, but don't let it scare you.  You can finish up what you're
  139. Xdoing before responding to QDial.  Like the dialing, the beeping and
  140. Xblinking should not affect your work (unless you're playing music, in
  141. Xwhich case you may get a very strange combination of sounds).  If you're
  142. Xrunning under Switcher, QDial will blink, but won't make any sound.
  143. X
  144. XWhen you're ready to turn off QDial's alarm, just reopen the desk
  145. Xaccessory.  The alarm will stop immediately.  QDial will also display a
  146. Xmessage telling you which BBS you're on-line with.  Press the Cancel
  147. Xbutton now, and run your terminal program.  Log on as usual.  QDial has
  148. Xdone its job!
  149. X
  150. X
  151. XModem Information
  152. X
  153. XQDial is designed to work with Hayes or Hayes compatible modems.  Most
  154. Xauto-dialing modems on the market today will work.  When you first open
  155. Xthe desk accessory it send the initialization string "ATE0Q0V0S0=0" to
  156. Xthe modem.   The AT is to get your modem's attention.  E0 means don't
  157. Xecho commands, Q0 means send result codes, V0 tells the modem to use
  158. Xdigits not words for the result codes, and S0=0 makes sure the modem
  159. Xdoesn't answer the phone if it rings.
  160. X
  161. XThis initialization makes it much easier for QDial to communicate with
  162. Xthe modem, but it may make it more difficult for you.  To restore your
  163. Xold settings after QDial has messed them up, type ATZ<return> followed
  164. Xby an AT<return>, your modem should answer back with the familiar "OK."
  165. XDon't do this before QDial has finished its dialing, though, or it will
  166. Xstop working!
  167. X
  168. XIf your modem doesn't respond as expected to the initialization, QDial
  169. Xwill display a "Modem Not Responding" error and exit.  Check to make
  170. Xsure your modem is on and connected correctly to the modem port.  QDial
  171. Xdoes not talk to the Printer port, since Apple does not recommend using
  172. Xthat port at speeds higher than 300 baud.  If I get a lot of complaints
  173. Xabout this, I'll release a version that uses the printer port.
  174. X
  175. XQDial knows about the standard Hayes numeric result codes, and can also
  176. Xunderstand extended codes returned by U.S. Robotics Courier 2400 modems
  177. X(in the ATX3-6 modes) and Prometheus ProModems.  QDial will be confused
  178. Xby the ProModem's extended numeric codes, however (ATV2).  For other
  179. Xmodems, make sure you're in the most Hayes compatible state before using
  180. XQDial.
  181. X
  182. XThese are the result codes that QDial understands:
  183. X
  184. XNumeric    Verbal        Action
  185. X0     OK        Next number
  186. X1     CONNECT        Honk and blink like crazy
  187. X2    RING         Suspend operation
  188. X3    NO CARRIER    Dial next number
  189. X4    ERROR        Dial next number
  190. X5    CONNECT 1200    Honk and blink
  191. X6    NO DIAL TONE    Suspend operation
  192. X7    BUSY        Dial next number
  193. X8    NO ANSWER    Dial next number
  194. X9    unused        Dial next number
  195. X10    CONNECT 2400    Honk and blink
  196. X11    RINGING        No action
  197. X12    VOICE        Next number
  198. X
  199. XIf QDial does not receive one of these result codes after 40 seconds, it
  200. Xwill hang up and try the next number in sequence.
  201. X
  202. XIf you are using a modem that recognizes busy signals QDial will work
  203. Xespecially quickly.  QDial on a ProModem can dial up to eight times a
  204. Xminute.  That's because it hangs up as soon as it hears a busy signal.
  205. XYou can set your Courier modem to do the same by running a terminal
  206. Xprogram and typing "ATX3<return>" before you run QDial.   Or you can add
  207. Xthe X3 command to  one of the dialing strings within the QDial dialog
  208. Xbox (e.g. ATX3DT 661-7374).
  209. X
  210. XUnfortunately, Hayes modems do not recognize busy signals.  They will
  211. Xwait 30 seconds before hanging up and returning the NO CARRIER result
  212. Xcode.  At that rate you'll only be able to dial twice a minute.
  213. X
  214. XYou can speed things up by opening a terminal program and typing
  215. X"ATS7=15<return>".  (Make sure to exit the terminal program before you
  216. Xrun QDial.)  You can also use this command from within QDial by adding
  217. Xthe S7=15 to one of the dialing strings (e.g. ATS7=15DT 661-7374).
  218. X
  219. XThe ATS7 commands sets the length of time the modem waits for carrier.
  220. XATS7=15 tells it to wait 15 seconds.  You can set it for an even shorter
  221. Xlength of time, but experiment to make sure you're giving the telephone
  222. Xcompany enough time to reach the BBS you're dialing.  You could even
  223. Xgive different BBS's different amounts of time to respond by varying the
  224. XS7 command within QDial's dialing strings.  Consult your modem manual
  225. Xfor more information.
  226. X
  227. XTechnical Background
  228. X
  229. XQDial was written in assembly language using Apple's MDS Assembler and
  230. XLinker.  All the source files are available from MacQueue BBS.  I will
  231. Xalso post the source on CompuServe, Delhpi, and GEnie.  
  232. X
  233. XIf you modify QDial, please leave my copyright notices intact.  If you
  234. Xpost modified versions of QDial, please indicate that you have modified
  235. Xit.  I'd also appreciate it if you'd send me a copy, or upload it to
  236. XMacQueue.
  237. X
  238. XQDial is really two programs.  The desk accessory gets the dialing
  239. Xinformation from the user and passes it to a small autodialing routine,
  240. Xinstalled into the system heap.  If you want to find the dialing routine
  241. Xusing a debugger, just trace down the VBL queue until you find a routine
  242. Xwith 'QQQQ' in bytes 3-6.
  243. X
  244. XThe dialing routine runs as a VBL task.   60 times a second the
  245. XMacintosh suspends processing for a few milliseconds while it waits for
  246. Xthe electron gun in the monitor to move from the bottom of the screen to
  247. Xthe top.  During that period - called the Vertical BLank interval -
  248. Xshort routines may take over the system briefly.  
  249. X
  250. XQDial uses that interval to dial the telephone and later to wait for the
  251. Xmodem's response.  By using the VBL interval, QDial can autodial without
  252. Xtaking processor time away from any other running programs.  In effect,
  253. XQDial implements multi-tasking on the Macintosh.  
  254. X
  255. XThis, incidentally, is why QDial can cause another program trying to use
  256. Xthe modem port to crash.   QDial tries to be well behaved.  Before it
  257. Xuses the modem port it checks to see if anyone else is using it.  If
  258. Xsomeone is, QDial will stop working.  Unfortunately, if the other
  259. Xprogram still manages to use the modem port at the same time as QDial,
  260. Xthe computer will hang.  I'm still working on ways around this, but
  261. Xuntil then, remember not to use the modem port while QDial is running!
  262. X
  263. XQDial uses private resources to store important information.  All
  264. Xstrings used within QDial are stored in STR# resources.   Your dialing
  265. Xinformation and baud rate is stored in a resource of type QDIL.  All of
  266. XQDial's resources are named to make them easy to find using ResEdit.
  267. X
  268. X
  269. XError Messages
  270. X
  271. XIf Qdial has a problem, it will return one of the following error
  272. Xmessages before exiting.
  273. X
  274. XCouldn't install VBL task
  275. X
  276. XSomething went wrong when QDial was trying to install its VBL routine.
  277. XYou'll probably have to reboot the computer to get it to work.  If that
  278. Xdoesn't help, there may be some incompatibility between the System
  279. Xhardware or software.  Please drop me a line at one of the addresses
  280. Xlisted in the Info box in QDial and let me know about the problem.
  281. X
  282. XCan't load QDIL resource
  283. X
  284. XThe data QDial saved from your last use has been damaged or is missing.
  285. XYou'll have to reinstall QDial.  If you continue to get this message,
  286. Xyou have an incomplete copy of the QDial desk accessory.
  287. X
  288. XCouldn't create qDial window
  289. X
  290. XInsufficient memory to install the window, or the window resource is
  291. Xmissing from the QDial program.  
  292. X
  293. XCouldn't read or write parameters
  294. X
  295. XThe resource manager won't let QDial save your BBS names and numbers.
  296. XProbably caused by insufficient disk space.  
  297. X
  298. XModem not responding
  299. X
  300. XThis is the only error message you're likely to see.  Maybe your modem
  301. Xis turned off, or isn't connected to the modem port, or the cabling is
  302. Xwrong, or it's not a true Hayes Compatible.  Try turning your modem off
  303. Xand on again.  You modem must be capable of responding to the Hayes/AT
  304. Xcommand set.
  305. X
  306. XInsufficient memory to run Qdial
  307. X
  308. XThere wasn't enough memory in the System heap to copy the QDial dialing
  309. Xroutine.  QDial only needs 1200 bytes, but some programs use so much
  310. Xmemory in the System heap that there's no room for QDial.   Try running
  311. XQDial with a different combination of programs running.  You may have to
  312. Xturn the computer off and on again to recover enough memory.
  313. X
  314. X
  315. XI hope QDial proves of use to you.   Please let me know how you like it!
  316. X         ,
  317. X        Leo Laporte
  318. X        Sysop, MacQueue BBS
  319. X        637 Frederick St.
  320. X        San Francisco, CA 94117
  321. X    
  322. X        CompuServe 75106,3135
  323. X        Delphi  LAPORTE
  324. X        GEnie  LAPORTE
  325. X        UUCP hplabs!well!laporte
  326. X
  327. ________This_Is_The_END________
  328. if test `wc -l < qDial.doc` -ne 289; then
  329.     echo 'shar: qDial.doc was damaged during transit'
  330.   echo '      (should have been 289 bytes)'
  331. fi
  332. fi        ; : end of overwriting check
  333. echo 'Extracting qDial.asm'
  334. if test -f qDial.asm; then echo 'shar: will not overwrite qDial.asm'; else
  335. sed 's/^X//' << '________This_Is_The_END________' > qDial.asm
  336. X;----------------------------------------------------------------
  337. X;    qdial.asm
  338. X;----------------------------------------------------------------
  339. X;
  340. X;     QDial - a program that installs a dialing routine into VBL
  341. X;             ,
  342. X;    (c)1986 Leo Laporte, all rights reserved
  343. X;
  344. X;    This is the main program, it sets up a desk accessory to
  345. X;    get user input, installs the VBL routine, and starts it running.
  346. X;    
  347. X;    cf.     qParam.asm - user parameter routines (maintains QDIL resource)
  348. X;        qModem.asm - modem initialization routines
  349. X;        qHelp.asm  - the help routines
  350. X;        qVBL.asm   - the actual VBL dialing routine
  351. X;
  352. X;    all files are formatted for 9-point Monaco
  353. X;
  354. X;    v1.0    21-Feb-86
  355. X;
  356. X;-----------------------------------------------------------------
  357. X;     Includes
  358. X;-----------------------------------------------------------------
  359. X
  360. X    INCLUDE        qEqu.ASM        ; q equates
  361. X
  362. X; defined in this file
  363. XXDEF    qEntry,qTitle,qOpen,GetParams,ItemTable,Failure
  364. XXDEF    Done,NoWindow,QDone,Install,SetBtn,ClearStr,ItemSet
  365. XXDEF    InstDone,ChkItem,ClearEm,CheckIt,KillOldVBL
  366. XXDEF    TestTask,Running,SetUpRes,CreateWindow,DialogOK
  367. XXDEF    CWDone,GetIndString,FindStr,NextStr,GotStr
  368. X
  369. X; defined in qParam.ASM
  370. XXREF    SaveParams, ReadOldParms,GetCtlHandle
  371. X
  372. X; defined in qModem.asm
  373. XXREF    SetUpModem
  374. X
  375. X; defined in qVBL.asm
  376. XXREF    TaskStart, TaskStop, VBLEntry
  377. XXREF    pbIn, pbOut,numbers,currStr,VBLCode
  378. X
  379. X; defined in qHelp.asm
  380. XXREF    Help
  381. X
  382. X; defined in qData.ASM
  383. XXREF  itemHit,theType,theControl,theRect,myResBase,connected,bbs
  384. X
  385. X;-----------------------------------------------------------------
  386. X;     REGISTER USAGE
  387. X;-----------------------------------------------------------------
  388. X
  389. X;    A3 contains a handle to the QDIL resource
  390. X;    A4 contains a pointer to the DCE
  391. X
  392. X;-----------------------------------------------------------------
  393. X;     DRVR FLAGS
  394. X;-----------------------------------------------------------------
  395. X
  396. XqEntry:
  397. X    DC.W    $0000            ; respond to no calls
  398. X    DC.W    0            ; no periodic action
  399. X    DC.W    $016A            ; mousedown, keydown, update, activate
  400. X    DC.W    0            ; no menu
  401. X
  402. X    DC.W    qOpen-qEntry        ; open routine
  403. X    DC.W    qDone-qEntry        ; prime - unused
  404. X    DC.W    qDone-qEntry        ; control - unused
  405. X    DC.W    qDone-qEntry        ; status - unused
  406. X    DC.W    qDone-qEntry        ; close -unused
  407. X
  408. XqTitle:
  409. X    DC.B  6,  0, 'QDial'        ; Pascal string, begin name with null
  410. X    DC.B ')1986 Lo Laporte,' 
  411. X    DC.B 'all rights reserved.'
  412. X    DC.B 'Electronic distribution OK'    ; room for longer name
  413. X    
  414. X    .ALIGN 2
  415. X
  416. X
  417. X;-----------------------------------------------------------------
  418. X;     OPEN
  419. X;-----------------------------------------------------------------
  420. X
  421. XqOpen:  
  422. X    MOVEM.L    A0-A4/D0-D5,-(SP)    ; save regs
  423. X    MOVE.L    A1,A4            ; move DCE pointer to a safe register
  424. X
  425. X; Save the application's port because the ROM doesn't do it for us on Open.
  426. X    CLR.L    -(SP)            ; keep the current port here
  427. X    PUSH.L    SP            ; pass GetPort a pointer
  428. X    _GetPort            ; get it, now it's on top of stack
  429. X
  430. X    MOVE.L    #VBLErr,D6        ; error code, just in case
  431. X    BSR    KillOldVBL        ; remove old VBL task, if any
  432. X    BNE    Failure            ; error handler
  433. X
  434. X    MOVE.L    #NoResErr,D6        
  435. X    BSR    SetUpRes        ; load in parameters resource
  436. X    BNE    Failure
  437. X
  438. X    MOVE.L    #WindErr,D6        
  439. X    BSR    CreateWindow        ; create the dialog window
  440. X    BNE    Failure
  441. X
  442. X    MOVE.L    #ParmErr,D6
  443. X    BSR    ReadOldParms        ; insert last values
  444. X    BNE    Failure
  445. X    
  446. X    _InitCursor        ; get arrow cursor
  447. X    
  448. XGetParams:
  449. X; main program loop
  450. X    PUSH.L    #0        ; no filter proc
  451. X    PEA    itemHit        ; returns item
  452. X    _ModalDialog
  453. X
  454. X; case out on item hit
  455. X    MOVE.W    itemHit, D0
  456. X    MOVE.W    D0, D4            ; save the item hit (for chkItem)
  457. X
  458. X    ADD    D0,D0            ; *2 for table index
  459. X    MOVE    ItemTable(D0),D0    ; Point to routine offset
  460. X    JMP    ItemTable(D0)        ; and jump to it
  461. X
  462. XItemTable:
  463. X    DC.W    GetParams-ItemTable    ; Item 0 - unused
  464. X    DC.W    GetParams-ItemTable    ; StatText
  465. X    DC.W    Install-ItemTable    ; DialButton
  466. X    DC.W    Help-ItemTable        ; Help Button 
  467. X    DC.W    Done-ItemTable        ; Cancel Button
  468. X    DC.W    GetParams-ItemTable    ; StatText
  469. X    DC.W    GetParams-ItemTable    ; StatText
  470. X    DC.W    GetParams-ItemTable    ; StatText
  471. X    DC.W    GetParams-ItemTable    ; EditText
  472. X    DC.W    GetParams-ItemTable    ; EditText
  473. X    DC.W    GetParams-ItemTable    ; EditText
  474. X    DC.W    GetParams-ItemTable    ; EditText
  475. X    DC.W    GetParams-ItemTable    ; EditText
  476. X    DC.W    GetParams-ItemTable    ; EditText
  477. X    DC.W    GetParams-ItemTable    ; EditText
  478. X    DC.W    GetParams-ItemTable    ; EditText
  479. X    DC.W    GetParams-ItemTable    ; EditText
  480. X    DC.W    GetParams-ItemTable    ; EditText
  481. X    DC.W    ChkItem-ItemTable    ; ChkItem 1
  482. X    DC.W    ChkItem-ItemTable    ; ChkItem 2
  483. X    DC.W    ChkItem-ItemTable    ; ChkItem 3
  484. X    DC.W    ChkItem-ItemTable    ; ChkItem 4
  485. X    DC.W    ChkItem-ItemTable    ; ChkItem 5
  486. X    DC.W    GetParams-ItemTable    ; StatText
  487. X    DC.W    ChkItem-ItemTable    ; RadioButton 300
  488. X    DC.W    ChkItem-ItemTable    ; RadioButton 1200
  489. X    DC.W    ChkItem-ItemTable    ; RadioButton 2400
  490. X    
  491. XFailure:
  492. X; general purpose error handler
  493. X; error code in D6
  494. X    MOVE.W    myResBase, D0
  495. X    ADD.W    #ErrStr,D0    ; get resource id
  496. X    
  497. X    CLR.L    -(SP)        
  498. X    PUSH.L    #'STR#'
  499. X    PUSH.W    D0
  500. X    _GetResource        ; get error strings
  501. X
  502. X    POP.L    A0
  503. X    CMPA.L    #0,A0        ; did we get them?
  504. X    BGT.S    @1        ; yes, continue
  505. X
  506. X    BRA.S    Done        ; no, just quit
  507. X
  508. X@1:
  509. X    MOVE.L    D6, D0        ; error code is actually index into STR#
  510. X    BSR GetIndString
  511. X
  512. X    PUSH.L    A1        ; error string #1
  513. X
  514. X    ADDQ.L    #1, D0
  515. X    BSR GetIndString
  516. X
  517. X    PUSH.L    A1        ; error string #2
  518. X
  519. X    PUSH.L    #0        ; rest are blank
  520. X    PUSH.L    #0
  521. X    _ParamText        ; set text in Alert
  522. X
  523. X; display error alert and exit
  524. X    MOVE.W    myResBase, D0
  525. X    ADD.W    #ErrAlert,D0    ; get resource id
  526. X
  527. X    CLR.W    -(SP)
  528. X    PUSH.W    D0
  529. X    PUSH.L    #0        ; no filter proc
  530. X    _StopAlert
  531. X
  532. X    POP.W    D0
  533. X
  534. XDone:
  535. X; release the resource handle
  536. X    MOVE.L    A3,A0
  537. X    _HUnlock
  538. X
  539. X    PUSH.L    A3
  540. X    _ReleaseResource
  541. X    
  542. X; throw away the window
  543. X    TST.L    DCtlWindow(A4)        ; is there a window?
  544. X    BEQ.S    NoWindow
  545. X    
  546. X    MOVE.L    DCtlWindow(A4),-(SP)    ; push the window
  547. X    CLR.L    DCtlWindow(A4)        ; clear it
  548. X    _DisposWindow            ; and forget it
  549. X
  550. XNoWindow:
  551. X    _SetPort            ; old port still on the stack
  552. X    MOVEM.L    (SP)+,A0-A4/D0-D5    
  553. XQDone:
  554. X    MOVE    #NoErr,D0        ; no error
  555. X    RTS                ; all through, return to Finder
  556. X
  557. X;----------------------------------------------------------------
  558. X;    ROUTINES
  559. X;----------------------------------------------------------------
  560. X
  561. XInstall:
  562. X; copies dialing routine and associated data structures into system heap,
  563. X; initializes VBL queue element, and installs it into VBL task queue.
  564. X
  565. X    MOVE.L    #ParmErr,D6
  566. X    BSR    SaveParams    ; save user's parameters
  567. X    BNE    Failure
  568. X
  569. X    MOVE.L    #ModemErr,D6
  570. X    BSR    SetUpModem    ; initialize modem
  571. X    BNE    Failure        ; no modem on line
  572. X
  573. X    MOVE.L    (A3),A1        ; pointer to parameters
  574. X
  575. X; jump to buttons
  576. X    ADD.L    #strSpace, A1
  577. X    
  578. X; make sure at least one button was checked
  579. X    CLR.L    D1            ; zero counter
  580. X    MOVE.L    #chkB-chkT, D0        ; count -1
  581. XSetBtn:
  582. X    ADD.W    (A1)+, D1
  583. X    DBRA    D0, SetBtn
  584. X
  585. X    TST.L    D1            ; any numbers to dial?
  586. X    BEQ.S    Done            ; no, do nothing
  587. X
  588. X; Copy dialing data into VBL task
  589. X    MOVE.L    (A3), A0        ; pointer to parameters (source)
  590. X    LEA    numbers, A1        ; pointer to VBL data space (dest)
  591. X    MOVE.L    #strSpace, D0        ; count
  592. X    _Blockmove            ; copy dialing data
  593. X
  594. X; zero out the count byte of numbers we don't want to dial
  595. X    MOVE.L    (A3),A0            ; index into parameters
  596. X    ADDA.L    #strSpace, A0        ; now points to buttons
  597. X    LEA    numbers,A1        ; VBL data space
  598. X    ADDA.L    #strLen,A1        ; point to BBS numbers
  599. X
  600. X    MOVE.W    #chkB-chkT,D0        ; loop counter
  601. XClearStr:
  602. X    TST.W    (A0)+            ; is check item set?
  603. X    BGT.S    ItemSet            ; yes, next string
  604. X
  605. X    CLR.B    (A1)            ; no, zero count byte in dialing string
  606. X
  607. XItemSet:
  608. X    ADDA.L    #strLen*2,A1        ; jump to next dialing string
  609. X    DBRA    D0,ClearStr        ; loop
  610. X
  611. X; initialize VBL task flags
  612. X    LEA    currStr,A0
  613. X    CLR.W    (A0)            ; start with first number
  614. X
  615. X    LEA    VBLCode,A0        
  616. X    CLR.W    (A0)            ; start at beginning
  617. X
  618. X; get some memory in system heap for VBL task
  619. X    MOVE.L    #TaskStop-TaskStart, D0    ; space for the code
  620. X    _NewPtrSYS
  621. X
  622. X    MOVE.L    #memErr,D6
  623. X    TST.L    D0            ; did we get a pointer?
  624. X    BNE    Failure            ; no
  625. X
  626. X    MOVE.L    A0,A2            ; yes, save pointer
  627. X
  628. X    LEA    VBLEntry, A1         
  629. X    MOVE.L    A2, vblAddr(A1)        ; initialize VBL queue entry
  630. X
  631. X; copy the whole thing into system heap
  632. X    LEA    TaskStart, A0        ; source
  633. X    MOVE.L    A2, A1            ; dest
  634. X    MOVE.L    #TaskStop-TaskStart, D0    ; size
  635. X    _BlockMove
  636. X    
  637. X; install task
  638. X    LEA    VBLEntry-TaskStart(A2), A0    ; new address of VBLEntry
  639. X    _VInstall            ; go baby - should be dialing now
  640. X
  641. X    BEQ    InstDone
  642. X
  643. X; VInstall error
  644. X    MOVE.L    #VBLErr, D6
  645. X    BRA    Failure
  646. X    
  647. XInstDone:
  648. X; all through, say bye, bye
  649. X    BRA    Done
  650. X
  651. X;----------------------------------------------------------------
  652. X
  653. XChkItem:
  654. X; inverts state of item hit (radio button or check box)
  655. X; D4 contains the item hit
  656. X
  657. X    CMP.W    #radioT, D4    ; was it a radio button?
  658. X    BLT.S    CheckIt        ; no, continue
  659. X
  660. X    MOVE.L    #radioT, D5    ; yes, clear old radio settings first
  661. XClearEm:
  662. X    MOVE.L    D5,D0
  663. X    BSR     GetCtlHandle    ; get a handle to that control (in theControl)
  664. X
  665. X; clear the radio button
  666. X    PUSH.L    theControl
  667. X    PUSH.W    #0
  668. X    _SetCtlValue        ; clear it
  669. X
  670. X    ADDQ.L    #1, D5        ; next radio btn
  671. X    CMP.L    #radioB, D5    ; any left?
  672. X    BLE.S    ClearEm        ; no
  673. X
  674. XCheckIt:
  675. X; get a handle to the item
  676. X    MOVE.W    D4, D0        ; the item number
  677. X    BSR     GetCtlHandle
  678. X
  679. X; get its current value
  680. X    CLR.W    -(SP)
  681. X    PUSH.L    theControl    ; handle to our item
  682. X    _GetCtlValue
  683. X
  684. X    POP.W    D0        ; current value
  685. X
  686. X; invert it
  687. X    EORI.W    #1, D0
  688. X
  689. X; and reset the value
  690. X    PUSH.L    theControl
  691. X    PUSH.W    D0
  692. X    _SetCtlValue
  693. X
  694. X    BRA    GetParams    ; all done
  695. X
  696. X;----------------------------------------------------------------
  697. X;    SUBROUTINES
  698. X;----------------------------------------------------------------
  699. X
  700. XKillOldVBL:
  701. X; this routine removes the old VBL task if there was one
  702. X; also sets a flag (connected), so that da can display appropriate 
  703. X; message later
  704. X
  705. X; default to "not connected"
  706. X    LEA    connected,A0
  707. X    CLR.W    (A0)            ; clear already connected flag
  708. X
  709. X; check to see if a task has been installed
  710. X    MOVE.L    #VBLQueue, A0        ; VBL Queue header
  711. X    MOVE.L    qHead(A0), A0        ; address of first entry
  712. X
  713. XTestTask:
  714. X    CMPA.L    #0, A0            ; is there a task?
  715. X    BEQ    KODone
  716. X    MOVE.L    VBLAddr(A0), A1        ; address of task
  717. X    ADDQ.L    #2, A1            ; jump past BRA instruction
  718. X    MOVE.L    (A1), D0
  719. X    CMP.L    #'QQQQ', D0        ; is this our routine?
  720. X    BEQ.S    Running
  721. X    MOVE.L    qLink(A0), A0        ; get next entry
  722. X    BRA.S    TestTask        ; continue testing
  723. X
  724. XRunning:
  725. X; there is a dialing task running, so remove it
  726. X    MOVE.L    A0,A2            ; save pointer    
  727. X    _VRemove            ; remove the task from the queue
  728. X    TST.L    D0            ; removed OK?
  729. X    BNE    KODone
  730. X
  731. X; are we on line?
  732. X    MOVE.L    VBLAddr(A2),A0            ; address of the task
  733. X    MOVE.W    VBLCode-TaskStart(A0),D0    ; the current VBL state
  734. X    CMPI.W    #QDOnline,D0            ; on-line?
  735. X    BNE.S    RecoverPtr            ; no
  736. X
  737. X; set connected flag
  738. X    LEA    connected,A0
  739. X    MOVE.W    #-1,(A0)            ; connected true
  740. X
  741. X; save BBS name (get it from VBL data area)
  742. X    MOVE.L    VBLAddr(A2),A0            ; address of the task
  743. X
  744. X    MOVE.W    currStr-TaskStart(A0),D0        
  745. X    SUBI.W    #2,D0                ; restore last # dialed
  746. X
  747. X    LEA    numbers-TaskStart(A0),A0    ; pointer to numbers
  748. X    MULU    #strlen,D0            ; offset to current BBS
  749. X    ADDA.L    D0,A0                ; now A0 points to the BBS String
  750. X
  751. X    LEA    bbs,A1        ; where to copy it
  752. X    CLR.L    D0
  753. X    MOVE.B    (A0),D0        ; string size
  754. X    ADDQ.L    #1,D0        ; +1 for count byte
  755. X    _BlockMove
  756. X    
  757. XRecoverPtr:
  758. X; dispose of the memory used by the task
  759. X    MOVE.L    VBLAddr(A2),A0        ; pointer to the routine
  760. X    _DisposPtr            ; release it
  761. X
  762. XKODone:
  763. X    _DrawMenuBar            ; erase phone icon
  764. X    MOVE.L    #NoErr,D0
  765. X    RTS
  766. X
  767. X;----------------------------------------------------------------
  768. X    
  769. XSetUpRes:
  770. X; get the QDIL parameter resource, keep it in A3
  771. X
  772. X;  Get DRVR reference number
  773. X    MOVE.W    DCtlRefNum(A4), D0
  774. X    NOT.W    D0            ; this is the DRVR resource id
  775. X
  776. X; Get the starting number of DRVR's private resources
  777. X    LSL.W    #5, D0            ; shift it into position
  778. X    ORI.W    #$C000, D0        ; turn it into the base resource ID #
  779. X    LEA    myResBase, A0
  780. X    MOVE.W    D0, (A0)        ; save it
  781. X
  782. X; load resource
  783. X    ADD.W    #myParms,D0    ; get resource id
  784. X    
  785. X    CLR.L    -(SP)
  786. X    PUSH.L    #'QDIL'
  787. X    PUSH.W    D0
  788. X    _GetResource
  789. X
  790. X    POP.L    A3        ; keep handle in A3
  791. X
  792. X    CMPA.L    #0,A3        ; is there a handle??
  793. X    BGT.S    @1        ; yes
  794. X
  795. X    MOVE.L    #Error,D0    ; no
  796. X    BRA.S    @2
  797. X@1:
  798. X    MOVE.L    A3,A0
  799. X    _HLock            ; make sure it ain't going anywhere
  800. X    
  801. X    MOVE.L    #noErr,D0
  802. X
  803. X@2:    
  804. X    RTS
  805. X
  806. X;-----------------------------------------------------------------
  807. X
  808. XCreateWindow:
  809. X
  810. X; initialize message to user (^0 ^1 in dialog box)
  811. X    MOVE.W    myResBase,D0            
  812. X    ADDI.W    #msgStr,D0        ; get resource id of message strings
  813. X    
  814. X    CLR.L    -(SP)
  815. X    PUSH.L    #'STR#'
  816. X    PUSH.W    D0
  817. X    _GetResource
  818. X
  819. X    POP.L    A2            ; GetIndString will check for bad handle
  820. X
  821. X    MOVE.W    connected,D0        ; are we connected?
  822. X    BEQ.S    NotOnLine        ; no
  823. X
  824. X; yes, display "on-line with" message and name of BBS
  825. X    MOVE.L    A2,A0            ; handle to strings
  826. X    MOVE.W    #OnLineMsg,D0        ; index to online message
  827. X    BSR    GetIndString
  828. X    PUSH.L    A1            ; first string
  829. X
  830. X    LEA    bbs,A1            ; name of BBS
  831. X    PUSH.L    A1
  832. X
  833. X    PUSH.L    #0            ; rest are blank
  834. X    PUSH.L    #0
  835. X    _ParamText            ; display strings
  836. X
  837. X    BRA.S    OpenDLOG
  838. X    
  839. XNotOnLine:
  840. X; "not on-line" message
  841. X    MOVE.L    A2,A0        ; handle to strings
  842. X    MOVE.W    #NOLMsg1,D0    ; index to not on-line message 1
  843. X    BSR     GetIndString    
  844. X
  845. X    PUSH.L    A1
  846. X
  847. X    MOVE.W    #NOLMsg2,D0    ; index to not on-line message 2
  848. X    BSR     GetIndString    
  849. X
  850. X    PUSH.L    A1
  851. X
  852. X    PUSH.L    #0        ; rest are null
  853. X    PUSH.L    #0
  854. X    _ParamText        ; display string
  855. X
  856. XOpenDLOG:
  857. X; opens the QDial modal dialog box
  858. X    MOVE.W    myResBase,D0
  859. X    ADDI.W    #myDialog, D0        ; The ID of the dialog resource
  860. X
  861. X; Create dialog
  862. X    CLR.L    -(SP)            ; returns dialog ptr
  863. X    PUSH.W    D0            ; resource ID
  864. X    PUSH.L    #0            ; allocate storage on the heap
  865. X    PUSH.L    #-1            ; put it on top
  866. X    _GetNewDialog            ; get it
  867. X
  868. X    MOVE.L    (SP), A0        ; the DLOG pointer
  869. X                    ; (leave on stack for SetPort)
  870. X    TST.L    (SP)            ; did we get a dialog box?
  871. X    BNE.S    DialogOK
  872. X
  873. X    POP.L    D0            ; pop off the faulty pointer
  874. X    MOVE.L    #Error,D0        ; set error flag
  875. X    BRA.S    CWDone            ; return
  876. X
  877. XDialogOK:
  878. X    MOVE.L    A0, DCtlWindow(A4)    ; save it in the DCE
  879. X
  880. X; normally da's mark their windows as system windows, but for modal
  881. X; dialog to work, ours must be a dialog window
  882. X
  883. X    MOVE.W    #dialogKind, windowKind(A0)    
  884. X    _SetPort             ; pointer is still on stack
  885. X    MOVE.L    #NoErr,D0        ; clear error flag
  886. XCWDone:
  887. X    RTS
  888. X
  889. X;-----------------------------------------------------------------
  890. X
  891. XGetIndString:
  892. X; A0 contains the handle to the STR# resource
  893. X; D0 contains the index of the desired string (index starts at 0)
  894. X; On return A1 contains the address of the requested string
  895. X; If the index in D0 is out of range, A1 returns NIL
  896. X
  897. X    MOVEM.L    A0/D0-D1, -(SP)
  898. X
  899. X    CMPA.L    #0,A0        ; valid handle?
  900. X    BGT.S    @1        ; yes
  901. X    MOVE.L    #0,A1        ; error return
  902. X    BRA.S    GotStr
  903. X
  904. X@1:
  905. X    MOVE.L    (A0), A1    ; A1 contains a pointer to the string
  906. X    MOVE.W     (A1), D1    ; first word in resource is number of strings
  907. X
  908. X    CMP.W     D0, D1        ; does index exceed limit?
  909. X    BGT.S    FindStr        ; ok, find it
  910. X
  911. X    MOVE.L    #0, A1        ; index out of range, return NULL pointer
  912. X    BRA.S    GotStr
  913. X
  914. XFindStr:
  915. X    ADDQ.W    #2, A1        ; skip past count to actual string data
  916. X    TST.W    D0        ; is index zero?
  917. X    BEQ.S    GotStr        ; yes, we already have address in A1
  918. X    SUBQ.W    #1, D0        ; DBRA terminates on -1
  919. X
  920. XNextStr:
  921. X    CLR.L    D1
  922. X    MOVE.B    (A1), D1    ; D1 contains count byte
  923. X    ADDQ.W    #1, D1        ; string length + 1 for count byte
  924. X    ADDA.W    D1, A1        ; add length to pointer
  925. X    DBRA    D0,NextStr    ; go to next string
  926. X
  927. XGotStr:
  928. X    MOVEM.L    (SP)+, A0/D0-D1
  929. X    RTS
  930. X        
  931. X;-----------------------------------------------------------------
  932. X;     EOF    qdial.asm
  933. X;-----------------------------------------------------------------
  934. ________This_Is_The_END________
  935. if test `wc -l < qDial.asm` -ne 598; then
  936.     echo 'shar: qDial.asm was damaged during transit'
  937.   echo '      (should have been 598 bytes)'
  938. fi
  939. fi        ; : end of overwriting check
  940. echo 'Extracting qEqu.asm'
  941. if test -f qEqu.asm; then echo 'shar: will not overwrite qEqu.asm'; else
  942. sed 's/^X//' << '________This_Is_The_END________' > qEqu.asm
  943. X; qEqu.ASM
  944. X; Equates for QDial
  945. X;          ,
  946. X; (c)1985 Leo Laporte, all rights reserved
  947. X
  948. X     INCLUDE        MacTraps.D
  949. X    INCLUDE        SysEqu.D
  950. X    INCLUDE        ToolEqu.D
  951. X    INCLUDE        QuickEqu.D
  952. X    INCLUDE        PushMacs.TXT
  953. X
  954. X;  resource ID's
  955. XmyDialog    EQU    0    ; DLOG
  956. XHelpDialog    EQU    1    ; DLOG
  957. X
  958. XHelpPict    EQU    0    ; PICT
  959. X
  960. XmyParms        EQU    0    ; QDIL
  961. X
  962. XErrAlert    EQU    0    ; ALRT
  963. X
  964. XerrStr        EQU    0    ; STR#
  965. XmsgStr        EQU    1    ; STR#
  966. X
  967. XHelpText    EQU    0    ; TEXT    
  968. X
  969. X; misc equates
  970. XstrLen        EQU    40        ; string length
  971. XnumStr        EQU    10        ;  number of strings
  972. XstrSpace    EQU    strlen*numstr    ; size of string data
  973. XQDOnline    EQU    7    ; on-line code from VBL routine
  974. XbufLen        EQU    64    ; 64 bytes, should be divisible by 4
  975. XScratch        EQU    -256    ; size of stack frame for locals
  976. X
  977. X; dialog items
  978. XstringT        EQU    8    ; first string (string Top)
  979. XstringB        EQU    17    ; last string  (string Bottom)
  980. XchkT        EQU    18    ; first check box
  981. XchkB        EQU    22
  982. XradioT        EQU    24    ; first radio button
  983. XradioB        EQU    26
  984. X
  985. X; error
  986. XNoErr        EQU    0
  987. XError        EQU    -1
  988. X
  989. XVBLErr        EQU    0
  990. XNoResErr    EQU    2
  991. XWindErr        EQU    4
  992. XParmErr        EQU    6
  993. XModemErr    EQU    8
  994. XMemErr        EQU    10
  995. X
  996. X; messages
  997. XNOLMsg1        EQU    0
  998. XNOLMsg2        EQU    1
  999. XOnLineMsg    EQU    2
  1000. X
  1001. X; serial port equates
  1002. XAIn        EQU    -6
  1003. XAout        EQU    -7
  1004. X
  1005. Xbaud300        EQU    380
  1006. Xbaud1200    EQU    94
  1007. Xbaud2400    EQU    46
  1008. Xstop10        EQU    16384
  1009. XnoParity    EQU    8192
  1010. Xdata8        EQU    3072
  1011. X
  1012. XOKStr        EQU    $300D
  1013. X
  1014. X
  1015. X; CSCode values
  1016. X
  1017. XserReset    EQU    8
  1018. XserGetBuf    EQU    2
  1019. XserSetBuf    EQU    9
  1020. X
  1021. X; Traps
  1022. X
  1023. X    .TRAP    _ReadAsync    $A002    !    $400
  1024. X    .TRAP    _WriteAsync    $A003    !    $400
  1025. X    .TRAP    _StatusAsync    $A005    !    $400
  1026. X    .TRAP    _NewPtrSYS    $A11E    !    $400
  1027. X
  1028. X; eof qEqu.ASM
  1029. ________This_Is_The_END________
  1030. if test `wc -l < qEqu.asm` -ne 86; then
  1031.     echo 'shar: qEqu.asm was damaged during transit'
  1032.   echo '      (should have been 86 bytes)'
  1033. fi
  1034. fi        ; : end of overwriting check
  1035. echo 'Extracting qData.asm'
  1036. if test -f qData.asm; then echo 'shar: will not overwrite qData.asm'; else
  1037. sed 's/^X//' << '________This_Is_The_END________' > qData.asm
  1038. X;----------------------------------------------------------------
  1039. X;    qData.Asm
  1040. X;----------------------------------------------------------------
  1041. X;
  1042. X;     Data for QDial
  1043. X;             ,
  1044. X;    (c)1985 Leo Laporte, all rights reserved
  1045. X;
  1046. X;-----------------------------------------------------------------
  1047. X; defined in this file
  1048. X;-----------------------------------------------------------------
  1049. X
  1050. X    INCLUDE    qEqu.asm
  1051. X    
  1052. XXDEF    itemHit,theType,theControl,theRect,myResBase
  1053. XXDEF    InitStr,AttnStr,endStr,connected,bbs,serConfig,serialIn,serialOut
  1054. X
  1055. X;-----------------------------------------------------------------
  1056. X
  1057. XitemHit        DC.W    0        ; last item pushed
  1058. XtheType        DC.W    0        ; its type (unused)
  1059. XtheControl    DC.L    0        ; handle to control
  1060. XtheRect        DC.W    0,0,0,0        ; control rect
  1061. Xconnected    DC.W    0        ; currently online flag
  1062. Xbbs        DCB.B    strlen,0    ; name of BBS we've hit
  1063. XmyResBase    DC.W    0        ; DRVR's private resource #
  1064. XserConfig    DC.W    0        ; serial port config word
  1065. X
  1066. X
  1067. XInitStr        DC.B    'ATE0Q0V0S0=0',$D    ; sets up modem
  1068. XAttnStr        DC.B    'AT',$D            ; attention string
  1069. XendStr
  1070. X
  1071. X    STRING_FORMAT 2            ; Pascal type strings...
  1072. X
  1073. XSerialIn    DC.B    '.Ain'
  1074. XSerialOut    DC.B    '.Aout'
  1075. X
  1076. X;-----------------------------------------------------------------
  1077. X;    EOF    QData.asm
  1078. X;-----------------------------------------------------------------
  1079. X
  1080. ________This_Is_The_END________
  1081. if test `wc -l < qData.asm` -ne 42; then
  1082.     echo 'shar: qData.asm was damaged during transit'
  1083.   echo '      (should have been 42 bytes)'
  1084. fi
  1085. fi        ; : end of overwriting check
  1086. echo 'Extracting qHelp.asm'
  1087. if test -f qHelp.asm; then echo 'shar: will not overwrite qHelp.asm'; else
  1088. sed 's/^X//' << '________This_Is_The_END________' > qHelp.asm
  1089. X;----------------------------------------------------------------
  1090. X;    qHelp.asm
  1091. X;----------------------------------------------------------------
  1092. X;
  1093. X;     QDial - a program that installs a dialing routine into VBL
  1094. X;             ,
  1095. X;    (c)1986 Leo Laporte, all rights reserved
  1096. X;
  1097. X;    The routines in this file are called from QDial.asm
  1098. X;    v1.0    21-Feb-86
  1099. X;
  1100. X;-----------------------------------------------------------------
  1101. X;     Includes
  1102. X;-----------------------------------------------------------------
  1103. X
  1104. X    INCLUDE        qEqu.ASM        ; q equates
  1105. X
  1106. X; defined in this file
  1107. XXDEF    Help
  1108. X
  1109. X; defined in qDial.asm
  1110. XXREF    GetParams
  1111. X
  1112. X;defined in qData.asm
  1113. XXREF    myResBase,itemHit,theRect
  1114. X
  1115. X
  1116. X;-----------------------------------------------------------------
  1117. X
  1118. XHelp:
  1119. X; displays help dialog, then returns
  1120. X    MOVEM.L    A0-A4/D0-D3,-(SP)
  1121. X
  1122. X; push grafPort
  1123. X    CLR.L    -(SP)            
  1124. X    PUSH.L    SP            
  1125. X    _GetPort            
  1126. X
  1127. X    MOVE.W    myResBase, D0
  1128. X    ADD.W    #HelpDialog,D0    ; get resource id
  1129. X
  1130. X    CLR.L    -(SP)            ; returns dialog ptr
  1131. X    PUSH.W    D0            ; resource ID
  1132. X    PUSH.L    #0            ; allocate storage on the heap
  1133. X    PUSH.L    #-1            ; put it on top
  1134. X    _GetNewDialog            ; get it
  1135. X
  1136. X    POP.L    A0            ; the DLOG pointer
  1137. X    CMPA.L    #0,A0
  1138. X    BEQ    HelpDone
  1139. X
  1140. X    MOVE.L    A0,A3            ; save it
  1141. X
  1142. X    PUSH.L    A0
  1143. X    _SetPort
  1144. X
  1145. X; draw the title picture
  1146. X    MOVE.W    myResBase, D0
  1147. X    ADD.W    #HelpPict,D0        ; get resource id
  1148. X
  1149. X    CLR.L    -(SP)            ; returns picture handle
  1150. X    PUSH.L    #'PICT'            
  1151. X    PUSH.W    D0            ; resource ID
  1152. X    _GetResource            ; get it
  1153. X
  1154. X    POP.L    A0
  1155. X    CMPA.L    #0,A0            ; did we get it?
  1156. X    BEQ.S    @0
  1157. X
  1158. X    LEA    theRect,A1        ; initialize rectangle
  1159. X    MOVE.L    #$000A0053,(A1)+
  1160. X    MOVE.L    #$0039016A,(A1)
  1161. X
  1162. X    PUSH.L    A0            ; pic handle
  1163. X    PEA    theRect
  1164. X    _DrawPicture
  1165. X
  1166. X@0:
  1167. X    MOVE.L    grafglobals(A5),A0
  1168. X    MOVE.L    thePort(A0),A0
  1169. X    MOVEM.L    portRect(A0),D0-D1    ; get the port's rectangle
  1170. X
  1171. X    ADDI.L    #$00410014,D0        ; inset the rect a little bit
  1172. X    SUBI.L    #$00320014,D1
  1173. X
  1174. X    LEA    theRect,A0
  1175. X    MOVE.L    D0,(A0)+
  1176. X    MOVE.L    D1,(A0)            ; save rect
  1177. X    
  1178. X    PEA    theRect
  1179. X    _FrameRect
  1180. X
  1181. X; draw text
  1182. X    MOVE.W    myResBase, D0
  1183. X    ADD.W    #HelpText,D0    ; get resource id
  1184. X    
  1185. X    CLR.L    -(SP)        
  1186. X    PUSH.L    #'TEXT'
  1187. X    PUSH.W    D0
  1188. X    _GetResource        ; get help text
  1189. X
  1190. X    POP.L    A2        ; handle
  1191. X    CMPA.L    #0,A2        ; anything there?
  1192. X    BGT.S    @1        ; yes
  1193. X
  1194. X    PUSH.W    #30
  1195. X    PUSH.W    #85
  1196. X    _MoveTo            
  1197. X
  1198. X    PEA    'No help available.'
  1199. X    _DrawString
  1200. X
  1201. X    BRA.S    HelpWait
  1202. X
  1203. X@1:
  1204. X; draw the help text in 9 point geneva
  1205. X    PUSH.W    #geneva
  1206. X    _TextFont    
  1207. X
  1208. X    PUSH.W    #9
  1209. X    _TextSize
  1210. X        
  1211. X    PEA    theRect        ; rectangle
  1212. X    PUSH.W    #4
  1213. X    PUSH.W    #4
  1214. X    _InsetRect        ; shrink the rectangle a little
  1215. X
  1216. X    MOVE.L    A2,A0
  1217. X    _GetHandleSize        ; length in D0
  1218. X
  1219. X    PUSH.L    (A2)        ; pointer to text
  1220. X    PUSH.L    D0        ; length
  1221. X    PEA    theRect        ; rect
  1222. X    PUSH.W    #1        ; centered text
  1223. X    _TextBox        ; draw it!
  1224. X    
  1225. X; wait for button click
  1226. XHelpWait:
  1227. X    PUSH.L    #0        ; no filter proc
  1228. X    PEA    itemHit        ; returns item
  1229. X    _ModalDialog
  1230. X
  1231. X; case out on item hit
  1232. X    MOVE.W    itemHit, D0
  1233. X    CMPI.W    #1,D0
  1234. X    BNE.S    HelpWait
  1235. X
  1236. X; restore state
  1237. XHelpDone:
  1238. X    PUSH.L    A3        ; dialog ptr
  1239. X    _DisposDialog
  1240. X    
  1241. X    _SetPort
  1242. X    MOVEM.L    (SP)+,A0-A4/D0-D3
  1243. X
  1244. X; return to ModalDialog loop
  1245. X    BRA    GetParams
  1246. X
  1247. X;----------------------------------------------------------------
  1248. X;    EOF    qHelp.asm
  1249. X;----------------------------------------------------------------
  1250. ________This_Is_The_END________
  1251. if test `wc -l < qHelp.asm` -ne 161; then
  1252.     echo 'shar: qHelp.asm was damaged during transit'
  1253.   echo '      (should have been 161 bytes)'
  1254. fi
  1255. fi        ; : end of overwriting check
  1256. echo 'Extracting qModem.asm'
  1257. if test -f qModem.asm; then echo 'shar: will not overwrite qModem.asm'; else
  1258. sed 's/^X//' << '________This_Is_The_END________' > qModem.asm
  1259. X;----------------------------------------------------------------
  1260. X;    qModem.Asm
  1261. X;----------------------------------------------------------------
  1262. X;
  1263. X;     Modem Subroutines for QDial
  1264. X;             ,
  1265. X;    (c)1985 Leo Laporte, all rights reserved
  1266. X;
  1267. X;    These routines are called from QDial.asm
  1268. X;    v1.0    21-Feb-86
  1269. X;-----------------------------------------------------------------
  1270. X;     Includes
  1271. X;-----------------------------------------------------------------
  1272. X
  1273. X    INCLUDE        qEqu.ASM        ; q equates
  1274. X
  1275. X; defined in this file
  1276. XXDEF    SetUpModem,SetUpError,SetUpOK,WakeUpModem
  1277. XXDEF    InitModem,GetAttn,ModemOK,TryAgain
  1278. X
  1279. X; defined in qdial.asm
  1280. XXREF      pbIn, pbOut, inBuf, checkPort, readPort
  1281. X
  1282. X; defined in qData.ASM
  1283. XXREF  SerialIn,SerialOut,attnStr,initStr,EndStr,serConfig
  1284. X
  1285. X;-----------------------------------------------------------------
  1286. X
  1287. XSetUpModem:
  1288. X; configures modem and returns
  1289. X; if modem doesn't respond z flag will be cleared
  1290. X
  1291. X; open .AIn
  1292. X    LEA    pbIn, A0
  1293. X    CLR.L    ioCompletion(A0)    ; clear all parameters, since        
  1294. X    CLR.L    ioFileName(A0)        ; this may be the same pb left 
  1295. X    CLR.W    ioResult(A0)        ; over from a previous incarnation
  1296. X    CLR.L    ioBuffer(A0)        ; of QDial
  1297. X    CLR.L    ioByteCount(A0)
  1298. X    CLR.B    ioPermssn(A0) 
  1299. X    LEA    SerialIn,A1
  1300. X    MOVE.L    A1,ioFileName(A0)    ; name of driver
  1301. X    _Open
  1302. X
  1303. X    TST.W    ioResult(A0)
  1304. X    BNE    SetUpError
  1305. X
  1306. X; open .AOut
  1307. X    LEA    pbOut, A0
  1308. X    CLR.L    ioCompletion(A0)
  1309. X    CLR.L    ioFileName(A0)    
  1310. X    CLR.W    ioRefNum(A0)
  1311. X    CLR.L    ioBuffer(A0)
  1312. X    CLR.L    ioByteCount(A0)
  1313. X    CLR.B    ioPermssn(A0)     
  1314. X    LEA    SerialOut,A1
  1315. X    MOVE.L    A1,ioFileName(A0)
  1316. X    _Open
  1317. X
  1318. X    TST.W    ioResult(A0)
  1319. X    BNE    SetUpError
  1320. X
  1321. X; kill any pending calls
  1322. X    LEA    pbIn,A0
  1323. X    CLR.L   ioCompletion(A0)
  1324. X    MOVE    #1,CSCode(A0)        ; why? cause Don Brown does it!
  1325. X    _KillIO
  1326. X
  1327. X; tell serial driver where its buffer is
  1328. X    LEA        pbIn,A0
  1329. X    MOVE       #SerSetBuf,csCode(A0)    
  1330. X           CLR.L    csparam(A0)        ; use yer own buffer
  1331. X           CLR.L    ioBuffer(A0)    
  1332. X    _Control 
  1333. X
  1334. X    TST.W    ioResult(A0)
  1335. X    BNE    SetUpError
  1336. X
  1337. X; configure serial port (.AIn)
  1338. X    LEA    pbIn, A0
  1339. X    MOVE.W    #serReset, csCode(A0)        ; this is a reset call
  1340. X    MOVE.W    serConfig, csParam(A0)        ; sets baud rate, etc.
  1341. X    _Control
  1342. X
  1343. X    TST.W    ioResult(A0)
  1344. X    BNE    SetUpError
  1345. X
  1346. X; configure serial port (.AOut)
  1347. X; kill any pending calls
  1348. X    LEA    pbOut,A0
  1349. X    CLR.L   ioCompletion(A0)
  1350. X    MOVE    #1,CSCode(A0)        ; why? cause Don Brown does it!
  1351. X    _KillIO
  1352. X
  1353. X    LEA    pbOut, A0
  1354. X    MOVE.W    #serReset, csCode(A0)        
  1355. X    MOVE.W    serConfig, csParam(A0)            
  1356. X    CLR.L    ioCompletion(A0)
  1357. X    _Control
  1358. X
  1359. X    TST.W    ioResult(A0)
  1360. X    BNE.S    SetUpError
  1361. X
  1362. X    BSR     WakeUpModem    ; initialize modem, then say hello
  1363. X
  1364. X    CMP.L    #2, D0        ; we must have received at least 2 OK's
  1365. X    BLT.S    SetUpError    ; couldn't wake it up
  1366. X    
  1367. X    BRA.S    SetUpOK
  1368. X
  1369. XSetUpError:
  1370. X    MOVE.L    #Error, D0
  1371. X    RTS
  1372. X
  1373. XSetUpOK:
  1374. X    MOVE.L    #NoErr, D0
  1375. X    RTS
  1376. X
  1377. X;-----------------------------------------------------------------
  1378. X
  1379. XWakeUpModem:
  1380. X; this routine sends three AT's to modem to give it a chance 
  1381. X; to sense baud rate.  Returns number of times modem responded
  1382. X; in D0.
  1383. X
  1384. X; D4 is used as a counter, D5 a result flag
  1385. X
  1386. X; Before anything, sends out the initialization string 
  1387. X; as delivered string is ATE0Q0V0S0=0 (for Hayes type modems)
  1388. X; ATE0 Suppress echoing of commands
  1389. X; ATQ0 Permit result codes
  1390. X; ATV0 Numeric result codes
  1391. X; ATS0=0 Don't pick up phone,
  1392. X;
  1393. X; after this initialization, modem should respond to an AT with 0<cr> 
  1394. X
  1395. X    MOVEM.L    A0-A2/D1-D5, -(SP)    ; save regs
  1396. X
  1397. X; send out the initialization string a couple of times
  1398. X
  1399. X    MOVE.L    #2, D4           ; we'll do this three times actually
  1400. X
  1401. XInitModem:
  1402. X; initialize modem
  1403. X    LEA    pbOut, A0        ; output parameter block
  1404. X    LEA    InitStr, A1        ; the attention string
  1405. X    MOVE.L    A1, ioBuffer(A0)
  1406. X    MOVE.L    #AttnStr-InitStr,ioReqCount(A0)    ; number of bytes to write
  1407. X    _Write
  1408. X
  1409. X    DBRA    D4,InitModem
  1410. X
  1411. X    MOVE.L    #30,A0
  1412. X    _Delay            ; give it a sec to settle down
  1413. X
  1414. X    LEA    pbOut,A0
  1415. X    _KillIO            ; flush buffer
  1416. X
  1417. X; now send out a couple of AT's to make sure we're talking to modem
  1418. X
  1419. X    MOVE.L    #3, D4        ; send four AT's
  1420. X    CLR.L    D5        ; D5 contains number of resp rec'd from modem
  1421. X
  1422. XGetAttn:
  1423. X; send an AT to modem
  1424. X    LEA    pbOut, A0        ; output parameter block
  1425. X    LEA    AttnStr, A1        ; the attention string
  1426. X    MOVE.L    A1, ioBuffer(A0)
  1427. X    MOVE.L    #endStr-AttnStr,ioReqCount(A0)    ; number of bytes to write
  1428. X    _Write
  1429. X
  1430. X    MOVE.L    #30, A0            ; give modem .5 sec to respond
  1431. X    _Delay
  1432. X    
  1433. X; let's see if we got an acknowlegement from modem (0<cr>)
  1434. X    BSR     CheckPort        ; any chars waiting?
  1435. X
  1436. X    MOVE.L    csParam(A0),D0        ; characters waiting
  1437. X    BEQ.S    TryAgain        ; nope
  1438. X
  1439. X    BSR    ReadPort        ; yes, get them in inBuf
  1440. X@2    TST.W    ioResult(A0)
  1441. X    BGT.S    @2            ; wait til ASYNC call returns
  1442. X
  1443. X    LEA    inBuf, A0
  1444. X    CMP.W    #OKStr, (A0)        ; did we get a 0<cr>?
  1445. X    BNE.S    TryAgain        ; no
  1446. X
  1447. XModemOK:
  1448. X    ADDQ.L    #1, D5            ; modem responded, set flag
  1449. X
  1450. XTryAgain:
  1451. X    DBRA    D4,GetAttn        ; do it again
  1452. X
  1453. X    MOVE.L    D5,D0            ; return number of hits
  1454. X
  1455. X    MOVEM.L    (SP)+, A0-A2/D1-D5    ; restore regs
  1456. X    RTS
  1457. X
  1458. X;-----------------------------------------------------------------
  1459. X;     EOF    qModem.asm
  1460. X;-----------------------------------------------------------------
  1461. X
  1462. ________This_Is_The_END________
  1463. if test `wc -l < qModem.asm` -ne 203; then
  1464.     echo 'shar: qModem.asm was damaged during transit'
  1465.   echo '      (should have been 203 bytes)'
  1466. fi
  1467. fi        ; : end of overwriting check
  1468. echo 'Extracting qParam.asm'
  1469. if test -f qParam.asm; then echo 'shar: will not overwrite qParam.asm'; else
  1470. sed 's/^X//' << '________This_Is_The_END________' > qParam.asm
  1471. X;----------------------------------------------------------------
  1472. X;    qParam.Asm
  1473. X;----------------------------------------------------------------
  1474. X;
  1475. X;     Parameter Subroutines for QDial
  1476. X;             ,
  1477. X;    (c)1985 Leo Laporte, all rights reserved
  1478. X;
  1479. X;
  1480. X;    The routines in this file are called from QDial.asm
  1481. X;    v1.0    21-Feb-86
  1482. X;-----------------------------------------------------------------
  1483. X;     Includes
  1484. X;-----------------------------------------------------------------
  1485. X
  1486. X     INCLUDE        qEqu.ASM        ; q equates
  1487. X
  1488. X; defined in this file
  1489. XXDEF    ReadOldParms,StuffItem,CheckEm,ReadDone
  1490. XXDEF    SaveParams,GetText,SaveStr,SaveChecks,GetCheck
  1491. XXDEF    NextRB,GotRB,Its1200,Its300,Its2400,MakeWord
  1492. XXDEF    SaveDone,GetCtlHandle
  1493. X
  1494. X; defined in qData.ASM
  1495. XXREF  itemHit,theType,theControl,theRect,serConfig
  1496. X
  1497. X;-----------------------------------------------------------------
  1498. X
  1499. XReadOldParms:
  1500. X; reads old resource record and posts strings into dialog box
  1501. X
  1502. X; stuff EditText records with strings from last time
  1503. X    MOVE.L    (A3), A2    ; parms pointer
  1504. X    MOVE.W    #stringT, D3    ; starting item number 
  1505. X
  1506. XStuffItem:
  1507. X; walk through myParams, setting up the text items in the dialog
  1508. X    MOVE.W    D3, D0        ; the item number for the EditText box
  1509. X    BSR     GetCtlHandle
  1510. X
  1511. X    PUSH.L    theControl
  1512. X    PUSH.L    A2        ; address of string from QDIL
  1513. X    _SetIText        ; post the string
  1514. X
  1515. X    ADDA.L    #strLen, A2    ; next string
  1516. X    
  1517. X    ADDQ.W    #1, D3        ; next item
  1518. X    CMP.W    #stringB, D3    ; last item?
  1519. X
  1520. X    BLE.S    StuffItem
  1521. X
  1522. X; now set check buttons
  1523. X    MOVE.L    #chkT, D3    ; first check box
  1524. X    
  1525. XCheckEm:
  1526. X    MOVE.W    D3, D0        
  1527. X    BSR     GetCtlHandle
  1528. X
  1529. X    PUSH.L    theControl
  1530. X    PUSH.W    (A2)+        ; item state from QDIL
  1531. X    _SetCtlValue
  1532. X
  1533. X    ADDQ.W    #1,D3        ; next item
  1534. X    CMP.W    #chkB,D3    ; keep going til out of check boxes
  1535. X    BLE.S    CheckEm
  1536. X
  1537. X; handle radio buttons
  1538. X    MOVE.L    #radioT, D3    ; first radio button
  1539. X    ADD.W    (A2), D3    ; offset from QDIL resource
  1540. X
  1541. X    MOVE.W    D3, D0        ; the item number
  1542. X    BSR     GetCtlHandle
  1543. X
  1544. X    PUSH.L    theControl
  1545. X    PUSH.W    #1        ; turn this one on
  1546. X    _SetCtlValue
  1547. X
  1548. XReadDone:    
  1549. X    MOVE.L    #noErr,D0
  1550. X    RTS
  1551. X
  1552. X;-----------------------------------------------------------------
  1553. X
  1554. XSaveParams:
  1555. X; save parameters from the dialog as currently configured
  1556. X    LINK    A6, #Scratch    ; use the stack for scratch space
  1557. X    
  1558. X; get QDIL resource
  1559. X    MOVE.L    (A3),A2        ; QDIL resource pointer
  1560. X
  1561. X; stuff the new strings into the old resource
  1562. X    MOVE.L    #stringT, D3    ; starting item number for EditText boxes
  1563. XGetText:
  1564. X    MOVE.W    D3, D0        
  1565. X    BSR     GetCtlHandle
  1566. X
  1567. X    PUSH.L    theControl
  1568. X    PEA    Scratch(A6)    ; where to store the string
  1569. X    _GetIText        ; get the string
  1570. X
  1571. X    LEA    Scratch(A6),A0    ; pointer to string
  1572. X    
  1573. X    CMPI.B    #strlen-1,(A0)    ; is it bigger than limit?
  1574. X    BLE.S    SaveStr        ; no
  1575. X
  1576. X    MOVE.B    #strlen-1,(A0)    ; shorten it to 40 chars
  1577. X
  1578. XSaveStr:
  1579. X    MOVE.L    A2, A1        ; destination
  1580. X    MOVE.L    #strlen, D0    ; count
  1581. X    _BlockMove        ; copy string
  1582. X
  1583. X; go to next string
  1584. X    ADDA.W    #strlen, A2    ; bump string pointer
  1585. X    ADDQ.W    #1, D3        ; next item
  1586. X    CMP.W    #stringB, D3    ; stop when we've added in all strings
  1587. X    BLE.S    GetText
  1588. X
  1589. XSaveChecks:
  1590. X; save the chkItems
  1591. X    MOVE.W    #chkT, D3    ; starting item #
  1592. X
  1593. XGetCheck:
  1594. X    MOVE.W    D3, D0        ; the item number
  1595. X    BSR     GetCtlHandle
  1596. X
  1597. X    CLR.W    -(SP)
  1598. X    PUSH.L    theControl
  1599. X    _GetCtlValue
  1600. X
  1601. X    POP.W    (A2)+        ; save control state
  1602. X
  1603. X    ADDQ.W    #1,D3        ; next item
  1604. X    CMP.W    #chkB,D3    ; keep going til out of check boxes
  1605. X    BLE.S    GetCheck
  1606. X
  1607. X; save radio button
  1608. X    MOVE.L    #radioT,D3    ; first radio button
  1609. XNextRB:
  1610. X    MOVE.W    D3, D0
  1611. X    BSR     GetCtlHandle
  1612. X
  1613. X    CLR.W    -(SP)
  1614. X    PUSH.L    theControl
  1615. X    _GetCtlValue        ; get its value
  1616. X
  1617. X    POP.W    D0        ; was it set?
  1618. X    BGT.S    GotRB        ; yes
  1619. X
  1620. X    ADDQ.L    #1,D3        ; next item
  1621. X    CMPI.W    #radioB,D3    ; out of items?
  1622. X    BLE.S    NextRB        ; no, keep going
  1623. X
  1624. X    MOVE.L    #radioT+1,D3    ; no buttons set, so default to 1200 baud    
  1625. X
  1626. XGotRB:
  1627. X    SUBI.W    #radioT, D3    ; we want offset only
  1628. X    MOVE.W    D3, (A2)    ; save it
  1629. X
  1630. X; build serial configuration word (now that we know the baud rate)
  1631. X    SUBQ.W    #1, D3        
  1632. X    BMI.S    Its300
  1633. X    BGT.S    Its2400
  1634. X
  1635. XIts1200:
  1636. X    MOVE.L    #baud1200, D3
  1637. X    BRA.S    MakeWord
  1638. X
  1639. XIts300:
  1640. X    MOVE.L    #baud300, D3
  1641. X    BRA.S    MakeWord
  1642. X
  1643. XIts2400:
  1644. X    MOVE.L    #baud2400, D3
  1645. X
  1646. XMakeWord:
  1647. X; 1 stop, no parity, 8 data bits
  1648. X    ADDI.L    #(stop10+noParity+data8), D3
  1649. X
  1650. X    LEA    serConfig, A0
  1651. X    MOVE.W    D3,(A0)        ; save it
  1652. X
  1653. X; we've read all the parameters, now save them
  1654. X    PUSH.L    A3
  1655. X    _ChangedResource
  1656. X
  1657. X    PUSH.L    A3
  1658. X    _WriteResource        ; save changes
  1659. X
  1660. XSaveDone:
  1661. X    UNLK    A6        ; release scratch
  1662. X    RTS
  1663. X
  1664. X;-----------------------------------------------------------------
  1665. X
  1666. XGetCtlHandle:
  1667. X; a subroutine since we do this so much
  1668. X; the item number is in D0
  1669. X
  1670. X    PUSH.L    DCtlWindow(A4)        ; the window pointer
  1671. X    PUSH.W    D0
  1672. X    PEA    theType
  1673. X    PEA    theControl
  1674. X    PEA     theRect
  1675. X    _GetDItem
  1676. X
  1677. X    RTS
  1678. X
  1679. X
  1680. X;-----------------------------------------------------------------
  1681. X;     EOF    qParam.asm
  1682. X;-----------------------------------------------------------------
  1683. ________This_Is_The_END________
  1684. if test `wc -l < qParam.asm` -ne 212; then
  1685.     echo 'shar: qParam.asm was damaged during transit'
  1686.   echo '      (should have been 212 bytes)'
  1687. fi
  1688. fi        ; : end of overwriting check
  1689. echo 'Extracting qVBL.asm'
  1690. if test -f qVBL.asm; then echo 'shar: will not overwrite qVBL.asm'; else
  1691. sed 's/^X//' << '________This_Is_The_END________' > qVBL.asm
  1692. X;---------------------------------------------------------------------------
  1693. X;      qVBL.asm
  1694. X;---------------------------------------------------------------------------
  1695. X;
  1696. X;     The dialing routine installed into heap by QDial
  1697. X;             ,
  1698. X;    (c)1985 Leo Laporte, all rights reserved
  1699. X;
  1700. X;    This is actually the heart of the program...
  1701. X;    v1.1    11-Mar-86
  1702. X;
  1703. X;---------------------------------------------------------------------------
  1704. X;    INCLUDES
  1705. X;---------------------------------------------------------------------------
  1706. X
  1707. X    INCLUDE        qEqu.ASM
  1708. X
  1709. X;---------------------------------------------------------------------------
  1710. X;    SYMBOLS
  1711. X;---------------------------------------------------------------------------
  1712. X
  1713. X; defined in this file
  1714. XXDEF    TaskStart,CheckPort,ReadPort,pbIn,pbOut,inBuf,TaskStop
  1715. XXDEF    vblcode,vblentry,numbers,currstr
  1716. X
  1717. X;---------------------------------------------------------------------------
  1718. X;    CODE
  1719. X;---------------------------------------------------------------------------
  1720. X
  1721. XTaskStart:
  1722. X    BRA.S    DoIt        ; jump around identifier
  1723. X    DC.L    'QQQQ'        ; identifying long word (used by QDial.asm)
  1724. X    
  1725. XDoIt:
  1726. X; the VBL dialing task
  1727. X    MOVEM.L    D0-D7/A0-A6, -(SP)    ; save all Regs
  1728. X    MOVE.L    CurrentA5,A5        ; make sure A5 is valid
  1729. X
  1730. X; check to see if anyone else is using the serial port - if so, stop
  1731. X; running immediately so as not to conflict... 
  1732. X    BTST    #7,PortAUse    ; port in use?        
  1733. X    BEQ    KillVBL        ; yes, stop
  1734. X
  1735. X; check for other routines in serial i/o queue
  1736. X    MOVE.L    UTableBase,A0    ; address of unit table
  1737. X    MOVE.L    20(A0),A0    ; handle to input device driver
  1738. X    MOVE.L    (A0),A0        ; now a pointer
  1739. X    TST.L    dCtlQHead(A0)    ; anything in the queue?
  1740. X    BGT    KillVBL        ; yes, stop
  1741. X
  1742. X    MOVE.L    UTableBase,A0    ; address of unit table
  1743. X    MOVE.L    24(A0),A0    ; handle to input device driver
  1744. X    MOVE.L    (A0),A0        ; now a pointer
  1745. X    TST.L    dCtlQHead(A0)    ; anything in the queue?
  1746. X    BGT    KillVBL        ; yes, stop
  1747. X
  1748. X; make sure we're not still waiting for an ASYNC call
  1749. X    LEA    pbOut, A0
  1750. X    TST.W    ioResult(A0)
  1751. X    BGT.S    NotYet        ; in an ASYNC call
  1752. X
  1753. X    LEA    pbIn, A0
  1754. X    TST.W    ioResult(A0)
  1755. X    BGT.S    NotYet        ; in an ASYNC call
  1756. X
  1757. X; see what the current state is, and act accordingly
  1758. XRunTask:
  1759. X    MOVE.W    VBLCode, D0        ; current state
  1760. X
  1761. X    ADD    D0,D0            ; *2 for table index
  1762. X    MOVE    TaskTable(D0),D0    ; Point to routine offset
  1763. X    JMP    TaskTable(D0)        ; and jump to it
  1764. X
  1765. XTaskTable:
  1766. X    DC.W    DrawPhone-TaskTable    ; Turn on phone icon
  1767. X    DC.W    Prepare-TaskTable    ; Prepare for dialing
  1768. X    DC.W    DialIt-TaskTable    ; Send out dialing string
  1769. X    DC.W    WriteCR-TaskTable    ; Send a carriage return
  1770. X    DC.W    DrawPhone-TaskTable    ; Turn off phone icon
  1771. X    DC.W    CheckModem-TaskTable    ; Wait for modem's reponse
  1772. X    DC.W    ParseResponse-TaskTable    ; Handle modem's reponse
  1773. X    DC.W    OnLine-TaskTable    ; On line 
  1774. X
  1775. XNotYet:
  1776. X    MOVE.L    #10,D5        ; come back later
  1777. X    BRA    VBLReturn
  1778. X
  1779. X
  1780. X;---------------------------------------------------------------------------
  1781. X
  1782. XPrepare:    
  1783. X; set up BBS and Number to dial
  1784. X
  1785. X; get next string
  1786. X    MOVE.W    currStr,D0        ; next str
  1787. X    CMPI.W    #numStr,D0        ; at end?
  1788. X
  1789. X    BLT.S    @1            ; not yet
  1790. X    
  1791. X    LEA    currStr,A0
  1792. X    MOVE.W    #0,(A0)            ; reset currStr
  1793. X    CLR.L    D0
  1794. X
  1795. X@1:
  1796. X    LEA    numbers,A2
  1797. X    MULU    #strLen,D0        ; offset into string array
  1798. X
  1799. X    ADD.W    D0,A2            ; A1 points to next BBS
  1800. X    ADDA.L    #strLen,A2        ; now it points to next number
  1801. X
  1802. X; should we dial it?  Test count byte to see...
  1803. X    TST.B    (A2)        ; has it been cleared?
  1804. X
  1805. X    BNE.S    GetNumber    ; no, get number to dial
  1806. X
  1807. X    LEA    currStr,A0    ; yes, go to next number
  1808. X    ADDQ.W    #2,(A0)        ; bump it
  1809. X
  1810. X    BRA    PDone        ; come back later
  1811. X    
  1812. XGetNumber:
  1813. X; setup to write strings
  1814. X
  1815. X; empty out buffer (so that no stray characters confuse us later)
  1816. X    LEA    pbOut, A0
  1817. X    _KillIO
  1818. X
  1819. X    CLR.L    D0
  1820. X    MOVE.B    (A2), D0        ; count byte
  1821. X    MOVE.L    D0, ioByteCount(A0)    ; number of bytes to write
  1822. X    ADDQ.L    #1,A2            ; step past count byte
  1823. X    MOVE.L    A2, ioBuffer(A0)    ; string to write
  1824. X
  1825. X; initialize timeout counter
  1826. X    LEA    timeout,A0
  1827. X    MOVE.W    #240,(A0)        ; timeout after 40 seconds
  1828. X
  1829. X    LEA    VBLCode, A0
  1830. X    ADDQ.W    #1, (A0)        ; go to next task, next time
  1831. X
  1832. XPDone:
  1833. X    MOVE.L    #10, D5            ; come back in 10 ticks
  1834. X    BRA    VBLreturn        ; return from VBL
  1835. X
  1836. X;---------------------------------------------------------------------------
  1837. X
  1838. XDrawPhone:
  1839. X; posts the phone in the menu bar
  1840. X    BSR    FlipPhone        ; invert the phone
  1841. X    
  1842. X    LEA    VBLCode, A0
  1843. X    ADDQ.W    #1, (A0)        ; go to next task, next time
  1844. X
  1845. X    MOVE.L    #10, D5            ; come back later
  1846. X    BRA    VBLreturn        ; return from VBL
  1847. X
  1848. X;---------------------------------------------------------------------------
  1849. X
  1850. XDialIt:
  1851. X; now, output the dialing string
  1852. X    LEA    currStr, A0        ; the current string index
  1853. X    ADDQ.W    #2,(A0)            ; bump it (by 2 to point to next BBS)
  1854. X
  1855. X    LEA    VBLCode, A0
  1856. X    ADDQ.W    #1, (A0)        ; go to next task, next time
  1857. X
  1858. X    MOVE.L    #10, D5        
  1859. X
  1860. X    LEA    pbOut, A0        ; pb already initialized
  1861. X    _WriteASYNC
  1862. X
  1863. X    BRA    VBLreturn
  1864. X
  1865. X;---------------------------------------------------------------------------
  1866. X
  1867. XWriteCR:
  1868. X; now, finish dialing by sending out a CR
  1869. X    LEA    VBLCode, A0
  1870. X    ADDQ.W    #1, (A0)    ; go to next task, next time
  1871. X
  1872. X    MOVE.L    #10, D5        
  1873. X
  1874. X    BSR    CROut        ; write the CR
  1875. X    
  1876. X    LEA    pbIn,A0        ; the input parameter block
  1877. X    CLR.L    CSParam(A0)    ; clear out character count
  1878. X    
  1879. X    BRA    VBLreturn
  1880. X
  1881. X;---------------------------------------------------------------------------
  1882. X
  1883. XCheckModem:
  1884. X; we've dialed the number - now wait for a response from the modem
  1885. X    LEA    pbIn,A0
  1886. X    TST.L    csParam(A0)        ; anything waiting?
  1887. X
  1888. X    BLE.S    KeepWaiting        ; no wait some more
  1889. X
  1890. X    MOVE.L    csParam(A0),D0        ; char count
  1891. X    BSR    ReadPort        ; get the response
  1892. X    
  1893. X    LEA    VBLCode, A0
  1894. X    ADDQ.W    #1, (A0)        ; go to ParseResponse next time
  1895. X
  1896. X    BRA.S    CMDone
  1897. X
  1898. XKeepWaiting:
  1899. X    MOVE.W    timeout, D0        ; check timeout counter
  1900. X    BEQ    NextNumber        ; timed out, dial next number
  1901. X
  1902. X    LEA    timeout, A0
  1903. X    SUBQ.W    #1, (A0)        ; decrement timeout counter 
  1904. X     
  1905. X; let's see if we got anything in the buffer...
  1906. X    BSR    CheckPort
  1907. X
  1908. XCMDone:
  1909. X    MOVE.L    #10, D5            ; check Status 6X a sec
  1910. X    BRA    VBLreturn        ; come back later
  1911. X
  1912. X;---------------------------------------------------------------------------
  1913. X
  1914. XParseResponse:
  1915. X; we have a response, get it...
  1916. X    LEA    inBuf, A0
  1917. X    CLR.L    D0    
  1918. X    MOVE.W    (A0),D0            ; here's the response
  1919. X
  1920. X    SUBI.W    #OKStr,D0        ; turn into numeric code
  1921. X    LSR.W    #8,D0        
  1922. X
  1923. X    BMI.S    NextNumber        ; don't understand code
  1924. X
  1925. X    CMPI.W    #$C,D0            ; maximum code returned
  1926. X    BGT.S    NextNumber        ; too high
  1927. X
  1928. X    ADD.W    D0,D0            ; *2 for table index
  1929. X    MOVE.W    RespTable(D0),D0    ; Point to routine offset
  1930. X    JMP    RespTable(D0)        ; and jump to it
  1931. X
  1932. XRespTable:
  1933. X    DC.W    NextNumber-RespTable    ;0 OK (huh? try again)
  1934. X    DC.W    Connect-RespTable    ;1 CONNECT!
  1935. X    DC.W    KillVBL-RespTable    ;2 Ring
  1936. X    DC.W    NextNumber-RespTable    ;3 No Carrier
  1937. X    DC.W    NextNumber-RespTable    ;4 Error
  1938. X    DC.W    Connect-RespTable    ;5 Connect 1200
  1939. X    DC.W    KillVBL-RespTable    ;6 No Dial Tone (USR)
  1940. X    DC.W    NextNumber-RespTable    ;7 Busy (USR)
  1941. X    DC.W    NextNumber-RespTable    ;8 No Answer (USR)
  1942. X    DC.W    NextNumber-RespTable    ;9 Unused
  1943. X    DC.W    Connect-RespTable    ;A Connect 2400 (USR)
  1944. X    DC.W    VBLReturn-RespTable    ;B Ringing (wait some more)
  1945. X    DC.W    KillVBL-RespTable    ;C Voice
  1946. X    
  1947. XConnect:
  1948. X; notify user we have connect!
  1949. X    LEA     pbIn,A0
  1950. X        MOVE     #SerSetBuf,csCode(A0)
  1951. X        CLR.L    ioBuffer(A0)
  1952. X        CLR.L    csparam(A0)        ; don't use my buffer anymore
  1953. X        CLR.L    csParam+4(A0)            
  1954. X        LEA    pbIn,A0
  1955. X        _Control 
  1956. X
  1957. X    LEA    pbIn,A0
  1958. X    _KillIO                ; kill any pending i/o calls
  1959. X
  1960. X    LEA    pbOut,A0
  1961. X    _KillIO                
  1962. X
  1963. X    LEA    VBLCode, A0
  1964. X    MOVE.W    #QDOnline,(A0)        ; next time do OnLine
  1965. X
  1966. X    MOVE.L    #10, D5            ; back in 10 ticks
  1967. X    BRA    VBLreturn            
  1968. X
  1969. X;---------------------------------------------------------------------------
  1970. X
  1971. XOnLine:
  1972. X    MOVE.L    #20, D5            ; blink phone rapidly
  1973. X
  1974. X    TST.L    $282            ; is Switcher running?
  1975. X    BGT.S    @1            ; yes, don't beep
  1976. X    BSR Beep            
  1977. X@1:
  1978. X    BSR FlipPhone
  1979. X
  1980. X    BRA.S    VBLreturn
  1981. X
  1982. X;---------------------------------------------------------------------------
  1983. X
  1984. XNextNumber:
  1985. X; dial next number
  1986. X; first send a carriage return (to hang up if still on line)
  1987. X    BSR     CROut
  1988. X
  1989. X    LEA    VBLCode, A0
  1990. X    MOVE.W    #0, (A0)        ; start over again
  1991. X
  1992. X; this is the delay between dialing numbers - currently 1/2 sec
  1993. X; in later versions this should be a user modifiable parameter
  1994. X    MOVE.L    #30, D5        ; come back in 1/2 sec to dial next #
  1995. X
  1996. X    BRA.S    VBLreturn
  1997. X
  1998. X;---------------------------------------------------------------------------
  1999. X    
  2000. XKillVBL:
  2001. X; emergency exit
  2002. X    MOVE.W    #0, D5        ; 0 VBLCount (i.e. never return)
  2003. X
  2004. X;---------------------------------------------------------------------------
  2005. X
  2006. XVBLreturn:
  2007. X    LEA    VBLEntry, A0
  2008. X    MOVE.W    D5, vblCount(A0)    ; reset countdown
  2009. X    
  2010. X    MOVEM.L    (SP)+, D0-D7/A0-A6    ; restore all Regs
  2011. X    RTS
  2012. X
  2013. X;----------------------------------------------------------------------
  2014. X;     SUBROUTINES
  2015. X;----------------------------------------------------------------------
  2016. X
  2017. XCheckPort:
  2018. X; checks to see if any characters are waiting
  2019. X
  2020. X    LEA    pbIn, A0        ; serial in
  2021. X    MOVE.W    #serGetBuf, csCode(A0)    ; check buffer
  2022. X    _Status                ; get character count
  2023. X
  2024. X    RTS
  2025. X
  2026. X;----------------------------------------------------------------------
  2027. X
  2028. XReadPort:
  2029. X; reads characters from the modem port
  2030. X; on entry D0 contains number of characters to read
  2031. X
  2032. X    LEA    pbIn, A0        ; serial in
  2033. X    LEA    inBuf,A1
  2034. X    MOVE.L    A1,ioBuffer(A0)        ; where to put characters
  2035. X    MOVE.L    D0, ioByteCount(A0)    ; number of chars waiting
  2036. X    _ReadASYNC    
  2037. X
  2038. X    RTS
  2039. X
  2040. X;----------------------------------------------------------------------
  2041. X
  2042. XFlipPhone:    
  2043. X; draws a cute little phone in upper left
  2044. X
  2045. X; but only if the cursor isn't there (looks ugly)
  2046. X    CLR.B    -(SP)
  2047. X    PUSH.L    Mouse            ; current mouse position
  2048. X    PEA    PhoneRect        ; telephone rectangle
  2049. X    _PtInRect            ; is the mouse in the point?
  2050. X
  2051. X    POP.B    D0
  2052. X    BNE.S    FPDone            ; yes, don't draw phone
  2053. X
  2054. X; XOR phone onto menu bar
  2055. X    LEA    Phone, A0    ; phone bit image
  2056. X    MOVE.L    ScrnBase, A1    ; pointer to screen memory
  2057. X
  2058. X    MOVE.W    ScreenRow,D0    ; width of screen (rowBytes)
  2059. X    LSL.W    #2,D0        ; *4 (=move down four lines)
  2060. X    ADDA.W    D0, A1        ; jump down a bit
  2061. X    
  2062. X    MOVE.L    #12, D3        ; copies 13 lines
  2063. X    
  2064. XCopyImage:
  2065. X    MOVE.L    (A1), D0    ; get current bit image
  2066. X    SWAP    D0        ; phone goes on left side
  2067. X
  2068. X    MOVE.W    (A0)+,D1    ; get phone image 
  2069. X    EOR.W    D1, D0        ; copy it on
  2070. X
  2071. X    SWAP    D0        ; restore proper order
  2072. X
  2073. X    MOVE.L    D0, (A1)    ; move it back
  2074. X    
  2075. X    ADDA.W    ScreenRow, A1    ; next line down
  2076. X    DBRA    D3, CopyImage    ; do it again
  2077. X
  2078. XFPDone:
  2079. X    RTS
  2080. X
  2081. X;----------------------------------------------------------------------
  2082. X
  2083. XBeep:
  2084. X; does a square wave beep
  2085. X
  2086. X    LEA    pbOut,A0        ; reuse old parameter block
  2087. X
  2088. X    MOVE.W    #-4, $18(A0)        ; sound
  2089. X    LEA    SWSynRec, A1
  2090. X    MOVE.L    A1, ioBuffer(A0)    ; my sound
  2091. X    MOVE.L    #phone-SWSynRec, ioByteCount(A0)
  2092. X    _WriteASYNC            ; make the sound
  2093. X
  2094. X    RTS
  2095. X
  2096. X;----------------------------------------------------------------------
  2097. X
  2098. XCROut:
  2099. X; outputs a carriage return
  2100. X    LEA    pbOut, A0        ; output parameter block
  2101. X    LEA    cr, A1            ; send a carriage return
  2102. X    MOVE.L    A1, ioBuffer(A0)
  2103. X    MOVE.L    #2, ioByteCount(A0)    ; number of bytes to write
  2104. X    _WriteASYNC
  2105. X
  2106. X    RTS
  2107. X
  2108. X;----------------------------------------------------------------------
  2109. X;    DATA
  2110. X;----------------------------------------------------------------------
  2111. X
  2112. XVBLEntry:
  2113. X    DC.L    0    ; qLink
  2114. X    DC.W    vType    ; qType
  2115. X    DC.L    0    ; vblAddr
  2116. X    DC.W    10    ; vblCount
  2117. X    DC.W    0    ; vblPhase
  2118. X
  2119. Xnumbers        DCB.B    strSpace,0    ; dialing strings
  2120. XcurrStr        DC.W    0        ; next number to dial
  2121. XVBLCode        DC.W    0        ; VBLCode flag
  2122. Xtimeout        DC.W    0        ; countdown timer
  2123. Xcr        DC.W    $0D,0        ; a carriage return
  2124. XphoneRect    DC.W    0,0,20,20    ; the little phone's rect
  2125. XpbIn        DCB.B    ioQElSize, 0    ; io parameter block (input)
  2126. XpbOut        DCB.B    ioQElSize, 0    ; io parameter block (output)
  2127. XinBuf        DCB.B    bufLen,0    ; input buffer
  2128. X
  2129. X; here's the sound
  2130. XSWSynRec    DC.W    -1        ; square wave synthesizer mode
  2131. X        DC.W    11875        ; count
  2132. X        DC.W    150        ; amplitude
  2133. X        DC.W    10        ; duration (in ticks)
  2134. X        DC.W    -1
  2135. X        DC.W    0,0,0        ; terminating record
  2136. X
  2137. XPhone:
  2138. X; this is the bit image of the telephone
  2139. X    DC.W    $1FFC,$2002,$22A2,$3C1E 
  2140. X    DC.W    $0948,$1224,$1004,$1224 
  2141. X    DC.W    $1144,$1004,$1FFC
  2142. X    DC.W    $0000,$0000
  2143. X    
  2144. XTaskStop:
  2145. X
  2146. X;----------------------------------------------------------------
  2147. X; EOF qVBL.asm
  2148. X;----------------------------------------------------------------
  2149. ________This_Is_The_END________
  2150. if test `wc -l < qVBL.asm` -ne 457; then
  2151.     echo 'shar: qVBL.asm was damaged during transit'
  2152.   echo '      (should have been 457 bytes)'
  2153. fi
  2154. fi        ; : end of overwriting check
  2155. echo 'Extracting qDial.r'
  2156. if test -f qDial.r; then echo 'shar: will not overwrite qDial.r'; else
  2157. sed 's/^X//' << '________This_Is_The_END________' > qDial.r
  2158. X* qDial.r
  2159. X* The RMAKER file for the Qdial Desk Accessory
  2160. X*          ,
  2161. X* (c)1986 Leo Laporte, all rights reserved
  2162. X* v1.1 11-Mar-86
  2163. X
  2164. Xb:QDial 1.1
  2165. XDFILDMOV
  2166. X
  2167. XTYPE DRVR = PROC
  2168. XQDial, 31    (32)
  2169. Xb:qdial.code
  2170. X
  2171. XInclude b:qDial.PICT
  2172. X* The QDial dialog box
  2173. X
  2174. XTYPE DLOG
  2175. XQDial Dialog, -15392  (32)
  2176. XMacQueue Dialer 1.1
  2177. X50 35 325 480 
  2178. XVisible NoGoAway
  2179. X4
  2180. X0
  2181. X-15392
  2182. X
  2183. XTYPE DITL
  2184. XQDial Dialog, -15392 (32)
  2185. X26
  2186. X
  2187. XStatText Disabled
  2188. X207 10 227 440
  2189. X^0 ^1I
  2190. X
  2191. XBtnItem Enabled
  2192. X240 50 260 140 
  2193. XDial
  2194. X
  2195. XBtnItem Enabled
  2196. X240 177 260 267 
  2197. XInfo
  2198. X
  2199. XBtnItem Enabled
  2200. X240 305 260 395 
  2201. XCancel
  2202. X
  2203. XStatText Disabled
  2204. X7 10 23 166 
  2205. XName of BBS
  2206. X
  2207. XStatText Disabled
  2208. X7 170 23 321 
  2209. XNumber to Dial
  2210. X
  2211. XStatText Disabled
  2212. X7 403 23 450 
  2213. XDial?
  2214. X
  2215. XEditText Enabled
  2216. X30 10 47 160 
  2217. X
  2218. XEditText Enabled
  2219. X30 170 47 390
  2220. X
  2221. XEditText Enabled
  2222. X60 10 77 160 
  2223. X
  2224. XEditText Enabled
  2225. X60 170 77 390
  2226. X
  2227. XEditText Enabled
  2228. X90 10 107 160 
  2229. X
  2230. XEditText Enabled
  2231. X90 170 107 390
  2232. X
  2233. XEditText Enabled
  2234. X120 10 137 160 
  2235. X
  2236. XEditText Enabled
  2237. X120 170 137 390
  2238. X
  2239. XEditText Enabled
  2240. X150 10 167 160 
  2241. X
  2242. XEditText Enabled
  2243. X150 170 167 390
  2244. X
  2245. XChkItem Enabled
  2246. X30  410 48 445
  2247. X
  2248. XChkItem Enabled
  2249. X60 410 78 445
  2250. X
  2251. XChkItem Enabled
  2252. X90 410 108 445
  2253. X
  2254. XChkItem Enabled
  2255. X120 410 138 445
  2256. X
  2257. XChkItem Enabled
  2258. X150 410 168 445
  2259. X
  2260. XStatText Disabled
  2261. X182 10 200 90
  2262. XBaud Rate:
  2263. X
  2264. XRadioButton Enabled
  2265. X180 130 200 190
  2266. X300
  2267. X
  2268. XRadioButton Enabled
  2269. X180 205 200 265
  2270. X1200
  2271. X
  2272. XRadioButton Enabled
  2273. X180 280 200 420
  2274. X2400
  2275. X
  2276. X
  2277. XType ALRT
  2278. XQDial Error,-15392  (32)
  2279. X100 50 200 462
  2280. X-15391
  2281. X7777
  2282. X
  2283. XType DITL
  2284. XQDial Error, -15391 (32)
  2285. X3
  2286. X
  2287. XButton
  2288. X70 300 90 370
  2289. XQuit
  2290. X
  2291. XStatText Disabled
  2292. X11 70 31 400
  2293. XError: ^0
  2294. X
  2295. XStatText Disabled
  2296. X36 70 51 400
  2297. X^1 
  2298. X
  2299. X* The Help dialog
  2300. XTYPE DLOG
  2301. XQDial Help, -15391  (32)
  2302. X
  2303. X30 35 325 480 
  2304. XVisible NoGoAway
  2305. X1
  2306. X0
  2307. X-15390
  2308. X
  2309. XType DITL
  2310. XQDial Help,-15390 (32)
  2311. X1
  2312. X
  2313. XBtnItem Enabled
  2314. X260 177 280 267 
  2315. XOK
  2316. X
  2317. X
  2318. X* This is the special QDial resource, composed of 10 strings
  2319. X* of 40 charcters each, followed by the
  2320. X* five check item settings and an offset for the baud rate
  2321. X* (0=300, 1=1200, 2=2400)
  2322. X
  2323. XType QDIL = GNRL
  2324. XQdial Numbers,-15392    (32)
  2325. X.I
  2326. X0 0 0 0 0 0 0 0 0 0
  2327. X0 0 0 0 0 0 0 0 0 0
  2328. X0 0 0 0 0 0 0 0 0 0
  2329. X0 0 0 0 0 0 0 0 0 0
  2330. X0 0 0 0 0 0 0 0 0 0
  2331. X0 0 0 0 0 0 0 0 0 0
  2332. X0 0 0 0 0 0 0 0 0 0
  2333. X0 0 0 0 0 0 0 0 0 0
  2334. X0 0 0 0 0 0 0 0 0 0
  2335. X0 0 0 0 0 0 0 0 0 0
  2336. X0 0 0 0 0 0 0 0 0 0
  2337. X0 0 0 0 0 0 0 0 0 0
  2338. X0 0 0 0 0 0 0 0 0 0
  2339. X0 0 0 0 0 0 0 0 0 0
  2340. X0 0 0 0 0 0 0 0 0 0
  2341. X0 0 0 0 0 0 0 0 0 0
  2342. X0 0 0 0 0 0 0 0 0 0
  2343. X0 0 0 0 0 0 0 0 0 0
  2344. X0 0 0 0 0 0 0 0 0 0
  2345. X0 0 0 0 0 0 0 0 0 0
  2346. X0 0 0 0 0
  2347. X1
  2348. X
  2349. X
  2350. XType STR#
  2351. XQDial Error Messages,-15392 (32)
  2352. X12
  2353. XCouldn't install VBL task
  2354. XClosing qDial 
  2355. XCan't load QDIL resource
  2356. XClosing qDial 
  2357. XCouldn't create qDial window
  2358. XClosing desk accessory
  2359. XCouldn't read or write parameters
  2360. XClosing qDial
  2361. XModem not responding
  2362. XCheck connections and try again
  2363. XInsufficient memory to run Qdial
  2364. XClosing desk accessory
  2365. X
  2366. XType STR# 
  2367. XQDial Messages, -15391 (32)
  2368. X3
  2369. XNot online.  
  2370. XPress Dial to begin
  2371. XPress Cancel - you're online with
  2372. X
  2373. X
  2374. XType TEXT = GNRL
  2375. XQdial Help,-15392    (32)
  2376. X.S
  2377. XMacQueue Dialer is not public domain, but you may use it without charge.\D
  2378. X.S
  2379. X  Please give copies to anyone who might find it useful.\D\D  
  2380. X.S   
  2381. X% MacQueue Dialer only works with Hayes modems and compatibles.\D
  2382. X.S
  2383. X% Don't run a terminal program while MacQueue Dialer is dialing!\D
  2384. X.S
  2385. X% To stop dialing (or beeping), re-open MacQueue Dialer.\D\D
  2386. X.S
  2387. XFor the latest version, documentation, and complete assembly source call\D
  2388. X.S
  2389. XMacQueue I (415) 661-7374 - MacQueue II (415) 753-3002\D\D
  2390. X.S
  2391. XPlease forward comments and bug reports to Lo Laporte:\D
  2392. X.S
  2393. XCIS: 75106,3135 - Delphi: LAPORTE - GEnie: LAPORTE - Fidonet 125/2\D
  2394. X.S
  2395. XUSENET: {ptsfa, hplabs, dual, lll-crg, glacier}!well!laporte\D
  2396. X.S 
  2397. XThanks to the MacQueue Founders for their help in bug testing this program!
  2398. X
  2399. X* EOF Q.R
  2400. ________This_Is_The_END________
  2401. if test `wc -l < qDial.r` -ne 243; then
  2402.     echo 'shar: qDial.r was damaged during transit'
  2403.   echo '      (should have been 243 bytes)'
  2404. fi
  2405. fi        ; : end of overwriting check
  2406. exit 0
  2407.