home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / ACE / Prgs / MC / ledflash.b < prev   
Text File  |  1994-09-02  |  524b  |  29 lines

  1. '...calling a machine code subroutine from ACE with ALLOC.
  2.  
  3. declare function Delay(ticks&) library
  4.  
  5. const bytes=50&
  6.  
  7. power& = ALLOC(bytes)
  8.  
  9. '...store machine code
  10. for i&=0 to 39
  11.  read a%
  12.  poke power&+i&,a% 
  13. next
  14.  
  15. data &H2f,0,&H20,&H2f,0,8,&Hb0,&H3c,0,1,&H67,0,0,&He,0,&H39,0,2,0,&Hbf
  16. data &He0,1,&H60,0,0,&Ha,2,&H39,0,&Hfd,0,&Hbf,&He0,1,&H20,&H1f,&H4e,&H75,0,0
  17.  
  18. '...flash power LED 5 times
  19. for i=1 to 5
  20.   print "off"
  21.   mode&=0
  22.   call power&(mode&)
  23.   Delay(25)
  24.   print "on"
  25.   mode&=1
  26.   call power&(mode&)
  27.   Delay(25)
  28. next  
  29.