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 / CPM3 / TS312.ASM < prev    next >
Assembly Source File  |  2000-06-30  |  15KB  |  729 lines

  1. Title 'Time stamp   vers: 03.11  date: 10/11/83  time: 22:37:17'
  2.  
  3. ;************************
  4. ;            *
  5. ;    timestamp3    *
  6. ;            *
  7. ; version, date & time    *
  8. ;    stamp        *
  9. ;    for cp/m+        *
  10. ;            *
  11. ;************************
  12.  
  13. ;    by    dick lieber - Bridgeport RCP/M+ (Chicago) 312-326-4392
  14. ;    based on a program by Eric Forbes
  15. ;
  16. ;    version 3.12    fix leap year bug  rcl
  17. ;    version 3.11    fix wrong data for July & Nov in months table
  18. ;    version 3.1    don't abort if file not found so a new file
  19. ;            can be created with editor.
  20. ;
  21. ;    if assembled as a transient program
  22. ;
  23. ;    A>ts3 name.typ [o]
  24. ;
  25. ;    Will increment the minor version number & date/time stamp the file
  26. ;    name.typ if the strings:
  27. ;
  28. ;        "vers:"
  29. ;        "time:"
  30. ;        "date:"
  31. ;
  32. ;    are found in the first 128 bytes of the file.  Be sure
  33. ;    to allow enough blank space after each string for the 
  34. ;    information shown!
  35. ;
  36. ;    [o] is an option:
  37. ;
  38. ;        where o=N    to leave old version number
  39. ;              o=M    to increment major version number
  40. ;                and zero minor version number
  41. ;
  42. ;    if assembled as a patch and SIDed onto an editor
  43. ;    the same functions will take place automatically
  44. ;    before the actual edit:
  45. ;
  46. ;    A>edit name.typ [o]
  47. ;
  48. ;    an additional option is added with the patched version:
  49. ;
  50. ;    [z] will cause the timestamp patch to not modify the
  51. ;    file at all
  52. ;
  53. ;    To attach the patched version of timestamp:
  54. ;
  55. ;    A>mac ts3        <= assemble "patched" version
  56. ;    CP/M MACRO ASSEM 2.0
  57. ;    2B2E
  58. ;    024H USE FACTOR
  59. ;    END OF ASSEMBLY
  60.  
  61. ;    A>sid ws.com        <= load your editor
  62. ;    CP/M 3 SID - Version 3.0
  63. ;    NEXT MSZE  PC  END
  64. ;    2700 2700 0100 CEFF
  65. ;    #rts3.hex        <= load ts3 patch
  66. ;    NEXT MSZE  PC  END
  67. ;    2B2E 2B2E 0100 CEF    <= note the NEXT address
  68. ;    #wwsts.com,100,2b2e    <= save patched editpor
  69. ;    0055h record(s) written.
  70. ;    #^C
  71.  
  72. ;    Use and enjoy you new editor that automatically
  73. ;    updates version etc.
  74. ;
  75.  
  76. maclib    z80        ;as supplied with cp/m+
  77.  
  78. no:    equ    0
  79. yes:    equ    not no
  80.  
  81. patched: equ    yes     ;yes to attach to an editor
  82.             ;no to make transient command
  83.  
  84. opt$del: equ    '['    ;option delimiter
  85. recsiz:    equ    128        ;record length
  86. cr:    equ    0dh
  87. lf:    equ    0ah
  88. bell:    equ    7
  89.  
  90.  
  91.     if     patched    ;into an editor
  92. ;
  93. ;    these equates define interface of 
  94. ;    this program to the editor
  95. ;
  96. ;    values show are for Wordmaster
  97.  
  98. endasm:    equ    2700h    ;where this program will live
  99.  
  100. oldjmp:    equ    269h    ;used to restore the jump at the
  101.             ;start of the assembler
  102.  
  103. jmpadd:    equ    0100h    ;address of the JP (C3h) used to get
  104.             ;to this program
  105.  
  106. assemb:    equ    0100h    ;address to return to when finished
  107.             ;updating the file
  108. ;
  109. ;    this will patch the hook from the editor 
  110. ;    to this porgram.  it gets restored automatically
  111. ;    when when version info has been updated
  112. ;
  113.     org    jmpadd + 1
  114.     dw    endasm        ;patch hook to this program
  115.  
  116.     else
  117.  
  118. endasm    equ    100h    ;org if stand alone
  119. fcb    equ    5ch    ;work at default fcb cause
  120.             ;we don't care if it's altered
  121.     endif
  122.  
  123.     org    endasm        ;end of assembler or tpa
  124.  
  125. start:    lxi    d,crlf
  126.     mvi    c,prstr        ;new line
  127.     call    bdos
  128. ;
  129. ;    check version
  130. ;
  131.     mvi    c,getvers
  132.     call    bdos
  133.     lxi    d,bad$ver$mess
  134.     mov    a,h
  135.     cpi    1        ;check if mp/m
  136.     jrz    version$ok
  137.     mov    a,l
  138.     cpi    31h
  139.     jc    exit        ;below cp/m+
  140. version$ok:
  141.  
  142.     if     patched    ;into an editor
  143. ;
  144. ;    copy name to timestamp's fcb
  145. ;
  146.     lxi    h,5ch    ;default fcb set up by ccp
  147.     lxi    d,fcb
  148.     lxi    b,15    ;length of drive & name
  149.     ldir        ;move it
  150.     endif        ;patched
  151. ;
  152. ;    copy password to dma
  153. ;
  154.     lda    53h    ;get password length
  155.     ora    a    ;set flags
  156.     jrz    no$password
  157.     mov    c,a    ;get length of password
  158.     mvi    b,0
  159.     lhld    51h    ;get password address (source)
  160.     lxi    d,buff    ;(dest)
  161.     ldir        ;move password to dma
  162.             ;password must be in dma
  163.             ;on open call if file is
  164.             ;read protected
  165. no$password:
  166.     mvi    a,' '    ;no option
  167.     sta    option    
  168.     lda    80h    ;get command tail length
  169.     mov    c,a
  170.     mvi    b,0
  171.     lxi    h,81h    ;start of tail
  172.     dad    b    ;point to end of tail
  173.     mvi    a,opt$del
  174.     ccdr        ;search for delimeter
  175.     jpo    option$done
  176.     inx h! inx h    ;point to option byte
  177.     mov    a,m
  178.     sta    option
  179.     cpi    'N'        ;keep old version option
  180.     jrz    option$done
  181.     cpi    'M'        ;major version update option
  182.     jrz    option$done
  183.  
  184.     if    patched
  185.     cpi    'Z'        ;no change at all option
  186.     mvi    a,0        ;no abort
  187.     lxi    d,as$is$msg
  188.     jz    exit
  189.     endif    ;patched
  190.  
  191.     lxi    d,bad$opt$msg
  192.     mvi    a,0ffh        ;abort flag
  193.     jmp    exit
  194. option$done:
  195. ;
  196. ;    open file
  197. ;
  198.     lxi    d,buff
  199.     mvi    c,setdma
  200.     call    bdos
  201.     lxi    d,fcb
  202.     mvi    c,15
  203.     call    bdos
  204.     lxi    d,nofile    ;report if can't open and
  205.     inr    a
  206.     if     patched
  207.     mvi    a,0        ;reset abort flag
  208.     else
  209.     mvi    a,0ffh        ;set abort flag
  210.     endif
  211.     jz    exit
  212. ;
  213. ;    zero record number
  214. ;
  215.     lxi    h,fcb+33
  216.     mvi    b,2
  217. rn$loop:
  218.     mvi    m,0
  219.     dcr    b
  220.     inx    h
  221.     jrnz    rn$loop
  222.  
  223.     lxi    d,fcb
  224.     mvi    c,readran    ;read record 1st record (0)
  225.     call    bdos
  226.  
  227.     lxi    d,verstx
  228.     call    find        ;update version
  229.     lxi    d,novers
  230.     cnz    print
  231.     cz    versn
  232.  
  233.     lxi    d,datetx
  234.     call    find        ;update date
  235.     lxi    d,nodate
  236.     cnz    print
  237.     cz    date
  238.  
  239.     lxi    d,timetx
  240.     call    find        ;update time
  241.     lxi    d,notime
  242.     cnz    print
  243.     cz    time
  244. ;
  245. ;    write record back into file and exit to editor or CP/M
  246. ;
  247.     mvi    c,writeran    ;random write
  248.     lxi    d,fcb
  249.     call    bdos
  250.  
  251.     mvi    c,closef
  252.     lxi    d,fcb
  253.     call    bdos
  254.  
  255.     lxi    d,done$msg
  256.  
  257. exit:    call    print        ;print error message and exit.
  258.     ora    a        ;a=ff means abort after message
  259.     jnz    0        ;abort if error
  260.  
  261.     if     patched    ;into editor
  262. ;
  263. ;    Restore the editor to it's original condition and jump to it
  264. ;
  265.     lxi    h,oldjmp    ;restore value in hl
  266.     shld    jmpadd+1    ;restore old jump address
  267.     jmp    assemb        ;jump to the assembler
  268.  
  269.     else
  270.  
  271.     ret    ;to cp/m+
  272.  
  273.     endif    ;patched
  274. ;
  275. ;    print a string (de) and file name
  276. ;
  277. print:    push    psw
  278.     mvi    c,prstr
  279.     call    bdos
  280.     lxi    h,fcb+1
  281.     lxi    d,prtnam
  282.     lxi    b,11
  283.     ldir
  284.     lxi    d,prtfil
  285.     mvi    c,prstr
  286.     call    bdos
  287.     pop    psw
  288.     ret
  289. ;
  290. ;Increment the version number
  291. ;
  292. versn:    inx    h        ;hl --> units of major change
  293.     lda    option        ;is a major change requested
  294.     cpi    'M'
  295.     cz    twoinc        ;inc major change number
  296.     jrz    zeromn        ;zero minor change number
  297.     cpi    'N'        ;do not change version if
  298.     rz            ;'n' option given
  299.     inx    h
  300.     inx    h
  301.     inx    h        ;hl --> units of vers no.
  302.  
  303. twoinc:    push    psw        ;increment a 2 digit field
  304.     push    h
  305.     mvi    b,2
  306.     mvi    a,'9'+1        ;hl --> units position
  307. two1:    inr    m
  308.     cmp    m
  309.     jrnz    twox        ;exit if not > 9 ascii
  310.     mvi    m,'0'        ;else zero the units
  311.     dcx    h        ;and inc the tens
  312.     djnz    two1
  313. twox:    pop    h
  314.     pop    psw
  315.     ret
  316.  
  317. zeromn:    inx    h        ;zero minor version
  318.     inx    h
  319.     mvi    m,'0'    ;used when major changes
  320.     inx    h
  321.     mvi    m,'0'
  322.     ret
  323. ;
  324. ;    insert new date into buffer at hl
  325. ;
  326. date:
  327.     call    get$clock
  328.     push    h
  329.     lhld    datepb        ;get days since 1/1/78
  330.     call    cnvday        ;convert to month,day, year
  331.     pop    h
  332.     lda    months
  333.     call    putbcd
  334.  
  335.     mvi    m,'/'
  336.     inx    h
  337.  
  338.     lda    days
  339.     call    putbcd
  340.  
  341.     mvi    m,'/'
  342.     inx    h
  343.  
  344.     lda    years
  345.     call    putbcd
  346.     ret
  347. ;
  348. ;    convert bcd in a to two ascii charcters at hl
  349. ;
  350. putbcd:
  351.     push    psw
  352.     rrc ! rrc ! rrc ! rrc    ;get high nibble
  353.     call    putnib
  354.     pop    psw
  355.     call    putnib
  356.     ret
  357. ;
  358. ;    make ascii & put into buffer
  359. ;
  360. putnib:    ani    0fh
  361.     ori    '0'
  362.     mov    m,a
  363.     inx    h        ;next buffer location
  364.     ret
  365. ;
  366. ;    insert time into buffer at hl
  367. ;
  368. time:
  369.     call    get$clock
  370.     lxi    d,datepb+2    ;point to seconds byte
  371.     sta    datepb+4    ;put seconds in date parm block
  372.     mvi    b,2
  373. time1:    ldax    d
  374.     inx    d
  375.     call    putbcd        ;insert hh:mm:
  376.     mvi    m,':'
  377.     inx    h
  378.     djnz    time1
  379.     ldax    d
  380.     call    putbcd        ;insert seconds
  381.     ret
  382. ;
  383. ;    get time from cp/m+
  384. ;
  385. get$clock:
  386.     push    h
  387. ;
  388. ;    this bios call is needed because the bdos rdtime
  389. ;    function doesn't call bios to update the clock data
  390. ;    in the scb
  391. ;
  392.     mvi    c,drbios    ;direct bios call
  393.     lxi    d,biospb    ;read time function
  394.     call    bdos
  395.     mvi    c,rdtime    ;get date/time
  396.     lxi    d,datepb    ;where to put date
  397.     call    bdos
  398.     pop    h
  399.     ret
  400.  
  401. biospb:    db    26    ;time function
  402.     db    0    ;value for A 
  403.  
  404. ;
  405. ;    find the first character of string in de (V, D or T)
  406. ;
  407. find:    lxi    h,buff        ;de = compare string
  408.     lxi    b,recsiz    ;limit search to 1 rec
  409. trynxt:    ldax    d        ;get 1st char to find
  410.     ccir
  411.     rpo            ;ret nz set = not found
  412. ;
  413. ;    see if the rest of the string compares equal. Retry
  414. ;    until we get to the end of the buffer
  415. ;
  416.     push    b
  417.     push    d
  418.     mvi    b,5        ;compare next 5 chars
  419. find2:    inx    d
  420.     ldax    d
  421.     cmp    m
  422.     jrnz    tryagn        ;try for another string
  423.     inx    h
  424.     djnz    find2        ;keep comparing til b = 0
  425.     pop    d
  426.     pop    b
  427.     ret            ;ret with z set
  428.  
  429. tryagn:    pop    d        ;Found the 1st character, but
  430.     pop    b        ;there was a bad compare in
  431.     jr    trynxt        ;the next 6 characters.
  432.  
  433. ;************************************************
  434. ;                        *
  435. ;    cnvdate                    *
  436. ;                        *
  437. ;    routine to convert cp/m or mp/m date     *
  438. ;    from days since 1/1/78 to month, day &    *
  439. ;    year.                    *
  440. ;                        *
  441. ;                        *
  442. ;************************************************
  443. ;
  444. ;
  445. year    equ    365    ;leap year gets adjusted for
  446. ;
  447. ;    count up until goal days exceeded
  448. ;
  449. cnvday:
  450.     shld    goaldays    ;save as goal to reach
  451.     mvi    a,1        ;initial values
  452.     sta    days
  453.     sta    months        ;month counter (jan is one)
  454.  
  455.     lxi    h,0
  456.     shld    dayscnt        ;start at zero
  457.     lxi    d,year        ;one year of days
  458.     
  459.     mvi    a,78h        ;the first year (bcd)
  460.     sta    years        ;save year value
  461. ;
  462. ;    it's much eaiser to detect leap years in binary
  463. ;
  464.     mvi    a,78        ;1st year (binary)
  465.     sta    years$bin    ;for leap year determination
  466. yearloop:
  467.     lhld    dayscnt
  468.     dad    d        ;trial add one year of days
  469.     call    ckleap
  470.     jrnz    no$leap
  471.     inx    h        ;was a leap year
  472. no$leap:
  473.     call    ckgoal
  474.     jnc    yeardone    ;year over flowed
  475.     lda    years
  476.     cmc            ;daa screws up if carry is set
  477.     inr    a        ;add one to the year count
  478.     daa            ;make bcd
  479.     sta    years        ;save years
  480.     jz    done        ;exact match
  481.     shld    dayscnt        ;year was ok to add
  482.     lxi    h,years$bin
  483.     inr    m
  484.     jr    yearloop
  485. ;    
  486. yeardone:
  487. ;
  488. ;    see if this is a leap year and adjust Feb if required
  489. ;
  490.     call    ckleap
  491.     lxi    h,feb        ;point to feburary
  492.     mvi    m,28
  493.     jrnz    not$leap    ;no, don't adjust feb
  494.     inr    m        ;make 29
  495. not$leap:
  496.     lxi    d,montbl    ;point to month table
  497. monthloop:
  498.     lhld    dayscnt
  499.     ldax    d        ;get month
  500.     mov    c,a
  501.     mvi    b,0
  502.     dad    b
  503.     call    ckgoal
  504.     jnc    monthdone
  505.     push    psw
  506.     cmc
  507.     lda    months
  508.     inr    a        ;count to next month
  509.     daa
  510.     sta    months
  511.     pop    psw
  512.     jrz    done        ;exact (on the first of the month)
  513.     shld    dayscnt
  514.     inx    d        ;point to next month
  515.     jr    monthloop
  516. monthdone:
  517. ;
  518. ;    continue counting until day of month attained
  519. ;
  520.     lhld    dayscnt
  521. daysloop:
  522.     inx    h        ;add one day
  523.     call    ckgoal
  524.     jnc    done
  525.     cmc            ;zero carry bit so daa is screwed up
  526.     lda    days
  527.     inr    a
  528.     daa
  529.     sta    days
  530.     jr    daysloop
  531. done:    ret            ;leave module
  532.  
  533.     
  534. ;
  535. ;    compare count (in hl) with goal
  536. ;    C if count < goal
  537. ;    Z if count = goal
  538. ;
  539. ckgoal:    push    d
  540.     lded    goaldays
  541.     mov    a,h
  542.     cmp    d
  543.     jrnz    ckend
  544.     mov    a,l
  545.     cmp    e
  546. ckend:    pop    d
  547.     ret
  548. ;
  549. ;    check for leap year
  550. ;    return z if leap year
  551. ;
  552. ckleap:
  553.     lda    years$bin    ;get years
  554.     ani    03h
  555.     ret
  556.  
  557. montbl:
  558.     db    31    ;jan
  559. feb:    db    28    ;feb
  560.     db    31    ;mar
  561.     db    30    ;apr
  562.     db    31    ;may
  563.     db    30    ;jun
  564.     db    31    ;jul
  565.     db    31    ;aug
  566.     db    30    ;sep
  567.     db    31    ;oct
  568.     db    30    ;nov
  569.     db    31    ;dec
  570. ;    dseg
  571. ;
  572. ;    these values are the output of this module
  573. ;
  574. days:      ds    1    ;counts days in month (bcd)
  575. months:      ds    1    ;counts months in year (bcd)
  576. years:    ds    1    ;counts years (starts at 78) (bcd)
  577. ;
  578. ;    cnvdays ram area
  579. ;
  580. years$bin: ds    1    ;years in binary (for leap year calc)
  581.  
  582. dayscnt:  ds    2    ;counts days
  583. goaldays: ds    2    ;days since 1/1/78
  584.  
  585. done$msg:
  586.     db    'Version Update$'
  587.  
  588. nofile:    db    'File not found$'
  589.  
  590. novers:    db    'No '
  591. verstx:    db    'vers: '
  592.     db    'in$'
  593.  
  594. nodate:    db    'No '
  595. datetx:    db    'date: '    
  596.     db    'in$'
  597.  
  598. notime:    db    'No ' 
  599. timetx:    db    'time: '    
  600.     db    'in$'
  601.  
  602. crlf:    db    cr,lf,'$'
  603.  
  604.  
  605.     if     patched        ;transient version uses def fcb
  606. fcb:    db    0
  607.     rept    35
  608.     db    0
  609.     endm
  610.     endif
  611.  
  612. option:    ds    1        ;saved option byte
  613. buff:    rept    recsiz        ;fill with blanks so password
  614.     db    ' '        ;is set in blanks
  615.     endm
  616.  
  617. prtfil:    db    ' File:- '
  618. prtnam:    db    '           ',cr,lf,lf,'$'
  619. datepb: ds    5        ;date parameter block
  620.  
  621. bad$ver$mess:
  622.     db    'Requires CP/M version 3', cr, lf, '$'
  623. bad$opt$msg:
  624.     db    'Bad timestamp option.',cr,lf
  625.     db    'Options are:',cr,lf
  626.     db    9,'[N] for no version update.',cr,lf
  627.     db    9,'[M] to increment major version.',cr,lf
  628.     if    patched
  629.     db    9,'[Z] to not alter version or timestamping',cr,lf
  630.     endif
  631.     db    '$'
  632.     if    patched
  633. as$is$msg:
  634.     db    'Version & time unchanged.',cr,lf,'$'
  635.     endif
  636. ;
  637. ;    bdos functions  (cp/m 3.0)
  638. ;
  639. bdos    equ    5
  640. sysrst    equ    0    ;warmstart
  641. rdcon    equ    1    ;wait for & read console character
  642. wrcon    equ    2    ;write to console
  643. rdaux    equ    3    ;wait for & read aux
  644. wraux    equ    4    ;write to aux
  645. list    equ    5    ;write to list device
  646. drcon    equ    6    ;direct console i/o character or
  647. ;                        ff=read
  648. ;                        fe=status only
  649. ;                        fd=wait for input    
  650. auxinst    equ    7    ;aux in status
  651. auxotst    equ    8    ;aux out status
  652. prstr    equ    9    ;de=string
  653. rdbuff    equ    10    ;de=buffer   max, count, c1,c2,... 
  654. const    equ    11    ;console in status
  655. getvers    equ    12    ;return version in HL
  656. dskrst    equ    13    ;reset disk system
  657. seldsk    equ    14    ;select disk 0=a:
  658. openf    equ    15    ;open file de=fcb
  659. closef    equ    16    ;close file
  660. searchf    equ    17    ;search for first occurance
  661. searchn    equ    18    ;find next occurance
  662. delete    equ    19    ;delete file
  663. read    equ    20    ;read sequential
  664. write    equ    21    ;write sequential
  665. make    equ    22    ;make file
  666. rename    equ    23    ;rename file new name at fcb+16
  667. loginv    equ    24    ;return login vector in hl
  668. curdsk    equ    25    ;return current disk in a
  669. setdma    equ    26    ;set new dma
  670. getalv    equ    27    ;get allocation vector address
  671. wrtprt    equ    28    ;write protect current disk
  672. rovec    equ    29    ;get r/o vector in hl
  673. setflag    equ    30    ;set file attributes
  674. getdpb    equ    31    ;return dpb address
  675. user    equ    32    ;get/set user ff=get
  676. readran    equ    33    ;read random record
  677. writeran equ    34    ;write random record
  678. flsize    equ    35    ;compute file size
  679. setran    equ    36    ;set random record from last sequential read
  680. rstdrv    equ    37    ;reset drive
  681. accdrv    equ    38    ;mpm only - access drive
  682. freedrv equ    39    ;mpm only - free drive
  683. wrran0    equ    40    ;fill a random record with 0
  684. tstwrt    equ    41    ;mpm only - test and write
  685. lock    equ    42    ;mpm only - lock record
  686. unlock    equ    43    ;mpm only - unlock record    
  687. multi    equ    44    ;set multi sector count
  688. errmd    equ    45    ;set bdos error mode
  689. freesp    equ    46    ;return free space in 1st 3 bytes of dma
  690. chain    equ    47    ;chain to pgm name in def buff (80h)
  691. flush    equ    48    ;flush buffers
  692. scb    equ    49    ;get set scb de=.scb pb   db offset
  693. ;                          db ffh set byte
  694. ;                             feh set word
  695. ;                             00h get
  696. ;                            dw value
  697. drbios    equ    50    ;direct bios call de=.bios pb  db bios func #
  698. ;                               db = A
  699. ;                               dw =BC
  700. ;                               dw =DE
  701. ;                               dw =HL
  702. ldovl    equ    59    ;load overlay
  703. calrsx    equ    60    ;call rsx  de=.rsx pb    db rsx func #
  704. ;                        db # of word parameters
  705. ;                        dw p1
  706. ;                        dw p2
  707. frblks    equ    98    ;free temporary blocks
  708. trunf    equ    99    ;truncate file
  709. setdirl    equ    100    ;set driectory label
  710. dirl    equ    101    ;return directory label data e=drive
  711. rdstamp    equ    102    ;read file stamps & password mode
  712. wrxfcb    equ    103
  713. setdate    equ    104
  714. rdtime    equ    105
  715. defpwd    equ    106    ;set def password
  716. retsn    equ    107    ;return serial number address
  717. retcode    equ    108    ;get/set return code
  718. conmode    equ    109    ;get/set console mode
  719. delim    equ    110    ;get/set string output delimiter
  720. prtblk    equ    111    ;print block  de = ccb    dw=address
  721. ;                        dw=length
  722. lstblk    equ    112    ;list block
  723. parse    equ    152    ;parse file name   de=pfcb   dw=input addr
  724. ;                             dw=fcb addr
  725.     end
  726.  
  727. length
  728. lstblk    equ    112    ;list block
  729. parse    equ    152    ;parse file name   de=pfcb   dw=input a