home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR33 / A-R / PTCAP12.LBR / PTCAP12.1Z0 / PTCAP12.180
Text File  |  2000-06-30  |  22KB  |  689 lines

  1. title PTCAP TCAP Modifier for PBBS
  2. ;=========================================================================
  3. ; PTCAP  
  4. ;
  5. ; Written by:     Terry Pinto
  6. ;        Access Programming RAS
  7. ;        14385 SW Walker Rd. B3
  8. ;        Beaverton, OR  97006
  9. ;        
  10. ;        (503) 646-4937  (300/1200  24 hours/day)
  11. ;        (503) 644-0900  Voice ==> 6:00pm to 10:00pm ONLY
  12. ;
  13. ; This program was designed to make the updateing of the TCAP entry
  14. ; file easier. At present, each time a new TCAP file is released, 
  15. ; all of the user entries must be updated by hand, or each caller 
  16. ; must go in and reselect his/her terminal identifier. This can be
  17. ; a large undertaking in the case of better known boards that have 
  18. ; a large user base. This makes the changeover to new TCAP's sluggish.
  19. ; Many sysop's are not installing the new versions of TCAP because of 
  20. ; this drawback. Gentlemen, we have computers to do the jobs we don't
  21. ; want to or don't have time to do. Lets get the show on the road!
  22. ;
  23. ; PTCAP reads the index list of both the current and new TCAP's into
  24. ; memory. Then the PBBS user base (USERS.PBS) is opened and each user 
  25. ; record is examined. The terminal code is taken from the user record   
  26. ; and is used to get the current terminal id string. This string is
  27. ; compared against the new TCAP file. When a match is found, a new  
  28. ; index number is calculated and stored in the user record. If no      
  29. ; match is found, it is assumed that support for the previous entry 
  30. ; has been dropped. The user record is then updated to reflect the 
  31. ; (None requested) selection. This entry will force the user through
  32. ; selection process on his/her next call. 
  33. ;
  34. ; PTCAP was written to assemble with SLR180p, however it will also
  35. ; work with M80. In either case it must be linked with SYSLIB36.REL 
  36. ; and Z3LIB13.REL
  37. ;
  38. ; If you have any problems, fixes or suggestions, please report them to
  39. ; me on either Russ Pencin's board, "Dallas Connection" (415) 964-4356,   
  40. ; Ben Grey's board, "Cedar Mill Z-Node 24" (503) 644-4621, or my board,
  41. ; "Access Programming RAS" (503) 644-0900.
  42. ;
  43. ; Writting this program would not have been possible if it were not 
  44. ; for the help and patience of Ben Grey, sysop of Cedar Mill Z-Node 24 
  45. ; and co-sysop of Access Progrmaming RAS. Thank you Ben.
  46. ;
  47. ; HISTORY - 
  48. ;
  49. ;    Version 1.2    05/16/87    Re-work display routines to
  50. ;                    enhance program speed.    [tlp]
  51. ;
  52. ;    Version 1.1    05/01/87    Fix problem with the update of
  53. ;                    users with terminals no longer
  54. ;                    supported.        [tlp]
  55. ;
  56. ;    Version 1.0    04/02/87    Original release    [tlp]
  57. ;
  58. ;=========================================================================
  59. ;
  60. ;
  61.     yes    equ    1
  62.     no    equ    not yes
  63. ;
  64. ; Version and revision number. The only official releases are those that
  65. ; have been approved by the Access Programming RAS. Any other versions è; or revisions are not official and will not be supported by me. Please
  66. ; send any updates or revisions to me at the above address or by modem   
  67. ; to my system.  
  68. ;
  69.     ver    equ    1    ; version number
  70.     vers    equ    2    ; revision number
  71. ;
  72.     tab    equ    09h    ; tab character
  73.     cr    equ    0dh    ; carriage return
  74.     lf    equ    0ah    ; line feed
  75.     bell    equ    07h    ; bell character
  76.     tbuf    equ    80h    ; default DMA
  77. ;
  78. ; If you do not use a ZCPR3x operating system, set the Z3ENV to 0.
  79. ;
  80.     z3env    equ    0d000h    ; z3 environment descriptor
  81.     dfcb1    equ    05ch    ; default fcb1
  82.     dfcb2    equ    06ch    ; default fcb2
  83. ;
  84. ; The clear screen defined below will use your TCAP's code
  85. ; if you have a Z3ENV defined above. If you do not operate
  86. ; within a Z3 environment, you have been provided with six
  87. ; bytes to define a clear screen and home cursor sequence.
  88. ; The seventh byte is a terminator, DO NOT CHANGE!
  89. ;
  90.      if    z3env ne 0
  91.     cls    equ    z3env+97h ; clear screen code
  92.      else
  93.     cls    db    0,0,0,0,0,0  
  94.         db    0      ; terminator - DO NOT CHANGE
  95.      endif
  96. ;
  97. ; The following equates should be set the same as they are in the PBBS
  98. ; header file. THIS IS IMPORTANT.
  99. ;
  100.     totusr    equ    400    ; maximum users set in PBBSHDR
  101. ;
  102. ; The system drive and user areas reflect the DU where your 
  103. ; USERS.PBS and the 'old' and 'new' Z3TCAPxx.TCP files are
  104. ; located. Usually A14:. 
  105. ;
  106.     sysdrv    equ    0    ; system drive A=0 B=1...  
  107.     sysusr    equ    14    ; system user area
  108.     version    equ    yes     ; show version number 1=yes 0=no
  109.     credits    equ    yes    ; show author name    1=yes 0=no
  110. ;
  111. ; The following declares any external subroutines necessary
  112. ; for assembly. These routines are all defined in SYSLIB36.REL.
  113. ;
  114.     ext    f$open, f$close, f$read, r$write, f$exist, r$read
  115.     ext    setdma, compbc, initfcb, scanner, divhd, instr
  116.     ext    epstr, pfn1, putud, getud, logud, crlf, padc
  117.     ext    z3init, phl4hc, phlfdc, phldc, mulhd, cout             
  118.     ext    fi0$open, fo0$open, fi0$close, fo0$close, f0$get, f0$put
  119. ;
  120.     org    100h
  121. ;
  122. ; Standard Z3 Header for all Z system programs.
  123. ;
  124.      if    z3env ne 0
  125. ; External ZCPR3 Environment Descriptor
  126. ;
  127.     jp    start 
  128.     db    'Z3ENV'
  129.     db    1
  130. z3eadr:    dw    z3env
  131. start:    ld    hl,(z3eadr)
  132.      else
  133. ;
  134. ; Internal ZCPR3 Environment Descriptor
  135. ;
  136.     MACLIB     Z3BASE        ; get ZCPR3 system equates
  137.     MACLIB    SYSENV
  138. ;
  139. z3eadr:    jp    start 
  140.     SYSENV
  141. start:    ld    hl,z3eadr
  142.      endif
  143. ;
  144. ; Standard initialization for PBBS programs. Save the system stack for
  145. ; re-entry to operating system. Load the drive/user areas defined in
  146. ; the header file as the system drive/user area. This is where we will
  147. ; find the files we will want to look at.
  148. ;
  149.     ld    (system),sp    ; save stack
  150.     ld    sp,system    ; point to stack
  151. ;
  152. ; Environment Definition
  153. ;
  154.     call    z3init        ; initialize z3 environment
  155.      call    putud         ; save current drive/user area
  156.      ld    b,sysdrv    ; defined system drive
  157.      ld    c,sysusr    ; defined system user area
  158.      call    logud         ; log into defined drive/user area
  159. ;
  160. ; Initialize all FCB's
  161. ;
  162.     ld    de,fcb1        ; point to fcb1
  163.     call    initfcb        ; initialize
  164.     ld    de,fcb2        ; point to fcb2
  165.     call    initfcb        ; initialize
  166.     ld    de,fcb3        ; point to fcb3
  167.     call    initfcb        ; initialize
  168.     ld    de,fcb4        ; point to fcb4
  169.     call    initfcb        ; initialize
  170. ;
  171. ; Sign-on message
  172. ;
  173.     ld    hl,cls        ; point to clear screen message
  174.     call    epstr        ; clear screen
  175.     ld    hl,signon    ; point to signon message
  176.       call    epstr        ; print signon message
  177. cmdln:    
  178.     ld    hl,tbuf      ; point to command line     
  179.           ld    a,(hl)        ; put first character of command line in A
  180.     cp    0        ; 0 = no command tail
  181.     jp    z,help0     ; if yes, give syntax error and help
  182.     ld    hl,dfcb1+1    ; point to first filename
  183.     ld    de,fcbn1    ; point to internal fcb1
  184.     ld    bc,8        ; number of bytes to transferè    ldir            ; move to internal FCB1
  185.     ld    hl,dfcb2+1    ; point to second filename
  186.            ld    a,(hl)        ; put first character in A
  187.            cp     ' '          ; 0 means no filename specified
  188.     jp    z,option      ; if so - use internally defined filename
  189.     ld    de,fcbn2    ; point to internal fcb2
  190.     ld    bc,8        ; number of bytes to transfer
  191.     ldir            ; move to internal FCB2
  192. option:    
  193.     ld    hl,fcbn1    ; point to first character in fcb1
  194.     ld    a,(hl)        ; place character in A
  195.     cp    '?'        ; is it a '?'
  196.     jp    z,help         ; yes - give help
  197.     cp    '/'         ; is it z3 system help - '/'
  198.     jp    z,help         ; yes - give help
  199. ;
  200. ; initialize buffers for opening of files
  201. ;
  202.     ld    de,fcb1        ; open new TCAP file   
  203.     call    fopen                      
  204.     ld    de,fcb2        ; open old TCAP file  
  205.     call    fopen                        
  206.     ld    de,fcb3        ; open PBBS user file
  207.     call    uopen                     
  208.     ld    de,fcb4        ; open new PBBS user file
  209.     call    nopen
  210. ;
  211. ; Read TCAP index files into memory - the terminal id string is 16 bytes long
  212. ; and each terminal is listed in the beginning of the TCAP file in an index.
  213. ; The last entry in the index is a space followed by the version number of
  214. ; the TCAP listing.
  215. ; Read new TCAP into memory
  216. ;
  217.     ld    de,fcb1        ; point to current FCB
  218.     ld    (fcb),de    ; save it
  219.     ld    de,buf1        ; point to current buffer
  220.     ld    (buffer),de    ; save it
  221.     call    tid           ; read TCAP into memory
  222. ;
  223. ; Read old TCAP into memory
  224. ;
  225.     ld    de,fcb2        ; point to current FCB
  226.     ld    (fcb),de    ; save it
  227.     ld    de,buf2        ; point to current buffer
  228.     ld    (buffer),de    ; save it
  229.     call    initrd        ; read TCAP into memory
  230.     call    crlf        ; new line
  231.     call    crlf        ; another new line
  232. next:
  233.     call    user        ; read user record into memory
  234. ;
  235. ; Process user record
  236. ;
  237.     ld    hl,pcmsg    ; point to processing message
  238.     call    epstr        ; print message
  239.     ld    hl,(nlrec)    ; get record number
  240.     ld    de,totusr    ; get maximum number of users
  241.     sbc    hl,de        ; have we reached the end?
  242.     jp    nc,norec    ; skip processing, just write record
  243.     ld    hl,(nlrec)    ; get record number again
  244.     call    phldc        ; print record number
  245.     ld    hl,unamef    ; point to user name
  246.     ld    a,(hl)        ; is there a name here?
  247.     cp    ' '        ; a space means no name
  248.     jp      z,norec        ; get next user record
  249.     cp    0        ; is the record used     
  250.     jp      z,norec        ; no - get next record
  251.     ld    de,name        ; point to internal buffer
  252.     ld    bc,30        ; length of user name field
  253.     ldir            ; transfer name to internal buffer
  254.     ld    a,(tcodef)    ; get terminal code into A 
  255.     ld    (tcode2),a     ; put into internal buffer
  256.     dec    a        ; decrement pointer
  257.     ld    l,a        ; put A in L
  258.     ld    h,0        ; zero H
  259.     ld     de,16        ; number of bytes per entry
  260.     call    mulhd        ; multiply HL by DE
  261.     ld    de,buf2        ; start address of old TCAP file
  262.     add    hl,de        ; add in offsetè    ld    de,term2     ; point to internal buffer
  263.     ld    bc,16        ; length of id string
  264.     ldir            ; transfer to internal buffer
  265.     ld    hl,buf1        ; string to scan 
  266.     ld    de,term2     ; string to scan for
  267.     call    instr        ; scan for termid in new buffer
  268.     jp        nz,sc$err    ; indicate scan error
  269.     ld    (buf),hl    ; save string start address
  270.     ld     de,buf1        ; get start address of new TCAP file
  271.     sbc    hl,de        ; offset into buffer
  272.     ld    de,16        ; number of bytes per entry
  273.     call    divhd        ; calculate new terminal code number 
  274.     ld    a,l        ; put terminal code in A
  275.     ld    (tcode1),a     ; save terminal code
  276.     inc    a        ; bump pointer
  277.     ld    a,(tcode1)    ; get new terminal code
  278.     ld    l,a        ; put in L
  279.     ld    h,0        ; zero H
  280.     ld    de,16        ; number of bytes per entry
  281.     call    mulhd        ; multiply HL by DE
  282.     ld    de,buf1        ; get start address of new TCAP buffer
  283.     add    hl,de        ; add in offset
  284.     ld    de,term1    ; point to internal buffer
  285.     ld    bc,16        ; length of terminal string
  286.     ldir            ; transfer to internal buffer
  287. errtn:
  288.     call    pwrt        ; write record to USER file
  289.     jp    next        ; get next user record
  290. ;
  291. ; Copy blank record to user file so as not to contaminate USER index.
  292. ;
  293. norec:
  294.     call    nowrt        ; write blank record to USER file
  295.     jp    next        ; get next record
  296. ;
  297. ; Read USER record into memory
  298. ;
  299. user:                 
  300.     ld    b,100        ; number of bytes in user record
  301.     ld    c,0        ; zero C
  302.     ld    hl,(nlrec)    ; get record counter
  303.     inc    hl        ; bump counter
  304.     ld    (nlrec),hl    ; save logical record number in buffer
  305.     ld    de,totusr+4    ; number of records to load in buffer
  306.     sbc    hl,de        ; check for end of file
  307.     jp    z,exit        ; if EOF, then exit
  308.     ld    hl,tbuf        
  309. get:
  310.     call    f0$get        ; read block into memory
  311.     call    nz,fop$err    ; file read error routines
  312.     ld    (hl),a        ; put character in buffer
  313.     inc    hl        ; increment pointer
  314.     djnz    get        ; get next character
  315.     ret
  316. ;
  317. ; Subroutine to write record to USER file
  318. ;
  319. pwrt:
  320.      ld    a,(tcode1)    ; get new terminal code
  321.     inc    a        ; increment value of terminal code
  322.      ld    (tcodef),a    ; put in USER record
  323. nowrt:
  324.     ld    b,100        ; number of bytes in user record
  325.     ld    c,0        ; zero C
  326.     ld    hl,tbuf        ; point to buffer
  327. put:
  328.     ld    a,(hl)        ; put character from buffer into A
  329.     call    f0$put        ; write character to file
  330.     call    nz,fop$err    ; file write error routines
  331.     inc    hl        ; increment pointer
  332.     djnz    put        ; get next character
  333.     ret
  334. ;
  335. ; Subroutine to read TCAP into memory
  336. ;
  337. tid:
  338.     ld    hl,tcapid    ; point to status message
  339.     call    epstr        ; print message
  340. initrd:
  341.     ld    hl,(buffer)      ; point to internal buffer
  342.     ld    (buf),hl    ; save internal buffer address
  343. rtcap: 
  344.     ld    hl,tbuf        ; point to default DMA
  345.     call    setdma        ; set DMA address
  346.     ld    de,(fcb)    ; get FCB address
  347.      call    f$read        ; read record into TBUF
  348.      jp    nz,rf$err    ; read error routines
  349.     ld    hl,tbuf        ; point to tbuf
  350.     ld    de,(buf)    ; point to buf
  351.     ld      bc,128        ; number of bytes to transfer
  352.     ldir            ; transfer to internal buffer
  353.     ld    (buf),de    ; save new buffer address
  354.     ld    hl,tbuf      ; point to default buffer
  355.     ld    de,term        ; point to terminator descriptor
  356.     ld    b,128        ; number of bytes in buffer
  357.     ld    c,1        ; number of bytes to look for
  358.     call    scanner        ; search for DE in HL
  359.     or    a        ; set flags
  360.     jr    nz,rtcap     ; get next record
  361.     ld    hl,(buf)    ; point to current buffer
  362.     ld    bc,16        ; size of terminal id string
  363. rep:     
  364.     sbc    hl,bc        ; subtract 16 from buffer pointer
  365.     ld    a,(hl)        ; put first character of buffer in A
  366.     cp    ' '        ; is it a space?
  367.     inc    hl        ; advance buffer pointer
  368.     jr    nz,rep         ; if no, repeat until find
  369.     dec    hl        ; retard pointer againè    ld    (buf),hl    ; save temporary buffer
  370.     ld    de,(buffer)    ; get start address of buffer
  371.     sbc    hl,de        ; subtract end address to get length of buffer
  372.     ld    de,16        ; set divisor
  373.     call    divhd        ; divide HL by DE
  374.     ld    (cnt),hl    ; store in buffer
  375.     ld    hl,(buf)    ; restore temporary buffer
  376.     ld    de,versn    ; point to destination for version number
  377.     ld    bc,4        ; number of bytes to transfer
  378.     ldir            ; transfer version number to internal buffer
  379.     ld    hl,tcver    ; point to VERSION
  380.     call    epstr        ; print message
  381.     ld    hl,versn+1    ; get version number of TCAP   
  382.     call    epstr        ; print version number
  383.     ld    hl,(cnt)    ; get number of terminals in TCAP
  384.     call    phldc        ; display number of terminals
  385.     ld    hl,entry    ; point to TERMINALS message
  386.     call    epstr        ; print message
  387.     ret
  388. ;       
  389. ; open files
  390. ;
  391. fopen:
  392.     call    f$exist        ; does file exist?
  393.     jp      z,fnf$err    ; file not found error routine
  394.     call    f$open        ; open file
  395.     or    a        ; set flags
  396.     call    nz,op$err    ; open error routines
  397.     ret
  398. uopen:    
  399.     call    f$exist        ; does file exist?
  400.     jp    z,fnf$err    ; file not found error routines
  401.     call    fi0$open    ; open file
  402.     or    a        ; set flags
  403.     call    nz,fop$err    ; open error routines
  404.     ret
  405. nopen:
  406.     call    fo0$open    ; create and open file
  407.     or     a        ; set flags
  408.     call    nz,fop$err    ; open error routines
  409.     ret
  410. exit:
  411.     call    crlf        ; new line
  412.     ld    hl,dpmsg    ; point to terminals dropped message
  413.     call    epstr        ; print message
  414.     ld    a,(drop)    ; get number of users without support
  415.     call    padc         ; print number
  416.       call    crlf        ; new line
  417.     ld    hl,comp         ; point to operation completed message
  418.     call    epstr        ; print message
  419.     ld    de,fcb1        ; point to old TCAP file
  420.     call    f$close        ; close file
  421.     call    nz,cl$err    ; close file error routines
  422.     ld    de,fcb2        ; point to new TCAP file
  423.     call    f$close        ; close file
  424.     call    nz,cl$err    ; close file error routines
  425.     ld    de,fcb3        ; point to PBBS user file
  426.     call    fi0$close    ; close file
  427.     call    nz,fop$err    ; close error routines
  428.     ld    de,fcb4        ; point to new USER file
  429.     call    fo0$close    ; close file
  430.     call    nz,fop$err    ; close error routines
  431. ext2:
  432.     call    getud        ; restore original drive/user area
  433.     ld    sp,(system)    ; restore old stack pointer
  434.     ret
  435. ;
  436. ; Error routines
  437. ;
  438. fop$err:
  439.     push    hl        ; save HL on stack
  440.     push    de        ; save DE on stack
  441.     ld    hl,err        ; point to ERROR
  442.     call    epstr        ; print ERROR
  443.     cp    1
  444.     jp    nz,ferr2
  445.     ld    hl,foerr1
  446.     jp    prerr
  447. ferr2:    cp    2
  448.     jp    nz,ferr3
  449.     ld    hl,foerr2
  450.     jp    prerr
  451. ferr3:    cp    3
  452.     jp    nz,ferr4
  453.     ld    hl,foerr3
  454.     jp    prerr
  455. ferr4:    cp    4
  456.     jp    nz,ferr5
  457.     ld    hl,foerr4
  458.     jp     prerr
  459. ferr5:    cp    5
  460.     jp    nz,ferr6
  461.     ld    hl,foerr5
  462.     jp    prerr
  463. ferr6:    cp    6
  464.     jp    nz,ferr7
  465.     ld    hl,foerr6
  466.     jp    prerr
  467. ferr7:    cp    7
  468.     jp    nz,rerr9
  469.     ld    hl,foerr7
  470.     jp    prerr
  471. rf$err:    è    push    hl        ; save HL on stack
  472.     push    de        ; save DE on stack
  473.     ld    hl,err        ; point to ERROR
  474.     call    epstr        ; print ERROR
  475.     cp    1        ; was it read error 1
  476.     jp    nz,rerr2    ; if yes, show error
  477.     ld    hl,rderr1
  478.     jr    prerr    
  479. rerr2:    cp    2        ; was it read error 3
  480.     jp    nz,rerr9    ; if yes, show error
  481.     ld    hl,rderr2
  482.     jr    prerr
  483. rerr9:    ld    hl,rderr9
  484. prerr:    call    epstr        ; print error message
  485.     call    crlf        ; print cr lf
  486.     pop    de        ; restore stack
  487.     pop    hl        ; restore stack
  488.     jp     exit
  489. eof$err:
  490.     ld    hl,err        ; point to ERROR 
  491.     call    epstr        ; print ERROR
  492.     ld    hl,eoferr    ; point to error message
  493.     call    epstr        ; print error message
  494.     call    crlf        ; print CRLF
  495.     jp    exit
  496. op$err:
  497.     ld    hl,err        ; point to ERROR
  498.     call    epstr        ; print ERROR
  499.     ld    hl,operr    ; point to error message
  500.     call    epstr        ; print error message
  501.     inc    de        ; point to FCB+1
  502.     call    pfn1        ; print filename
  503.     call    crlf        ; print CRLF
  504.     dec    de        ; restore DE
  505.     ret    
  506. cl$err:
  507.     ld    a,(fnf)        ; get file not found flag
  508.     cp    0        ; was the file found?
  509.     ret    z         ; if not - skip error messages
  510.     ld    hl,err        ; point to ERROR
  511.     call    epstr        ; print ERROR
  512.     ld    hl,clerr    ; point to error message
  513.     call    epstr        ; print error message
  514.     inc    de        ; point to FCB+1
  515.     call    pfn1        ; print filename
  516.     call    crlf        ; print CRLF
  517.     dec     de        ; restore DE
  518.     ret    
  519. fr$err:    
  520.     ld    hl,err        ; point to ERROR
  521.     call    epstr        ; print ERROR
  522.     ld    hl,frerr    ; point to error message
  523.     call    epstr        ; print error message
  524.     call    crlf        ; print CRLF
  525.     jp    exitèfnf$err:
  526.     ld    hl,0        ; flag for file not found
  527.     ld    (fnf),hl    ; set flag
  528.     ld    hl,err        ; point to ERROR
  529.     call    epstr        ; print ERROR
  530.     ld    hl,fnferr    ; point to error message
  531.     call    epstr        ; print error message
  532.     inc    de        ; point FCB+1
  533.     call    pfn1        ; print filename
  534.     call    crlf        ; print CRLF
  535.     dec     de        ; restore DE
  536.     jp         ext2    
  537. sc$err:
  538.     ld    a,(drop)    ; get number of terminals dropped
  539.     inc    a         ; increment number
  540.     ld    (drop),a    ; save in buffer
  541.     ld    a,0           ; put terminal 0 in A
  542.     ld    (tcode1),a    ; save in internal buffer
  543.     jp     errtn        ; get next name
  544. help0:
  545.     ld    hl,err        ; point to ERROR
  546.     call    epstr        ; print ERROR
  547.     ld    hl,hperr    ; point to error message
  548.     call    epstr        ; print error message
  549.     call    crlf        ; print CRLF
  550.     call    crlf        ; print CRLF 
  551.     jp     ext2        ; exit
  552. help:
  553.     ld    hl,hlpmsg
  554.     call    epstr        ; print follwoing message
  555.      jp    ext2        ; exit
  556. hlpmsg:
  557.     db    'PTCAP',ver+'0',vers+'0',' - Help File',cr,lf,lf
  558.     db    'Syntax:  PTCAP newfile [oldfile] [? or /]',cr,lf,lf
  559.     db    '         Where newfile = name of new TCAP file.',cr,lf
  560.     db    '               oldfile = name of old TCAP file. ',cr,lf,lf
  561.     db    '               If no filename is specified for the',cr,lf
  562.     db    '               OLD TCAP file, Z3TCAP is used.  The',cr,lf
  563.     db    '               default filetype for the TCAP files',cr,lf
  564.     db    '               is .TCP and is not specified on the',cr,lf
  565.     db    '               command line.',cr,lf,lf
  566.     db    '         PTCAP ? or / Prints this help file.',cr,lf
  567.     db    0
  568. signon:    
  569.     db    'PTCAP - PBBS TCAP Entry Modifier',cr,lf
  570.      if    version
  571.     db    'Version ',ver+'0','.',vers+'0'
  572.     db    ' - 05/16/87',cr,lf
  573.      endif
  574.      if    credits
  575.     db    'Written by Terry Pinto ',cr,lf
  576.       endif
  577.     db    cr,lf,0ètcapid:    db    'Loading Z3TCAP  ',0          
  578. tcver:  db    'Version ',0
  579. entry:    db    ' Terminals',cr,lf,tab,tab,0  
  580. pcmsg:    db    cr,'Processing Record #',0
  581. dpmsg:    db    'Terminals no longer supported: ',0      
  582. comp:    db    cr,lf,'Installation Complete... ',0
  583. ;
  584. ; Error messages
  585. ;
  586. foerr1:    db    'GET or PUT Attempt On Unopened File',0
  587. foerr2:    db    'Disk Full',0
  588. foerr3:    db    'Input File Not Found',0
  589. foerr4:    db    'Attempt to Read Past EOF',0
  590. foerr5:    db    'Directory Full',0
  591. foerr6:    db    'Error In Closing File',0
  592. foerr7:    db    'Attempt to Open File Already Opened',0
  593. rderr1:    db    'Read Past End Of File',0
  594. rderr2:    db    'Reading Unwritten Data',0
  595. rderr9:    db    'Unknown Error Occurred - ABORT!',0
  596. eoferr:    db    'Read Past End Of File',0
  597. frerr:    db    'Reading Unwritten Data',0
  598. operr:    db    'Unable to Open File -> ',0
  599. clerr:    db    'Unable to Close File -> ',0
  600. err:    db    cr,lf,bell,'ERROR - ',0
  601. fnferr:    db    'File Not Found -> ',0
  602. hperr:    db    'New TCAP File Not Specified',0
  603. ;
  604. ; Buffer space
  605. ;
  606. ; File control block for NEW TCAP file
  607. ;
  608. fcb1:    db    0        ; disk drive 0=default drive
  609. fcbn1:    db    '        '    ; filename filled by parse from input
  610. fcbt1:    db    'TCP'        ; default filetype
  611.     ds    24        ; balance of FCB filled by INITFCB
  612. ;
  613. ; File control block for OLD TCAP file. If you current TCAP
  614. ; has a different name, you should specify it on the command
  615. ; line. The specified name will be parsed into this FCB.
  616. ;
  617. fcb2:    db    0        ; disk drive 0=default drive
  618. fcbn2:    db    'Z3TCAP  '    ; default filename if none specified in input
  619. fcbt2:    db    'TCP'        ; default filetype
  620.     ds    24        ; balance of FCB filled by INITFCB
  621. ;
  622. ; File control block for PBBS User file
  623. ;
  624. fcb3:    db    0        ; disk drive 0=default drive
  625. fcbn3:    db    'USERS   '    ; filename
  626. fcbt3:    db    'PBS'        ; filetype
  627.     ds    24
  628. ;
  629. ; File control block for new PBBS User file
  630. ;
  631. fcb4:    db    0        ; disk drive 0=default drive
  632. fcbn4:    db    'USERS   '    ; filename
  633. fcbt4:    db    'NEW'        ; filetype
  634.     ds    24
  635. ;
  636. term1:    db    '                '
  637.     db    0
  638. term2:     db    '                '
  639.     db    0
  640. name:    db    '                              '
  641.     db    0èversn:    db    '    ',0           ; TCAP version number (terminated with 0)
  642. drop:    ds    1        ; number of terminals not supported
  643. rec:    db    0        ; record storage
  644. buf:    ds    2        ; buffer address
  645. fcb:    ds    2         ; selected fcb
  646. buffer:    ds    2        ; starting address for selected TCAP
  647. nlrec:    db    0        ; new logical record
  648. term:    db     0        ; terminator descriptor
  649. tcode1:    db    0             ; new terminal code
  650. tcode2:    db    0             ; old terminal code
  651. cnt:    ds    2        ; total entries in TCAP file
  652. fnf:    db    0        ; file not found flag  0=not found
  653. ;
  654. ; User file buffer
  655. ;
  656. usrec    equ    tbuf
  657. availf    equ        usrec        ; record availability  00=free record
  658. unamef    equ    availf+1    ; user name field
  659. citstf    equ    unamef+30    ; city and state
  660. pswrdf    equ    citstf+20    ; password
  661. phonef    equ    pswrdf+10    ; telephone
  662. tmsonf    equ    phonef+12    ; number of times on system
  663. lstonf    equ    tmsonf+2    ; date last on system
  664. acessf    equ    lstonf+3    ; access level
  665. mailf    equ    acessf+1    ; mail waiting flag
  666. intarf    equ    mailf+1         ; area to bump user to after signon
  667. nnullf    equ    intarf+1    ; number of nulls needed
  668. bdcdef    equ    nnullf+1    ; baudrate code (last signon)
  669. upldsf    equ    bdcdef+1    ; upload count
  670. dnldsf    equ    upldsf+2    ; download count
  671. usrmpf    equ    dnldsf+2    ; userarea map
  672. drvmpf    equ     usrmpf+2    ; drive map
  673. tcodef    equ    drvmpf+2    ; terminal identifier code  
  674. totmef    equ    tcodef+1    ; total time on-line on day basis
  675. himsgf    equ    totmef+1    ; highest message read folder-1
  676. ufaccf    equ    himsgf+2    ; mail folder access byte
  677. lengf    equ    ufaccf+2    ; terminal line length
  678. ;
  679. buf1    equ    ($/128)*128+128   
  680.     ds    2048
  681. buf2    equ    buf1+2048
  682.     ds    2048
  683. ;
  684.     ds    64
  685. system    dw    0
  686.     end
  687.