home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d183 / fixfd.lha / FixFd / FixFd.asm < prev    next >
Assembly Source File  |  1989-02-26  |  15KB  |  724 lines

  1. ; file:FixFD.asm
  2. ;-----------------------------
  3. ;          Fix FD
  4. ;-----------------------------
  5. ; A utility to convert FD files to EQU files.
  6. ;
  7. ; Copyright (c) 1988 by Peter Wyspianski
  8. ;
  9. ; Revision History
  10. ; ----------------
  11. ; 30 Dec 88  created
  12. ; 01 Jan 89  changed to use the 'dos_lib.i' file
  13.  
  14. ;----------------------------------------
  15. ; Constants
  16.  
  17. null    equ     $00
  18. bs    equ    $08
  19. tab    equ    $09
  20. lf    equ     $0a ; amiga eoln
  21. cr    equ     $0d ; CR only
  22. esc    equ    $1b
  23. csi    equ    $9b ; control sequence introducer
  24.  
  25. ; DOS Constants:
  26.  
  27. MODE_OLDFILE    equ 1005
  28. MODE_NEWFILE    equ 1006
  29.  
  30. SIGBREAKB_CTRL_C    EQU    $0C
  31. SIGBREAKB_CTRL_D    EQU    $0D
  32. SIGBREAKB_CTRL_E    EQU    $0E
  33. SIGBREAKB_CTRL_F    EQU    $0F
  34.  
  35. SIGBREAKF_CTRL_C    EQU    $1000
  36. SIGBREAKF_CTRL_D    EQU    $2000
  37. SIGBREAKF_CTRL_E    EQU    $4000
  38. SIGBREAKF_CTRL_F    EQU    $8000
  39.  
  40. ;**SIGBREAK_ANY        equ    $F000
  41. SIGBREAK_ANY        equ    $1000
  42.  
  43. ; Exec Base Offsets:
  44.  
  45. ThisTask    EQU    $114
  46.  
  47. ; Task Control Structure Offsets:
  48.  
  49. TC_SIGRECVD    EQU    $1A
  50. TC_SIGALLOC    EQU    $12
  51.  
  52. ;----------------------------------------
  53. ; Includes
  54.  
  55.     MACFILE "RAM:Std_Macs68k"
  56.     INCLUDE "RAM:dos_lib.i"
  57.  
  58. ;----------------------------------------
  59. ; Publics
  60.  
  61.     XDEF    _main
  62.     XDEF    Exit
  63.     
  64. ;----------------------------------------
  65. ; Externals:
  66.  
  67. ; from std.startup:
  68.  
  69.     XREF    _exit
  70.     XREF    _stdin,_stdout,_SysBase,_DOSBase
  71.  
  72. ;----------------------------------------
  73. ; The beginning
  74.  
  75.     SECTION Main,CODE
  76.  
  77. ; just a little something to brighten some file-zapper's day:
  78.  
  79.     dc.b    'Be Happy!',null
  80.     cnop    0,2
  81.  
  82. ;-------------------------------
  83. ; BCD_Left  [18 Nov 88]
  84. ;
  85. ; - converts hex word to a string of one to five left justified BCD digits
  86. ; - string is null terminated
  87. ;
  88. ; Inputs :  d0.w = hex word
  89. ;           a0.l = starting address of string
  90. ; Outputs:  all regs preserved
  91. ;
  92. ; Notes  :  - from 1 to five digits can be returned plus the zero termination
  93. ;             for a total of up to six characters
  94. ;           - starts by determining number of digits in the string
  95.  
  96. BCD_Left
  97.  
  98.     pushm    d0-d3/a0-a1
  99.     
  100.     move.w    #3,d2        ; # digits - 2
  101.     lea    LBCDTAB,a1    ; point to ten thousands
  102.  
  103. 1$    cmp.w    (a1)+,d0    ; determine number of digits in result
  104.     bcc.s    2$        ; (ubge) taken if right size
  105.     dbra    d2,1$        ; taken for 10K through 10
  106.     bra.s    6$        ; we have just a ones digit
  107.  
  108. 2$    subq.l    #2,a1        ; compensate for following pre-decrement
  109.  
  110. 3$    move.w    (a1)+,d1    ; d1=BCD digit weight
  111.     move.b    #'0',d3        ; init digit to ASCII '0'
  112. 4$    cmp.w    d1,d0        ; digit weight ? remainder
  113.     blt    5$        ; taken if done with this digit
  114.     addq.b    #1,d3        ; inc BCD digit result
  115.     sub.w    d1,d0        ; decrement total
  116.     bnz.s    4$        ; go for more
  117. 5$    move.b    d3,(a0)+    ; stash digit
  118.     dbra    d2,3$        ; next digit position
  119. 6$    or.b    #'0',d0        ; form ones digit
  120.     move.b    d0,(a0)+
  121.     clr.b    (a0)        ; form zero terminator
  122.  
  123.     pullm    d0-d3/a0-a1
  124.     rts
  125.  
  126. LBCDTAB    dc.w    10000,1000,100,10
  127.  
  128. ;----------------------------------------
  129. ; GetDec  [30 Dec 88]
  130. ;
  131. ; - converts a decimal string to a hex value
  132. ;
  133. ; Inputs : a0 = ^ string
  134. ; Outputs: d0.l = value
  135. ;
  136. ; Reg Use: d1,a0-a1
  137. ;
  138. ; Calls  : none
  139. ; Uses   : none
  140. ;
  141. ; Notes  : - Non-numeric input produces garbage (GIGO applies).
  142. ;       - Excessively long strings cause wrap-around.
  143.  
  144. GetDec:
  145.  
  146.     clr.l    d0        ; result
  147. 1$    move.b    (a0)+,d1    ; fetch next digit
  148.     bz.s    2$        ; if 'digit' is a null then all done
  149.  
  150. ; here the running result is multiplied by ten:
  151.  
  152.     asl.l    #1,d0        ; x2
  153.     move.l    d0,a1        ; save the x2 value (a1 = scratch)
  154.     asl.l    #2,d0        ; x4 x8
  155.     add.l    a1,d0        ; x8 + x2 = x10
  156.     
  157. ; the latest 'units' digit is added to the result:
  158.  
  159.     sub.b    #'0',d1        ; force digit to range 0-9
  160.     add.l    d1,d0        ; splice into result
  161.     bra.s    1$        ; and go for more!
  162.  
  163. 2$    rts
  164.  
  165. ;----------------------------------------
  166. ; PrStr   [31 Dec 88] _stdout
  167. ; FPrStr  [31 Dec 88] a file
  168. ;
  169. ; - sends a null terminated string to a file (_stdout)
  170. ;
  171. ; Inputs : a0 = ^string
  172. ;       a1 = file handle (FPrStr only)
  173. ;
  174. ; Outputs: none
  175. ;
  176. ; Calls  : Write    (DOS.Library)
  177. ; Uses   : _DOSBase (library base)
  178. ;       _stdout
  179. ;
  180. ; Notes  : exits via the call to Write
  181.  
  182. PrStr:
  183.     move.l    _stdout,a1
  184. FPrStr:
  185.     push.l    a1    ; save file handle
  186.  
  187.     move.l    a0,a1    ; find the string length
  188. 1$    tst.b    (a1)+
  189.     bnz.s    1$    ; loop until end of string
  190.     sub.l    a0,a1    ; start-end+1 = len+1
  191.     sub.l    #1,a1    ; fix the length
  192.  
  193.     pull.l    d1    ; recover file handle
  194.     move.l    a0,d2    ; ^buffer
  195.     move.l    a1,d3    ; length
  196.     move.l    _DOSBase,a6
  197.     jmp    _LVOWrite(a6)    ; exit via this routine
  198.  
  199. ;----------------------------------------
  200. ; ReadLn   [31 Dec 88] from _stdin
  201. ; FReadLn  [31 Dec 88] from a file
  202. ;
  203. ; - reads a line from a file (_stdin)
  204. ; - terminator (lf) is NOT stored
  205. ; - string is returned null-terminated
  206. ;
  207. ; Inputs : a0 = ^string buffer
  208. ;       a1 = file handle (FReadLn only)
  209. ;
  210. ; Outputs: d0 = result: 1 = ok, 0 = eof, -1 = error
  211. ;
  212. ; Reg Use: d0-d3/a0-a2
  213. ;
  214. ; Calls  : Read    (DOS.Library)
  215. ; Uses   : _DOSBase (library base)
  216.  
  217. ReadLn:
  218.     move.l    _stdin,a1
  219.  
  220. FReadLn:
  221.  
  222.     move.l    a0,a2        ; keep ^buffer safe
  223.     move.l    a1,a3        ; keep file handle safe
  224.     
  225. 1$    move.l    a3,d1        ; file handle
  226.     move.l    a2,d2        ; ^buffer
  227.     move.l    #1,d3        ; read one char
  228.     CallDOS    Read
  229.     cmp.l    #1,d0        ; what was returned?
  230.     bne.s    2$        ; exit if error or eof
  231.     
  232.     move.b    (a2)+,d1    ; fetch character and bump ^buffer
  233.     cmp.b    #lf,d1        ; end of line?
  234.     bne.s    1$        ; taken if not
  235.  
  236. 2$    move.b    #null,-1(a2)    ; null terminate the string
  237.     rts            ; and exit
  238.  
  239. ;----------------------------------------
  240. ; FileOpenError  [31 Dec 88]
  241. ;
  242. ; - calls IoErr to get a specific error number for a failed file open.
  243. ; - prints an error message of the form:
  244. ;
  245. ;   Error #xxx opening file "yyyy".
  246. ;
  247. ;
  248. ; Inputs : a0 = ^filename
  249. ; Outputs: none
  250. ;
  251. ; Reg Use: d0-d1/a0-a1
  252. ;
  253. ; Calls  : IoErr    (DOS.Library)
  254. ;       BCD_Left
  255. ;       PrStr
  256. ; Uses   : _DOSBase (library base)
  257. ;       BCDBuff
  258.  
  259. FileOpenError:
  260.  
  261.     push.l    a0        ; save ^file name
  262.  
  263.     CallDOS    IoErr        ; must do this FIRST
  264.     push.w    d0        ; save the bad news
  265.  
  266.     lea    BadOpenMsg,a0
  267.     jsr    PrStr
  268.  
  269.     pull.w    d0        ; recover error number
  270.     lea    BCDBuff,a0
  271.     jsr    BCD_Left
  272.     
  273.     lea    BCDBuff,a0
  274.     jsr    PrStr        ; show the number
  275.     
  276.     lea    BadOpenMsg1,a0    ; second half of error message
  277.     jsr    PrStr
  278.     
  279.     pull.l    a0        ; fetch ^file name
  280.     jsr    PrStr
  281.     
  282.     lea    BadOpenMsg2,a0    ; third half of error message
  283.     jsr    PrStr
  284.     
  285.     rts
  286.  
  287. *----------------------------------------
  288. * Main  [30 Dec 88]
  289. *
  290. * here is a picture of the entry stack:
  291. *
  292. *   12  ---        not ours!
  293. *    8  ^argvArray pointer to argvArray
  294. *    4  argc       argument count
  295. * sp 0  RA     our return address
  296.  
  297. _main:
  298.     clr.l    TheError    ; default good return
  299.     
  300.     move.l  sp,savesp    ; to ensure that we clean up on exit
  301.     pull.l    ReturnAddr    ; just in case we need it...
  302.  
  303. ; make a pointer to our TC_SIGRECVD:
  304.  
  305.     move.l    _SysBase,a0    ; base of the Exec library
  306.     move.l    ThisTask(a0),a0    ; ^Task Control Structure (that's us!)
  307.     lea    TC_SIGRECVD(a0),a0 ; ^the flags
  308.     move.l    a0,TaskSigs    ; save the pointer for later
  309.  
  310. ; and we're off:
  311.  
  312.     lea    GreetMsg,a0    ; say hello
  313.     jsr    PrStr
  314.  
  315.     pull.l    argc        ; argc (argument count)
  316.     pull.l    argv        ; ^argv (argument array)
  317.     
  318.     move.l    argc,d0        ; argv format: <name> <source> <dest>
  319.     cmp.l    #3,d0        ; we need three arguments...
  320.     blt.l    Help        ; ...taken if 'confused user' error!
  321.  
  322.     move.l    argv,a0        ; fetch ^argv
  323.     move.l    4(a0),a0    ; point to first argument
  324.     move.l    a0,SName    ; save ^source file name
  325.  
  326.     move.l    argv,a0        ; fetch ^argv
  327.     move.l    8(a0),a0    ; point to second argument
  328.     move.l    a0,DName    ; save ^dest file name
  329.  
  330. ; open the input file:
  331.  
  332.     move.l    SName,d1
  333.     move.l    #MODE_OLDFILE,d2    ; must already exist
  334.     CallDOS    Open
  335.  
  336.     move.l    d0,sfile    ; save source file handle
  337.     bnz.s    1$        ; taken if ok
  338.  
  339. ; handle problems opening the input file:
  340.  
  341.     move.l    SName,a0
  342.     jsr    FileOpenError
  343.     move.l    #30,TheError
  344.     bra.l    Exit            ; bye!
  345.  
  346. ; open the output file:
  347.  
  348. 1$    move.l    DName,d1
  349.     move.l    #MODE_NEWFILE,d2
  350.     CallDOS    Open
  351.  
  352.     move.l    d0,dfile    ; save dest file handle
  353.     bnz.s    ScanFD        ; taken if ok
  354.  
  355. ; handle problems opening the output file:
  356.  
  357.     move.l    DName,a0
  358.     jsr    FileOpenError
  359.     move.l    #30,TheError
  360.     bra.l    Exit2
  361.     
  362. ; read lines of the input file until EOF is true:
  363.  
  364. ScanFD:
  365.  
  366. ; If the output file is acutally the tube then we don't want
  367. ; line numbers cluttering the display:
  368.  
  369.     move.l    dfile,d1    ; output file handle
  370.     CallDOS    IsInteractive
  371.     move.b    d0,TubeOut    ; -1 = yeah, 0 = nope
  372.     
  373.     lea    HeaderMsg,a0
  374.     move.l    dfile,a1    ; output file handle
  375.     jsr    FPrStr
  376.  
  377.     move.l    DName,a0
  378.     move.l    dfile,a1    ; output file handle
  379.     jsr    FPrStr
  380.     
  381.     lea    HeaderMsg1,a0
  382.     move.l    dfile,a1    ; output file handle
  383.     jsr    FPrStr
  384.  
  385.     tst.b    TubeOut        ; skip screen formatting if outfile...
  386.     bnz.s    1$        ; ... is connected to the tube.
  387.     
  388.     lea    StatusMsg,a0
  389.     jsr    PrStr
  390.  
  391.     lea    CursorOff,a0
  392.     jsr    PrStr
  393.  
  394. 1$    move.w    line,d0        ; bump line number
  395.     add.w    #1,d0
  396.     move.w    d0,line
  397.  
  398.     tst.b    TubeOut        ; gonna use the tube?
  399.     bnz.s    8$        ; taken if not (being used by out file)
  400.  
  401.     lea    BCDBuff,a0    ; convert line number to a dec string
  402.     jsr    BCD_Left
  403.  
  404.     lea    BCDBuff,a0    ; show the line number
  405.     jsr    PrStr
  406.  
  407. ; This gets REAL fancy by adding one 'bs' to StrBuff for every
  408. ; non-null char in BCDBuff:
  409.  
  410.     lea    BCDBuff,a0
  411.     lea    StrBuff,a1
  412.     
  413. 2$    move.b    #bs,(a1)+    ; put one in there
  414.     tst.b    (a0)+        ; check for a null
  415.     bnz.s    2$        ; taken if not
  416.     
  417.     move.b    #null,-1(a1)    ; kill the last bs and null terminate
  418.  
  419.     lea    StrBuff,a0    ; backup
  420.     jsr    PrStr
  421.  
  422. 8$    move.l    TaskSigs,a0    ; see if the user hit ctrl-c thru ctrl-f
  423.     move.l    (a0),d0        ; d0 = SigsRecvd
  424.     and.l    #SIGBREAK_ANY,d0    ; mask all but ours
  425.     bnz.l    Abort        ; taken if we hit
  426.  
  427.     lea    StrBuff,a0    ; fetch a line from the input file
  428.     move.l    sfile,a1
  429.     jsr    FReadLn    
  430.  
  431.     tst.l    d0        ; see what's up!
  432.     
  433.     bz.l    Exit0        ; taken if EOF
  434.     bmi.l    Exit0        ; taken if error
  435.  
  436. ;----------------------------------------
  437. ; determine what sort of line it is here:
  438. ;
  439. ;         # = option (process further)
  440. ; A-Z,a-z,'_','.' = FD entry (strip)
  441. ;
  442. ; all others are ignored ('*',';', and anything else)
  443.  
  444.     move.b    StrBuff,d0    ; fetch first char
  445.     
  446.     cmp.b    #'#',d0        ; option?
  447.     beq    6$        ; taken if so
  448.     
  449.     cmp.b    #'.',d0        ; fd entry?
  450.     beq.s    3$        ; taken if so
  451.     
  452.     cmp.b    #'_',d0        ; fd entry?
  453.     beq.s    3$        ; taken if so
  454.     
  455.     cmp.b    #'A',d0        ; fd entry?
  456.     blt.l    1$        ; taken if NOT (ignore)
  457.     
  458.     or.b    #$20,d0        ; force to lowercase
  459.     cmp.b    #'z',d0        ; fd entry?
  460.     bgt.l    1$        ; taken if NOT (ignore)
  461.  
  462. ;---------------------------------------------------------------
  463. ; strip the line (scan for a space, open paren, or end of line)
  464. ; there are NO blank lines here (eliminated above):
  465. ;
  466.  
  467. 3$    lea    LVOMsg,a0    ; prefix the routine name with '_LVO'
  468.     move.l    dfile,a1
  469.     jsr    FPrStr
  470.     
  471.     lea    StrBuff,a0
  472. 5$    move.b    (a0)+,d0    ; fetch a char and bump pointer
  473.     bz.s    4$        ; taken if end of line
  474.     cmp.b    #' ',d0        ; space?
  475.     beq.s    4$        ; taken if so
  476.     cmp.b    #'(',d0        ; open paren?
  477.     bne.s    5$        ; taken if so
  478.  
  479. 4$    move.b    #null,-1(a0)    ; null-terminate right AT the 1st excess char
  480.  
  481.     pea    -1(a0)        ; save ^end of string (for later)
  482.     
  483.     lea    StrBuff,a0    ; show the line
  484.     move.l    dfile,a1    ; output file handle
  485.     jsr    FPrStr
  486.     
  487.     lea    StrBuff,a0
  488.     pull.l    d0        ; fetch ^end of string
  489. ;***    sub.l    a0,d0        ; d0 = string len
  490. ;***    lea    EQU8Msg,a0    ; <tab> <tab> equ <tab>-
  491. ;***    cmp.l    #8,d0        ; seven chars or less?
  492. ;***    blt.s    44$        ; taken if so (output extra tab)
  493.  
  494.     lea    EQUMsg,a0    ; <tab> equ <tab>-
  495. 44$    move.l    dfile,a1    ; output file handle
  496.     jsr    FPrStr
  497.     
  498.     move.w    bias,d0        ; convert the bias to a decimal string
  499.     lea    BCDBuff,a0
  500.     jsr    BCD_Left
  501.     
  502.     lea    BCDBuff,a0
  503.     move.l    dfile,a1    ; output file handle
  504.     jsr    FPrStr        ; show the bias
  505.  
  506.     lea    EQUMsg1,a0    ; finish the line off
  507.     move.l    dfile,a1    ; output file handle
  508.     jsr    FPrStr
  509.  
  510.     move.w    #6,d0        ; bump bias
  511.     add.w    d0,bias
  512.  
  513.     bra.l    1$        ; and go again!
  514.  
  515. ;----------------------------------------
  516. ; check for the '##bias' option:
  517.  
  518. 6$    move.l    StrBuff+2,d0    ; fetch 4 chars (should be 'bias')
  519.     or.l    #$20202020,d0    ; force to lowercase
  520.     cmp.l    #'bias',d0
  521.     bne.l    1$        ; ignore if not the option
  522.  
  523. ; scan for a space:
  524.  
  525.     lea    StrBuff+6,a0    ; skip the '##bias'
  526.  
  527. 7$    move.b    (a0)+,d0    ; fetch a char and bump pointer
  528.     bz.l    1$        ; taken if end of line (ignore)
  529.     cmp.b    #' ',d0        ; space?
  530.     bne.s    7$        ; taken if not
  531.  
  532. ; fetch and show the bias:
  533.  
  534.     jsr    GetDec        ; a0 should be pointing at the number
  535.     move.w    d0,bias        ; save it
  536.     
  537. ; show the 'bias = ' message:
  538.  
  539.     lea    BiasMsg,a0
  540.     move.l    dfile,a1    ; output file handle
  541.     jsr    FPrStr
  542.  
  543.     move.w    bias,d0        ; convert the bias to a decimal string
  544.     lea    BCDBuff,a0
  545.     jsr    BCD_Left
  546.     
  547.     lea    BCDBuff,a0
  548.     move.l    dfile,a1    ; output file handle
  549.     jsr    FPrStr        ; show the bias
  550.  
  551.     lea    BiasMsg1,a0
  552.     move.l    dfile,a1    ; output file handle
  553.     jsr    FPrStr
  554.     
  555.     bra.l    1$        ; go for another line
  556.  
  557.  
  558. ;-------------------------------------------
  559. ; show the help message and exit:
  560.  
  561. Help:
  562.     lea    HelpMsg,a0
  563.     jsr    PrStr
  564.     bra.s    Exit
  565.  
  566. ;-------------------------------------------
  567. ; show the 'break...' message and exit:
  568.  
  569. Abort:
  570.     lea    BreakMsg,a0
  571.     jsr    PrStr
  572.     bra.s    ExitA
  573.  
  574. ;-----------------------------
  575. ; Exit routines  [30 Dec 88]
  576. ;
  577.  
  578. Exit0:
  579.  
  580.     lea    DoneMsg,a0
  581.     jsr    PrStr
  582.  
  583. ExitA:
  584.     lea    CursorOn,a0
  585.     jsr    PrStr
  586.  
  587. Exit1:
  588.     move.l    dfile,d1    ; close the dest file
  589.     CallDOS    Close
  590.  
  591. Exit2:
  592.     move.l    sfile,d1    ; close the source file
  593.     CallDOS    Close
  594.  
  595. Exit:
  596.     push.l    TheError    ; error code
  597.     jsr    _exit        ; and wind it up
  598.  
  599. ;----------------------------------------
  600. ; constants
  601.  
  602.     SECTION Constants,DATA
  603.  
  604. GreetMsg:
  605.     dc.b    lf
  606.     dc.b    csi,'0;33;40m'
  607.     dc.b    ' FixFD '
  608.     dc.b    csi,'0;31;40m'
  609.     dc.b    'v1.0 - Copyright ',$a9
  610.     dc.b    ' 1988, Peter Wyspianski',lf,lf
  611.     dc.b    null
  612.  
  613. HelpMsg
  614.     dc.b    ' This utility takes an ''.FD'' file and generates a set of',lf
  615.     dc.b    ' EQUates that can be used by an assembler.',lf,lf
  616.     dc.b    ' Parameters: source_file dest_file.',lf,lf
  617.     dc.b    ' See the docs for more info! -PW',lf,lf,null
  618.  
  619. BadOpenMsg:
  620.     dc.b    csi,'0;33;40m'
  621.     dc.b    ' Error '
  622.     dc.b    csi,'0;31;40m'
  623.     dc.b    '#'
  624.     dc.b    null
  625.  
  626. BadOpenMsg1:
  627.     dc.b    ' opening file "',null
  628.  
  629. BadOpenMsg2:
  630.     dc.b    '"',lf,lf,null
  631.  
  632. CursorOff
  633.     dc.b    csi
  634.     dc.b    '0 p'
  635.     dc.b    null
  636.  
  637. CursorOn
  638.     dc.b    csi
  639.     dc.b    ' p'
  640.     dc.b    null
  641.  
  642. StatusMsg:
  643.     dc.b    '   Reading line '
  644.     dc.b    null
  645.  
  646. DoneMsg
  647.     dc.b    lf,lf
  648.     dc.b    csi,'0;33;40m'
  649.     dc.b    ' Finished.'
  650.     dc.b    csi,'0;31;40m'
  651.     dc.b    lf,lf,null
  652.  
  653. BreakMsg
  654.     dc.b    lf,lf
  655. ;***    dc.b    csi,'0;33;40m'
  656.     dc.b    '*** BREAK'
  657. ;***    dc.b    csi,'0;31;40m'
  658.     dc.b    lf,lf,null
  659.     
  660. HeaderMsg
  661.     dc.b    '; file:',null
  662.  
  663. HeaderMsg1
  664.     dc.b    lf
  665.     dc.b    ';',lf
  666.     dc.b    '; generated by FixFD v1.0',lf
  667.     dc.b    ';',lf
  668.     dc.b    null
  669.  
  670. BiasMsg
  671.     dc.b    '; Bias = ',null
  672.     
  673. BiasMsg1
  674.     dc.b    lf
  675.     dc.b    ';',lf
  676.     dc.b    null
  677.  
  678. LVOMsg
  679.     dc.b    '_LVO',null
  680.     
  681. EQU8Msg
  682.     dc.b    tab
  683. EQUMsg
  684.     dc.b    tab
  685.     dc.b    'equ -'
  686.     dc.b    null
  687.  
  688. EQUMsg1
  689.     dc.b    lf
  690.     dc.b    null
  691.  
  692. ;----------------------------------------
  693. ; Uninitialized storage
  694.  
  695.     SECTION Variables,BSS
  696.  
  697. TaskSigs    ds.l    1    ; pointer to our TC_SIGRECVD
  698.  
  699. TheError    ds.l    1    ; error return code
  700.  
  701. SName        ds.l    1    ; ^source file name
  702. DName        ds.l    1    ; ^dest file name
  703.  
  704. sfile        ds.l    1    ; source file handle
  705. dfile        ds.l    1    ; dest file handle
  706.  
  707. savesp        ds.l    1    ; entry stack pointer
  708.  
  709. argc        ds.l    1    ; argument count
  710. argv        ds.l    1    ; argument array pointer
  711.  
  712. ReturnAddr    ds.l    1    ; program return address
  713.  
  714. bias        ds.w    1    ; library entry bias
  715. line        ds.w    1    ; current line number
  716.  
  717. TubeOut        ds.b    1    ; -1 = yes, 0 = nope
  718.         ds.b    1    ; alignment
  719.  
  720. BCDBuff        ds.b    6    ; bcd string buffer
  721.  
  722. StrBuff        ds.b    256    ; longest possible string
  723.  
  724.