home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 373.lha / X2X / Formats.doc.pp / Formats.doc
Encoding:
Text File  |  1990-05-06  |  3.7 KB  |  148 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.                                                                               
  3.   
  4.    Examples of ACSII-hex formats for :- 
  5.   
  6.      INTEL 
  7.      MOTOROLA 
  8.      TEKTRONIX ( inc extended format ) 
  9.   
  10.   
  11.    Note: the INTEL example (data length 16dec bytes) is the reference. 
  12.        : in following "byte" =  binary value of 2 ASCII-hex charas 
  13.                                 hi nibble = 1st byte  
  14.   
  15.                                                                               
  16.  
  17. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  18.  
  19.   
  20.   Format :  INTEL 
  21.   
  22.  
  23. :LLAAAATTdd..ddCC 
  24.  
  25. LL   = number of data bytes  
  26. AAAA = 16 bit address 
  27. TT   = type  
  28.         0 = data 
  29.         1 = end record 
  30.         2 = Upper Segment Base Address (USBA) 
  31.         3 = start address record ( data length = 4 bytes) 
  32.  
  33. CC   = checksum ( = -ve sum of record : ie sum of all byte-pairs = 0 ) 
  34. dd = ASCII-hex charas 
  35.  
  36. USBA format = :02000002ssssCC 
  37. ( following data records will be have (16 * ssss) added to their load addr) 
  38.  
  39.  
  40. ---------------------------------------------------------------------------- 
  41.  
  42. :020000020500??                                type 2 record , base = 500H 
  43. :1012340090FAFCE96B002020202020202020202090    type 0 record (data) 
  44.                                                     (load addr = 1234H) 
  45. :00000001FF                                    type 1 record (end) 
  46.  
  47.   above converted to :- 
  48.  
  49. :1062340090FAFCE96B002020202020202020202040    <<EXAMPLE 
  50. :00000001FF 
  51.  
  52.  
  53. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
  54.  
  55.   
  56.                                           MOTOROLA - all use S9 as end record 
  57.   
  58.   
  59.   Format :  Motorola ( S1 , 16 bit address ) 
  60.   
  61.     |<-------------- LL ---------------->| 
  62. S1LLAAAAdd..ddCC                             << Format 
  63.  
  64. LL = 2 + (number of data bytes) + 1    
  65. AAAA = address 
  66. CC = ~( LL + (AA .. + AA) + ( data bytes ))  : Note 1's complement! 
  67.  
  68.  
  69. S1LLAAAAdd..ddCC                              << Format 
  70. S113623490FAFCE96B00202020202020202020203C    <<EXAMPLE 
  71. S9030000FC 
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
  80.   
  81.   Format :  Motorola ( S2 , 24 bit address ) 
  82.   
  83. S2LLAAAAAAdd..ddCC                              << Format 
  84. S21400623490FAFCE96B00202020202020202020203B    <<EXAMPLE 
  85. S904000000FB 
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
  95.   
  96.   Format :  Motorola ( S3 , 32 bit address ) 
  97.   
  98. STLLAAAAAAAAdd..ddCC                              << Format 
  99. S3150000623490FAFCE96B00202020202020202020203A    <<EXAMPLE 
  100. S90500000000FA 
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
  109.   
  110.   Format :  Tektronix 
  111.   
  112.    Note checksum algorithm 
  113.   
  114. /AAAALLRRdd..ddCC    << Format 
  115.  
  116. AAAA = load address 
  117. LL   = record length ( number of data bytes : 0 = last record ) 
  118. RR   = load checksum ( = sum of previous 6 de-ASCII'd CHARAS ) 
  119. CC   = data    "     ( sum of de-ASCII'D CHARAS ) 
  120.  
  121. /AAAALLRRdd..ddCC                              << Format 
  122. /6234101090FAFCE96B002020202020202020202079    <<EXAMPLE 
  123. /00000000 
  124.  
  125.  
  126. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
  127.   
  128.   Format :  Tektronix (extended) 
  129.   
  130.    Note checksum algorithm 
  131.   
  132. %LLTCCky......ydd..dd    << Format 
  133.  
  134. LL = length ( all charas after % ) 
  135. T  = type chara ( 6 = data , 8 = end ) 
  136. CC = checksum   ( sum of all de-ASCII'd CHARAS = 0 ) 
  137. k  =   of address charas, max 8 ( = 4 bytes ) 
  138. y...y = 'k' address charas 
  139. xx =  data as usual 
  140.  
  141.   
  142. %LLTCCky......ydd..dd    << Format 
  143.  
  144. %2E6A680000623490FAFCE96B0020202020202020202020    <<EXAMPLE 
  145. %0E81E800000000 
  146.  
  147.