home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 508.lha / IO_Expansion_Board / Test / IOSetup.asm < prev    next >
Assembly Source File  |  1991-05-06  |  2KB  |  52 lines

  1. *****************************************************************************
  2. * IOSetup.asm - ©1990 by The Puzzle Factory
  3. *          Initializes the register contents for the I/O Expansion board
  4. *          to specific values, so that you can see if the hardware is working.
  5. *   Usage: 1> IOSetup
  6. * History: 01/22/88 V0.50 Created by Jeff Lavin
  7. *          11/25/90 V0.51 Converted to new syntax
  8. *
  9. * [To all: Please don't forget to bump the revision numbers if you do *any*
  10. *          modifications at all.  -Jeff]
  11. *
  12. *****************************************************************************
  13.  
  14. ;Set Tabs           |       |                 |       |
  15.  
  16.     exeobj
  17.     objfile    'ram:IOSetup'
  18.     macfile 'Includes:IOexp.i'    ;The One & Only include file
  19.  
  20. IOSetup    lea    (VIA_Base+VIA0),a0
  21.     move.b    #$FF,(DDRB,a0)        ;All outputs
  22.     move.b    #$FF,(DDRA,a0)        ;All outputs
  23.     move.b    #$12,(ORB,a0)        ;Recognizable pattern
  24.     move.b    #$34,(ORA,a0)        ;Recognizable pattern
  25.  
  26.     lea    (VIA_Base+VIA1),a0
  27.     move.b    #$FF,(DDRB,a0)        ;All outputs
  28.     move.b    #$FF,(DDRA,a0)        ;All outputs
  29.     move.b    #$56,(ORB,a0)        ;Recognizable pattern
  30.     move.b    #$78,(ORA,a0)        ;Recognizable pattern
  31.  
  32.     lea    (ACIA_Base+ACIA0),a0
  33.     bsr.b    SetupACIA
  34.  
  35.     lea    (UNIT2,a0),a0
  36.     bsr.b    SetupACIA
  37.  
  38.     lea    (ACIA_Base+ACIA1),a0
  39.     bsr.b    SetupACIA
  40.  
  41.     lea    (UNIT2,a0),a0
  42. SetupACIA    move.b    (ISR,a5),d0        ;Clear garbage
  43.     move.b    (CSR,a5),d0
  44.     move.b    (RDR,a5),d0        ;Clear RDRF bit
  45.     move.b    #Baud_2400,(CTR,a0)    ;2400 baud, 1 stop bit, no echo
  46.     move.b    #FRF_FRMT!WORDLEN_8!PAR_MARK,(FMR,a0) ;8 bits, mark par, no par, DTR hi
  47.     move.b    #$0D,(TDR,a0)        ;Stick a CR in there
  48.     moveq    #0,d0
  49.     rts
  50.  
  51.     end
  52.