home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / amiga-flight / programs / lights1.asm < prev    next >
Assembly Source File  |  1977-12-31  |  3KB  |  53 lines

  1. *****************************************************************************
  2. ***                             LIGHTS1.ASM                               ***
  3. ***                                                                       ***
  4. ***    Author : Pete Cheetham, Andrew Duffy                               ***
  5. ***    Date   : November 1992, June 1994                                  ***
  6. ***    Desc.  : This program was written to demonstrate driving the 68000 ***
  7. ***             applications board.                                       ***
  8. ***             It repeatedly reads the bit switches and echoes their     ***
  9. ***             values to the coloured LEDs, forever.                     ***
  10. ***                                                                       ***
  11. ***                          ©XCNT, 1992-1994.                            ***
  12. *****************************************************************************
  13.  
  14.  
  15. *****************************************************************************
  16. ***                              Includes                                 ***
  17. *****************************************************************************
  18.  
  19.         include    "subrts.h"    Included by default anyway
  20.  
  21. *****************************************************************************
  22. ***                          Initialisation routine                       ***
  23. *****************************************************************************
  24.  
  25.         move.b    #APPS_ALL_IN,d0    Initialise the applications board
  26.         jsr    APPS_INIT    (port A all input)
  27.  
  28.         movea.l    #Instructs,a6    Print instructions
  29.         jsr    OUTSTR
  30.  
  31. *****************************************************************************
  32. ***                              Main routine                             ***
  33. *****************************************************************************
  34.  
  35. Loop        move.b    APPS_PORTA,d0    Get the values of the bit switches
  36.         move.b    d0,APPS_PORTB    Output them to the LEDs
  37.         bra    Loop        Repeat forever
  38.  
  39.         rts            Exit (never gets here)
  40.  
  41. *****************************************************************************
  42. ***                               Strings                                 ***
  43. *****************************************************************************
  44.  
  45. Instructs    dc.b    "Lights1.asm",13,10,"===========",13,10,13,10
  46.         dc.b    "Ensure that the LEDs are switched on and the ADC is switched off.",13,10
  47.         dc.b    "This program reads the values from the DIP switches and echoes their values",13,10
  48.         dc.b    "to the coloured LEDs, forever...",13,10,0
  49.  
  50. *****************************************************************************
  51. ***                       End of file LIGHTS1.ASM.                        ***
  52. *****************************************************************************
  53.