home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplexamp / SERIAFAX.TXT < prev    next >
Text File  |  1994-06-21  |  2KB  |  65 lines

  1. ==========
  2. psion/comms #470, from dw2, 2160 chars, Jun 20 20:33 94
  3. ----------
  4. Running comms programs over 3Fax hardware
  5. I've been asked more than once now what's required to get programs that 
  6. open the serial port (eg Comms programs) to work with the 3Fax hardware.
  7.  
  8. Often, if you try running these programs over the 3Fax hardware, you 
  9. just get a "Device does not exist" error.  That arises because the 
  10. hardware of the 3Fax peripheral is different from that in the 3Link 
  11. peripheral.
  12.  
  13. In fact, before a program can talk down the 3Fax peripheral, a special 
  14. device driver, SYS$A550.PDD (or equivalent) needs to be loaded.  The 
  15. FComms program that comes with the 3Fax software loads this driver 
  16. automatically before transferring control to the Comms.app in the S3a 
  17. rom.
  18.  
  19. If you want to do something similar with some alternative Comms program, 
  20. you can make use of the following Opl program (run this if you ever get 
  21. the "Failed to open comms port: Device does not exist" error):
  22.  
  23. PROC loada550:
  24.   local ax%,bx%,cx%,dx%,si%,di%,fl%
  25.   local nm$(30)
  26.   nm$="LOC::C:\IMG\SYS$A550.PDD"
  27.   bx%=addr(nm$)+1
  28.   ax%=$0700   rem for DevLoadPdd
  29.   fl%=os($85,addr(ax%))
  30.   ax%=ax% or $ff00
  31.   if (fl% and 1) and (ax% <> -32)
  32.     alert("Failed to load PDD",err$(ax%))
  33.   else
  34.     print "PDD loaded successfully"
  35.     get
  36.   endif
  37. ENDP
  38.  
  39. After running this, try running your comms program again, and you should 
  40. find that it will now successfully open the comms port.
  41.  
  42. As mentioned, the problem is that the "physical device driver" with 
  43. filename SYS$A550.PDD has to be loaded before the serial port LDD 
  44. (logical device driver) is able to talk to the hardware in the 3Fax 
  45. unit.  The above Opl code loads this PDD.  If you watch your memory 
  46. monitor, you'll find that loading it ties up another 2k of system memory.
  47.  
  48. If you don't want to keep this device driver in memory afterwards, run 
  49. the following Opl program:
  50.  
  51. PROC dela550:
  52.   local dn$(8)
  53.   dn$="TTY.SRX"
  54.   call($0885,addr(dn$)+1,0,$dd21)  rem DevDelete
  55. ENDP
  56.  
  57. Note: the Fax app also loads the a550 PDD before ever talking to the 
  58. 3Fax hardware.  (In fact, it's the fax *process*, SYS$FAXP.IMG, that 
  59. does this.)  But when it's finished, it unloads the PDD again.
  60.  
  61. Hope this helps.
  62. Regards, DavidW
  63.  
  64.  
  65.