TMS320C2000 Evaluation Assembler PC v5.2.6 Wed Feb 09 14:48:48 2011

Tools Copyright (c) 1996-2010 Texas Instruments Incorporated
../Lab3c.asm                                                         PAGE    1

       1              ;Lab3 Part A
       2              ;Andrew Fowler
       3              ;Damian Szmulewicz Section: 3276
       4              ;Controls LED based on inputs
       5              
       6              
       7              ;*****************************************************************
       8              
       9              
      10              
      11                              .global         _c_int00
      12              
      13        A000  data_sect       .set            0xa000                  ;constant that is actually the starting addr of .data
      14        B000  bss_sect        .set            0xb000                  ;constant that is actually the starting addr of .bss 
      15        6F86  GPAMUX1         .set            0x6F86
      16        7029  WDCR            .set            0x7029
      17        6F8A  GPADIR          .set            0x6F8A
      18        6FC2  GPASET          .set            0x6FC2
      19        6FC0  GPADAT          .set            0x6FC0
      20              ;*****************************************************************
      21              
      22 00000000                       .data                           
      23              
      24              ;char    .byte          '4'     ;define string, ASCII characters placed in memory as WORDS!
      25              
      26 00000000                   .bss                results,256     ;reserves 256 words at label 'results' in the .bss section   
      27                              
      28              ;               .global         char            ;.global directive lets you to see the assigned addresses in 
      29                              
      30              ;****************** Part A ***********************
      31 00000000                       .text                                   ; Program section, see the command linker file, progr
      32                                                                              ; should be placed in the text section which 
      33                                                              
      34 00000000       _c_int00:                                               ; This label tells the linker where the entry (starti
      35 00000000 7622                  EALLOW                                          ; Allow access to protected registers
      36 00000001 561F                  SETC    OBJMODE                         ; Allow 32 bit mov instructions
      37                                                                              ; WDCR is watchdog timer control register
      38                                                                              ; In constants section need to set WDCR=0x702
      39 00000002 9A68                  MOV     AL,#1101000b    ; Disable the watchdog timer.
      40                                                                              ; Must have 101 in bits 5, 4, 3 for
      41                                                                              ; any writes to WDCR. 1 in bit 6
      42                                                                              ; disables watchdog
      43 00000003 28A1                  MOV     AR1,#WDCR
         00000004 7029 
      44 00000005 96C1                  MOV             *AR1, AL                ; Disables watchdog timer
      45 00000006 9A00                  MOV             AL, #0x0000             ;Sets MUX to all input/output
      46 00000007 28A1                  MOV             AR1, #GPAMUX1
         00000008 6F86 
      47 00000009 96C1                  MOV             *AR1,AL
      48 0000000a 9AFF                  MOV             AL, #0x00FF             ;Sets GPIO to input and output (1=out)
      49 0000000b 28A1                  MOV             AR1, #GPADIR
         0000000c 6F8A 
      50 0000000d 96C1                  MOV             *AR1,AL
      51 0000000e 28A0                  MOV             AR0, #GPADAT    ; Sets Register to read from
         0000000f 6FC0 
TMS320C2000 Evaluation Assembler PC v5.2.6 Wed Feb 09 14:48:48 2011

Tools Copyright (c) 1996-2010 Texas Instruments Incorporated
../Lab3c.asm                                                         PAGE    2

      52                              
      53              ;**********************************************************************
      54                              
      55 00000010 92C0  loopc   MOV             AL, *AR0                ;Mvoes contents of GPADAT to accumulator
      56 00000011 FFC7                  LSR             AL, 8
      57 00000012 28A1                  MOV             AR1, #GPADAT
         00000013 6FC0 
      58 00000014 96C1                  MOV             *AR1, AL                ; Puts that the output to a light is true
      59 00000015 6FFB                  B               loopc, UNC
      60              
      61                              
      62 00000016 6F00  END1    B               END1,UNC                ; infinite loop to just keep us from trying to execute
      63                                                                              ; un-initialized (no program) memory. 
      64              

No Assembly Errors, No Assembly Warnings
