home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / st / tech / 6326 < prev    next >
Encoding:
Internet Message Format  |  1992-12-20  |  1.4 KB

  1. From: clausb@hpbbrd.bbn.hp.com (Claus Brod)
  2. Date: Thu, 17 Dec 1992 11:53:41 GMT
  3. Subject: Re: HELP! how do i clear CACR on a TT without 68030 assembler??
  4. Message-ID: <BzEJpI.1oI@hpbbrd.bbn.hp.com>
  5. Organization: HP Mechanical Design Division
  6. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!col.hp.com!news.dtc.hp.com!hpscit.sc.hp.com!hplextra!hpcc05!hpbbn!hpbbrd!clausb
  7. Newsgroups: comp.sys.atari.st.tech
  8. References: <BzCxFC.CEo@ccu.umanitoba.ca>
  9. X-Newsreader: TIN [version 1.1.8 PL6]
  10. Lines: 23
  11.  
  12. vspicer@ccu.umanitoba.ca wrote:
  13. >     is there any way in Megamax C to "hard code" the raw machine
  14. > code to execute the "move cacr,d0" and "move d0,cacr" commands which
  15. > Megamax's inline assembler doesn't understand? i can generate the
  16. > raw machine code to do this in Lattice's assembler, it's just:
  17.  
  18. If Megamax's inline assembler has a dc.l command, you can use just
  19. that for the purpose:
  20.  
  21. >     move    sr,-(sp)         ; save sr
  22. >     ori    #$700,sr        ; no interrupts
  23. >     move    cacr,d0            ; get cacr
  24. ----> change this to dc.l CODE_FOR_MOVE_FROM_CACR
  25. >     ori.w    #$808,d0        ; clear data and instruction caches
  26. >     move    d0,cacr            ; reload cacr
  27. ----> change this to dc.l CODE_FOR_MOVE_TO_CACR
  28. >     move    (sp)+,sr        ; interrupts back on
  29. >     rts                ; go back 
  30.  
  31. -- 
  32. --clausb@hpbeo79.bbn.hp.com----------------------------------------------
  33. Claus Brod, MDD, HP Boeblingen       Things. Take. Time. (Piet Hein)
  34. --#include <std_disclaimer>----------------------------------------------
  35.