home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 4: The Falcon Archive / nf_archive_four_v1.0.iso / ARCHIVE / WORK / TOOLS / DSPDIT08.ZIP / QDSP_ASM.006 / DSP_ASM.DOC next >
Text File  |  1995-10-21  |  6KB  |  265 lines

  1.  
  2. -- Quick DSP assembler --   v0.06     (21.10.1995)
  3.  
  4. by Audoly Gilles
  5.  
  6.  
  7. This program was done because the assembler given by ATARI is too slow.
  8. As nobody else tried to make one in assembly, I did. 
  9. (well, the first version was avaible in november 1993 ...)
  10. This assembler is nearly 30 times faster than ASM56000.TTP+DSPLNK+CLD2LOD.
  11. It is 20 times smaller too, and my version isn't really 20 times lower.
  12. Who said that assembly is useless, because C can do as good ?
  13. The speed test was done with a complete 3000 lines source.
  14.  
  15. This program is not supposed to replace ASM56000.TTP coded in C by Motorola.
  16. I don't know perfectly the  DSP. You must sometime assemble your program
  17. with ASM56000, to check if mine didn't miss a bugg.
  18.  
  19. Please remember, that I'm not payed to do this job. I'm coding it anytime
  20. I'm bored with my main programs (the serious ones). Then, you must excuse
  21. the low quality of this program, and the time to wait for a new version.
  22. This program was specially made for me, and my big dsp routine (3000 lines)
  23. I'm working on. (Do you know what 5 minutes waiting means ?)
  24.  
  25.  
  26.  
  27.  
  28.  
  29. -- example --
  30.  
  31. _how to assemble:
  32. open "qdsp_asm.ttp"
  33. command line: "file.asm"
  34.  
  35. _how to use it:
  36.     ...
  37.     ...
  38.     ...
  39. Dsp_ExecProg: MACRO        ;#codeptr.L,#codesize.L,#ability.W
  40.     move.w    \3,-(sp)
  41.     move.l    \2,-(sp)
  42.     move.l    \1,-(sp)
  43.     move.w    #$6d,-(sp)
  44.     trap    #14
  45.     lea.l    12(sp),sp
  46.     ENDM
  47.     ...
  48.     ...
  49.     ...
  50.     Dsp_ExecProg    #buff,#(ebuff-bbuff)/3,#ability
  51.     ...
  52.     ...
  53.     ...
  54. bbuff: incbin "file.p56"
  55. ebuff:
  56.     ...
  57.     ...
  58.  
  59.  
  60. in C: load it somewhere, get the file size, and execute Dsp_ExecProg.
  61.  
  62. You can use the ".lod" too, but I think the ".p56" is better, because it
  63. is smaller, and it will remain less time to execute. I think you should
  64. include in your programs, the possibility of loading ".dsp". For example:
  65. in dsp sound effects programs.
  66. ".lod" can be translated to ".p56" with the Dsp_LodToBinary function.
  67.  
  68.  
  69.  
  70. command line syntax:
  71. [n] [l] [oFILE.P56] [pFILE] FILE.ASM
  72.  
  73. example:
  74. l otest.p56 test.asm
  75.  
  76. n:        won't create '.DSP' output file
  77. l:        make a LOD output file too
  78. oFILE.P56 define an other name for output file (don't forget the extention)
  79.  
  80.  
  81.  
  82. restrictions:
  83.  _ warnings are not reported. (not even counted).
  84.  _ few assembling directives.
  85.  _ no optimisation directives.
  86.  _ ALL THE RESTRICTIONS WRITTEN IN THE DSP MANUAL ARE NOT SEEN BY THE
  87.    ASSEMBLER !! (ex1: short jsr at LA adress  ex2:rti after rep  
  88.                  EX3: use of Rn after move ??,Rn ...).
  89.  _ please don't make mistake on command line.
  90.  
  91. If you find a bugg I didn't register, it would be nice to report it.
  92.  
  93.  
  94. notes:
  95.  _ "_label" is a local label.
  96.  _ labels may be defined many times. (main reason of hard debugging !)
  97.  
  98.  
  99.  
  100. **** v0.02 improvements:
  101.  
  102.  _ double parallel move.
  103.  
  104.  _ L: memory move is now allowed.
  105.  
  106.  _ brackets in arithmetic.
  107.  
  108.  _ MACROs without parameters.
  109.    "__label" is a macro local label.
  110.  
  111.    ex:
  112.    
  113.    mac1:  MACRO
  114.           cmp  a,b
  115.           jeq  __lab0
  116.           not  a
  117.           jmp  __lab1
  118.    __lab0:
  119.           not  b
  120.    __lab1:
  121.           ENDM
  122.           
  123.           mac1
  124.           ...
  125.           mac1
  126.           ...
  127.           ...
  128.  
  129.  
  130.  
  131. **** v0.03 improvement:
  132.  
  133. _ some buggs have been fixed.
  134.  
  135.  
  136.  
  137. **** v0.04 improvements:
  138.  
  139. _ ".P56" extension is now use instead of ".DSP", as devpac dsp (and maybe
  140. others) created this normalisation.
  141.  
  142. _ bugg about use of recursive brackets is fixed. (and others, I haven't
  143. enumerated, too.)
  144.  
  145. _ assembling directives.
  146.  IF,IFNE,IFEQ,IFLE,IFLT,IFGE,IFGT,ELSE/ELSEIF,ENDC/ENDIF
  147.  
  148. _ macro WITH parameters
  149. ex:
  150.       ...
  151.       ...
  152. test: MACRO
  153.       add    \2,\1
  154.       movep  \1,X:<<HTX
  155.       ENDM
  156.       ...
  157.       ...
  158.       test   a,b
  159.  
  160.  
  161.  
  162.  
  163. **** v0.05 improvement:
  164.  
  165. _ some buggs have been fixed.
  166.  
  167.  
  168.  
  169.  
  170. **** v0.06 improvements:
  171.  
  172. _ some buggs have been fixed.
  173.  
  174. _ PRINTVAL value
  175.    will print a value, while assembling, on pass 1 and pass 2. The value can
  176.    be a any kind of arithmetix expression, with numbers and variables.
  177.    
  178. _ PASS1VAL value
  179.   PASS2VAL value
  180.    will do the same as PRINTVAL, but only on pass1 or pass2
  181.  
  182. _ FAIL [message]
  183.    will display unconditionaly an error message. (you should use it with IFxx)
  184.  
  185. _ <<, >>
  186.    logical shift in arithmetic.
  187.    eg: 5<<6 = 5*2^6 = 320
  188.        40>>3 = 40/2^3 = 5
  189.  
  190. _ fractional in arithmetic.
  191.    convert your fractionnal in the dsp format. your number is a fractionnal
  192.    if it starts with "0." or ".".
  193.    warning: you can't multiply 2 fractionals.
  194.    eg: 0.5*0.5<>0.25    0.5*0.5=$400000*$400000= ?
  195.    if you want to do so, you'll have to divide by $800000 (+1.0, but not
  196.    reconized under this form by the assembler)
  197.    eg: to multiply 0.5 by 0.5, you'll have to do: 0.5*0.5/$80000
  198.    waring 2: you can't divide 2 fractionals.
  199.    if you want to do so, you'll have to multiply by $800000
  200.    eg: to divide 0.1 by 0.5, you'll have to do: 0.1*$800000/0.5
  201.  
  202.  
  203.  
  204.  
  205. Note about "<" and ">":
  206. Please always use ">" and "<" each time you use a constant.
  207. When you don't put it, the program take it for immediate short ("<") if the
  208. value is lower than the address where you put it (for jumps), and lower than
  209. $1000. It would be considered as absolute immediate (">"), if the adress is
  210. greater. Then, you should always use "<", and change it to ">" if the value
  211. is too big.
  212. I ask you to always use them, because, I'm not sure if I solved all the
  213. problems that may appen.
  214.  
  215.  
  216.  
  217.  
  218.  
  219. If you're ATARI developper, you can get the source of this stuff.
  220. The price : any nice source coded by you.
  221.  
  222.  
  223. For this job, I only expect gratitude, or donation if you have money to
  224. waste.
  225.  
  226.  
  227. To copy this program, you should keep those points:
  228. _ Nothing can be modified (text file, text in the program, ...)
  229. _ This text file must be given with the program.
  230. _ No kind of profit allowed. (If you wish to, you'll have to deal with me.)
  231.  
  232.  
  233.  
  234. to contact me:
  235.  
  236. AUDOLY GILLES
  237. "L'Alta Riba"
  238. 79, Bd H.Sappia
  239. 06100 NICE
  240. FRANCE
  241.  
  242.  
  243. IF YOU WANT TO GET SOMETHING BACK, PLEASE SEND A STAMPED ENVELOPPE, AND A
  244. DISK FOR (LEGAL) FILES.
  245.  
  246.  
  247. email:
  248. CRAC@gen4.pressimage.fr
  249.  
  250.  
  251. BBS:
  252. Gilles Audoly on BRAZIL or Zyllius
  253.  
  254.  
  255.  
  256.  
  257. small advertising:
  258.  
  259. Buy MoonSpeeder and CLOE.
  260.  
  261.  
  262.  
  263.  
  264.  
  265.