home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 8 / boot-disc-1997-04.iso / PDA_Soft / Psion / sounds / TSMP.OPL < prev    next >
Text File  |  1994-04-06  |  1KB  |  62 lines

  1. PROC tsmp:
  2.   global pcb%,buf%(480)
  3.   deldrv:
  4.   askrun:
  5.   loaddrv:
  6.   opench:
  7.   main:
  8.   ioclose(pcb%)
  9. ENDP
  10.  
  11. PROC deldrv:
  12.   local s$(4)
  13.   s$="SMP"
  14.   call($0885,addr(s$)+1,0,$dd01)
  15. ENDP
  16.  
  17. PROC askrun:
  18.   if alert("SMP: deleted","Start sampling?","Exit","Continue")=1
  19.     stop
  20.   endif
  21. ENDP
  22.  
  23. PROC loaddrv:
  24.   local off%(6),f$(130),r%
  25.   local ax%,bx%,cx%,dx%,si%,di%,fl%
  26.   f$=parse$("\sys$samp.LDD",cmd$(1),off%(1))
  27.   bx%=addr(f$)+1
  28.   ax%=$0600
  29.   fl%=os($85,addr(ax%))
  30.   ax%=ax% or $ff00
  31.   if (fl% and 1) and (ax% <> -32)
  32.     alert("Failed to load SYS$SAMP.LDD",err$(ax%))
  33.     stop
  34.   endif
  35. ENDP
  36.  
  37. PROC opench:
  38.   local r%
  39.   r%=IOOPEN(pcb%,"SMP:",-1)
  40.   if r%
  41.     alert("Failed to open channel to SMP:",err$(r%))
  42.     stop
  43.   endif
  44. ENDP
  45.  
  46. PROC main:
  47.   local x%,y%
  48.   gUpdate OFF
  49.   while 1
  50.     IOREAD(pcb%,addr(buf%(1)),480)
  51.     gCls
  52.     gAt 0,80
  53.     x%=1
  54.     while x%<=480
  55.       y%=80+buf%(x%)/64
  56.       gLineTo x%,y%
  57.       x%=x%+1
  58.     endwh
  59.     gUpdate
  60.   endwh
  61. ENDP
  62.