home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / sharware / utility / PACKERS / LZH / LHASRC.EXE / VHUF_.ASM < prev   
Assembly Source File  |  1991-02-11  |  2KB  |  120 lines

  1. ;***********************************************
  2. ;    vhuf_.asm -- works for dynamic & static
  3. ;                 Huffman methods
  4. ;***********************************************
  5.             page    0, 128
  6.  
  7. NC        =        (200h - 2)
  8. NP        =        14
  9. NT        =        19
  10. NPT        =        080h
  11.  
  12. THRESHOLD    equ    3
  13. N1        equ    256 + 60 - THRESHOLD + 1
  14. N2        equ    N1 * 2
  15. NN1        equ    2000h / 64
  16. NN2        equ    NN1 * 2
  17.  
  18. DATA    segment word    public    'DATA'
  19. DATA    ends
  20.  
  21. BSS        segment word    public    'DATA'
  22. heap        dw        NC + 1 dup (?)
  23.  
  24. public    heap
  25.  
  26. avail_mt    dw        1 dup (?)
  27. nchar        dw        1 dup (?)
  28. bitlen        dw        1 dup (?)
  29. freq        dw        1 dup (?)
  30. code        dw        1 dup (?)
  31. n2            dw        1 dup (?)
  32. heapsize    dw        1 dup (?)
  33. sort        dw        1 dup (?)
  34. depth        dw        1 dup (?)
  35.  
  36. public    avail_mt
  37. public    nchar
  38. public    bitlen
  39. public    freq
  40. public    code
  41. public    n2
  42. public    heapsize
  43. public    sort
  44. public    depth
  45. public    text_
  46.  
  47. text_            db        (2000h * 2 + 100h) dup(?)
  48.  
  49. parent_        label    word
  50. left_            dw        2 * NC - 1 dup (?)
  51.  
  52. child_        label    word
  53. right_            dw        2 * NC - 1 dup (?)
  54.  
  55. c_table_        dw        4096 dup (?)
  56. c_code_            dw        NC dup (?)
  57. pt_table_        dw        256 dup (?)
  58. pt_code_        dw        NPT dup (?)
  59. c_len_            db        NC dup (?)
  60. pt_len_            db        NPT dup (?)
  61. dummy            db        8000h - (pt_len_ + NPT - text_) dup (?)
  62.  
  63. public    freq_
  64. public    c_freq_, p_freq_, t_freq_
  65. public    parent_
  66. public    left_
  67. public    child_
  68. public    right_
  69. public    c_table_
  70. public    c_code_
  71. public    pt_table_
  72. public    pt_code_
  73. public    c_len_
  74. public    pt_len_
  75.  
  76. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  77.             org        c_table_
  78. freq_        label    word
  79. c_freq_        dw        2 * NC - 1 dup (?)
  80. p_freq_        dw        2 * NP - 1 dup (?)
  81. t_freq_        dw        2 * NT - 1 dup (?)
  82.  
  83. block_        label    word
  84.             dw        N2 dup (?)
  85.             dw        NN2 dup (?)
  86.  
  87. edge_        label    word
  88.             dw        N2 dup(?)
  89.             dw        256 dup (?)
  90.  
  91. stock_        label    word
  92.             dw        N2 dup (?)
  93.             dw        NN2 dup (?)
  94.  
  95. public    block_
  96. public    edge_
  97. public    stock_
  98.  
  99.             org        heap
  100. len_cnt        dw        17 dup (?)
  101. start        dw        17 dup (?)
  102. weight        dw        17 dup (?)
  103.  
  104. public    len_cnt
  105. public    start
  106. public    weight
  107.  
  108.             org        freq
  109. tablebits    dw        1 dup (?)
  110. table        dw        1 dup (?)
  111.  
  112. public    tablebits
  113. public    table
  114.  
  115. BSS        ends
  116.  
  117. DGROUP    group        DATA, BSS
  118.  
  119.         end
  120.