home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 6 / QRZ Ham Radio Callsign Database - Volume 6.iso / pc / files / dsp / 56100tar.z / 56100tar / 56100 / g722 / h221fix / h221var.asm < prev   
Encoding:
Assembly Source File  |  1992-04-15  |  9.2 KB  |  430 lines

  1.         org    x:$00
  2.  
  3.         list        ; enable H221 variable listing
  4.  
  5. ;;***********************************************************************
  6.  
  7. control_word    ds    1    ; isdn control word
  8.                 ; ***********************************
  9.                 ; b0  = H221 tx enable            0 = disabled
  10.                 ; b1  = tx CRC enable           0 = disabled
  11.                 ; b2  = tx mf count enable     0 = disabled
  12.                 ; b3  =
  13.                 ; b4  =
  14.                 ; b5  = current rx BAS OK      0 = not valid
  15.                 ; b6  =    terminal alarm tx      0 = no alarm
  16.                 ; b7  = interrupt occurrence     0 = no
  17.                 ; b8  = isdn rx                0 = no rx
  18.                 ; b9  =    rx enable             0 = enabled
  19.                 ; b10 =    rx CRC enable            0 = disabled
  20.                 ; b11 = rx CRC error              0 = no error
  21.                 ; b12 =    rx odd/even smf           0 = even
  22.                 ; b13 = frame alignment           0 = no
  23.                 ; b14 = multiframe alignment       0 = no
  24.                 ; b15 = terminal alarm rx      0 = no alarm
  25.                     
  26. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  27. ;;
  28. ;;         Receive storage
  29. ;;
  30. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  31.  
  32. bas_faw_0        ds    1
  33. erc_faw_0        ds    1
  34. mf_align_wrd        ds    1
  35. mf_count_rx        ds    1
  36. ir            ds    1
  37. faw_error_count        ds    1
  38. mf_error_count        ds    1
  39.  
  40. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  41. ;;
  42. ;;    Optimised CRC Check Storage
  43. ;;
  44. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  45.  
  46. crc_enable_cnt        ds    1
  47. crc_disable_cnt        ds    1
  48. isdn_count_rx        ds    1
  49. rx_crc_store        ds    1
  50.             dc    0
  51.             dc    8
  52. ir_shft            ds    1    ; data resides in upper byte of word
  53. rx_crc_value_2        dc    12
  54.             dc    $0090
  55. rx_crc_data        ds    1
  56. rx_crc_cnt_ptr        ds    1
  57.                                 
  58. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  59. ;;
  60. ;;    Optimised rx even state storage
  61. ;;
  62. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  63.  
  64. decoded_bas_ptr        ds    1
  65. bas_erc_faw_ptr        ds    1
  66. rx_count_ptr        ds    1
  67.         org    x:$0018        ; 8 word modulo buffer
  68. decoded_bas        ds    8
  69. bas_erc_faw        ds    17
  70.         
  71. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  72. ;;
  73. ;;    Optimised CRC test state storage
  74. ;;
  75. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  76.  
  77. crc_test_count        ds    1
  78. crc_error_count     ds    1
  79. end_count        dc    100
  80. test_error_count    dc    89
  81. crc_sorted        ds    1
  82.  
  83. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  84. ;;
  85. ;;    Optimised BAS Error detect storage
  86. ;;
  87. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  88.  
  89. bas_erc_store        ds    1
  90. mask            dc    $00d7
  91. error_ref_val        dc    0
  92.             dc    16
  93. count_check_2        ds    1
  94. temp_error        ds    2
  95. r2_temp_2        ds    1
  96. error_store        ds    1
  97. error_mask        ds    1
  98. faw_true_bit_cnt    ds    1
  99.  
  100. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  101. ;;
  102. ;;    BAS Error correct references
  103. ;;
  104. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  105.                                     
  106. single_error    dc    $009e        ; for error    0001
  107.         dc    $004f        ; position    0002        
  108.         dc    $00cc        ;        0004
  109.         dc    $0066        ;        0008
  110.         dc    $0033        ;        0010
  111.         dc    $00f2        ;        0020
  112.         dc    $0079        ;        0040
  113.         dc    $00d7        ;        0080
  114.  
  115. bas_err_mask_0    dc    $0001        ; these values are the x'or 
  116.         dc    $0002        ; errors to be used upon the 
  117.         dc    $0004        ; latest received DECODED BAS
  118.         dc    $0008        ; for a single error in the 
  119.         dc    $0010        ; indicated position
  120.         dc    $0020        ; N.B. the b0 bit of the received
  121.         dc    $0040        ; BAS is taken to be the MSB for 
  122.         dc    $0080        ; BAS CRC operation ==> an implied
  123.                     ; 'b0' errorin the error result 
  124.                     ; is actually in b7 
  125.                     
  126. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  127.  
  128. double_error_0    dc    $00d1        ; for errors    0003
  129.         dc    $0052        ; in positions    0005
  130.         dc    $00f8        ;        0009
  131.         dc    $00ad        ;        0011
  132.         dc    $006c        ;        0021
  133.         dc    $00e7        ;        0041
  134.         dc    $0049        ;        0081
  135.  
  136. bas_err_mask_1    dc    $0003        ; these values are the x'or
  137.         dc    $0005        ; errors to be used upon the 
  138.         dc    $0009        ; latest received DECODED BAS
  139.         dc    $0011        ; for double errors in the
  140.         dc    $0021        ; indicated positions
  141.         dc    $0041
  142.         dc    $0081
  143.  
  144. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  145.  
  146. double_error_1    dc    $0083        ; for errors    0006
  147.         dc    $0029        ; in positions    000a
  148.         dc    $007c        ;        0012
  149.         dc    $00bd        ;         0022
  150.         dc    $0036        ;        0042
  151.         dc    $0098        ;        0082
  152.         dc    $00ae        ;        00c0
  153.  
  154. bas_err_mask_2    dc    $0006        ; these values are the x'or
  155.         dc    $000a        ; errors to be used upon the 
  156.         dc    $0012        ; DECODED BAS for double errors 
  157.         dc    $0022        ; in the indicated positions
  158.         dc    $0042
  159.         dc    $0082
  160.         dc    $00c0
  161.         
  162. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  163.  
  164. double_error_2    dc    $00aa        ; for errors    000c
  165.         dc    $00ff        ; in positions    0014
  166.         dc    $003e        ;        0024
  167.         dc    $00b5        ;        0044
  168.         dc    $001b        ;        0084
  169.         dc    $008b        ;        0060
  170.         dc    $0025        ;        00a0
  171.  
  172. bas_err_mask_3    dc    $000c        ; these values are the x'or
  173.         dc    $0014        ; errors to be used upon the 
  174.         dc    $0024        ; DECODED BAS for double errors 
  175.         dc    $0044        ; in the indicated positions
  176.         dc    $0084
  177.         dc    $0060
  178.         dc    $00a0
  179.         
  180. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  181.         
  182. double_error_3    dc    $0055        ; for errors    0018
  183.         dc    $0094        ; in positions    0028
  184.         dc    $001f        ;        0048
  185.         dc    $00b1        ;        0088
  186.         dc    $00c1        ;        0030
  187.         dc    $004a        ;        0050
  188.         dc    $00e4        ;        0090
  189.         
  190. bas_err_mask_4    dc    $0018        ; these values are the x'or
  191.         dc    $0028        ; errors to be used upon the 
  192.         dc    $0048        ; DECODED BAS for double errors
  193.         dc    $0088        ; in the indicated positions
  194.         dc    $0030
  195.         dc    $0050
  196.         dc    $0090
  197.                 
  198. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
  199.         
  200. error_0001_mask    dc    $0001        ; error position mask
  201.  
  202. bas_err_0001    dc    $001e        ; single BAS
  203.         dc    $00de        ; error in position
  204.         dc    $00be        ; 0001
  205.         dc    $008e
  206.         dc    $0096
  207.         dc    $009a
  208.         dc    $009c
  209.         dc    $009f
  210.         
  211. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  212.         
  213. error_0002_mask    dc    $0002        ; error position mask
  214.  
  215. bas_err_0002    dc    $00cf        ; single BAS
  216.         dc    $000f        ; error in position
  217.         dc    $006f        ; 0002
  218.         dc    $005f
  219.         dc    $0047
  220.         dc    $004b
  221.         dc    $004d
  222.         dc    $004e
  223.         
  224. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
  225.         
  226. error_0004_mask    dc    $0004        ; error position mask
  227.  
  228. bas_err_0004    dc    $004c        ; single BAS 
  229.         dc    $008c        ; error in position
  230.         dc    $00ec        ; 0004
  231.         dc    $00dc
  232.         dc    $00c4
  233.         dc    $00c8
  234.         dc    $00ce
  235.         dc    $00cd
  236.         
  237. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
  238.         
  239. error_0008_mask    dc    $0008        ; error position mask
  240.  
  241. bas_err_0008    dc    $00e6        ; single BAS
  242.         dc    $0026        ; error in position
  243.         dc    $0046        ; 0008
  244.         dc    $0076
  245.         dc    $006e
  246.         dc    $0062
  247.         dc    $0064
  248.         dc    $0067
  249.         
  250. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
  251.         
  252. error_0010_mask    dc    $0010        ; error position mask
  253.  
  254. bas_err_0010    dc    $00b3        ; single BAS 
  255.         dc    $0073        ; error in position
  256.         dc    $0013        ; 0010
  257.         dc    $0023
  258.         dc    $003b
  259.         dc    $0037
  260.         dc    $0031
  261.         dc    $0032
  262.         
  263. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
  264.  
  265. error_0020_mask    dc    $0020        ; error position mask
  266.  
  267. bas_err_0020    dc    $0072        ; single BAS
  268.         dc    $00b2        ; error in position
  269.         dc    $00d2        ; 0020
  270.         dc    $00e2
  271.         dc    $00fa
  272.         dc    $00f6
  273.         dc    $00f0
  274.         dc    $00f3
  275.         
  276. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  277.         
  278. error_0040_mask    dc    $0040        ; error position mask
  279.  
  280. bas_err_0040    dc    $00f9        ; single BAS
  281.         dc    $0039        ; error in position
  282.         dc    $0059        ; 0040
  283.         dc    $0069
  284.         dc    $0071
  285.         dc    $007d
  286.         dc    $007b
  287.         dc    $0078
  288.         
  289. ;;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
  290.         
  291. error_0080_mask    dc    $0080        ; error position mask
  292.  
  293. bas_err_0080    dc    $0057        ; single BAS
  294.         dc    $0097        ; error in position
  295.         dc    $00f7        ; 0080
  296.         dc    $00c7
  297.         dc    $00df
  298.         dc    $00d3
  299.         dc    $00d5
  300.         dc    $00d6
  301.  
  302. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  303. ;;
  304. ;;    Transmit and Receive reference counts
  305. ;;
  306. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  307.  
  308. tx_count    dc    0        ; 
  309. crc_count    dc    160
  310.         dc    320
  311.         dc    480
  312.         dc    640
  313.         dc    800
  314.         dc    960
  315.         dc    1120
  316.         dc    0
  317. rx_count_0    dc    80        ; Pointer for the initial frame 
  318.         dc    240        ; and multiframe synchronisation
  319.         dc    400
  320.         dc    560
  321.         dc    720
  322.         dc    880
  323.         dc    1040
  324.         dc    1200
  325.         dc    1280
  326. rx_count    dc    15        ; Pointer to the end of each
  327.         dc    175        ; H221 word for even submultiframe
  328.         dc    335        ; receptions
  329.         dc    495
  330.         dc    655
  331.         dc    815
  332.         dc    975
  333.         dc    1135
  334. first_rx    dc    1280        ; This pointer ensures the correct
  335.         dc    95        ; synchronisation of the receive
  336.         dc    255        ; H221 state machine
  337.         dc    415
  338.         dc    575
  339.         dc    735
  340.         dc    895
  341.         dc    1055
  342.         dc    1215
  343. crc_bit_start    dc    84        ; Pointer to the start of the
  344.         dc    244        ; crc bit count window for H221
  345.         dc    404        ; tx and rx
  346.         dc    564
  347.         dc    724
  348.         dc    884
  349.         dc    1044
  350.         dc    1204
  351. crc_bit_end    dc    87        ; Pointer to the end of the
  352.         dc    247        ; crc bit count window for H221
  353.         dc    407        ; tx and rx
  354.         dc    567
  355.         dc    727
  356.         dc    887
  357.         dc    1047
  358.         dc    1207
  359. crc_end_smf    dc    159        ; Pointer to the last byte of
  360.         dc    319        ; each submultiframe.
  361.         dc    479
  362.         dc    639
  363.         dc    799
  364.         dc    959
  365.         dc    1119
  366.         dc    1279
  367.         
  368. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  369. ;;
  370. ;;        Transmit storage
  371. ;;
  372. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  373.  
  374. is_shft        ds    1        ; data resides in the lower byte    
  375. bas_data    ds    1
  376. bas_state_ptr    ds    1
  377. faw_state_ptr    ds    1
  378. erc_state_ptr    ds    1
  379. disable_crc_ptr    ds    1
  380. enable_crc_ptr    ds    1
  381. mfaw_data    dc    $0034
  382. mfaw_store    ds    1
  383.  
  384. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  385. ;;
  386. ;;    Transmit State 0 optimised store
  387. ;;
  388. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  389.  
  390. tx_ref_count_ptr    ds    1
  391. tx_0_val        dc    15
  392.             dc    1120
  393.             dc    0
  394. mf_count_store        ds    1
  395. mf_count        ds    1
  396.  
  397. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  398. ;;
  399. ;;        Optimised tx CRC Storage
  400. ;;
  401. ;;++++++++++++++++++++++++++++++++++++++++++++++++
  402.  
  403. isdn_count_tx    ds    1
  404. tx_crc_store    ds    1
  405.         dc    0
  406.         dc    8
  407. is        ds    1        ; data resides in upper byte
  408. tx_crc_value_2    dc    12
  409.         dc    $0090
  410. tx_crc_data    ds    1
  411. tx_crc_cnt_ptr    ds    1
  412.  
  413. ;;+++++++++++++++++++++++++++++++++++++++++++++++++
  414. ;;
  415. ;;        Optimised BAS CRC Storage
  416. ;;
  417. ;;+++++++++++++++++++++++++++++++++++++++++++++++++
  418.  
  419. bas_store    ds    1
  420. bas_mask    dc    $00d7
  421. erc_ref_val    dc    0
  422.         dc    16
  423. count_check    ds    1
  424. temp_erc    ds    2
  425. r2_temp        ds    1
  426. erc_store    ds    1
  427.  
  428. ;;**********************************************************************
  429.  
  430.         nolist