MPASM 02.15 Released EXPT1.ASM 3-12-2002 22:00:13 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;Expt1.asm 00002 ;Project: Turning on a LED 00003 ;List P = 16F84 00004 ;#include 00005 ;__CONFIG 1Bh    ;_CP_OFF & _PWRTE_ON & _WDT_OFF & _RC_OSC 00006 00007 0000 00008 ORG 0 ;This is the start of memory for the program. 0000 1683 00009 SETUP BSF 03,5 ;Go to Bank 1 0001 0186 00010 CLRF 06 ;Make all port B output 0002 3001 00011 MOVLW 01 ;Load W with 0000 0001 0003 0085 00012 MOVWF 05 ;Make RA0 input 0004 1283 00013 BCF 03,5 ;Go to Bank 0 - the program memory area. 0005 0186 00014 CLRF 06 ;Blank the output 00015 0006 1C05 00016 MAIN BTFSS 05,0 ;Test the input line on port A 0007 280A 00017 GOTO MAIN2 ;Button not pressed 0008 1406 00018 BSF 06,0 ;Button pressed. Turn on LED 0009 2806 00019 GOTO MAIN ;Loop Main 000A 1006 00020 MAIN2 BCF 06,0 ;Button not pressed. Turn off LED 000B 2806 00021 GOTO MAIN ;Loop Main 00022 00023 END ;Tells assembler end of program MPASM 02.15 Released EXPT1.ASM 3-12-2002 22:00:13 PAGE 2 SYMBOL TABLE LABEL VALUE MAIN 00000006 MAIN2 0000000A SETUP 00000000 __16F84 00000001 MEMORY USAGE MAP ('X' = Used, '-' = Unused) 0000 : XXXXXXXXXXXX---- ---------------- ---------------- ---------------- All other memory blocks unused. Program Memory Words Used: 12 Program Memory Words Free: 1012 Errors : 0 Warnings : 0 reported, 0 suppressed Messages : 0 reported, 0 suppressed