MPASM 02.15 Released EXPT7A.ASM 3-3-2002 1:35:37 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;Expt7a.asm 00002 ;Project: Hee Haw Sound 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 1283 00011 BCF 03,5 ;Go to Bank 0 - the program memory area. 0003 0186 00012 CLRF 06 ;Clear display 0004 2805 00013 GOTO HEE1 00014 0005 30FF 00015 HEE1 MOVLW 0FFH ;Number of loops 0006 0094 00016 MOVWF 14H ;The loop file 0007 30C0 00017 HEE2 MOVLW 0C0H ;Duration of HIGH 0008 1786 00018 BSF 06,7 ;Turn on piezo 0009 0000 00019 HEE3 NOP 000A 0B95 00020 DECFSZ 15H,1 ;Create the HIGH time 000B 2809 00021 GOTO HEE3 000C 30C0 00022 MOVLW 0C0H ;Duration of the LOW 000D 0095 00023 MOVWF 15H ;The LOW file 000E 1386 00024 BCF 06,7 ;Turn off piezo 000F 0000 00025 HEE4 NOP 0010 0B95 00026 DECFSZ 15H,1 ;Create the LOW time 0011 280F 00027 GOTO HEE4 0012 0B94 00028 DECFSZ 14H,1 ;Decrement the loop file 0013 2807 00029 GOTO HEE2 ;Do more cycles 00030 0014 30C0 00031 MOVLW 0C0H ;Number of loops 0015 0094 00032 MOVWF 14H ;The loop file 0016 30FF 00033 HAW1 MOVLW 0FFH 0017 0095 00034 MOVWF 15H 0018 1786 00035 BSF 06,7 ;Turn on piezo 0019 0000 00036 HAW2 NOP 001A 0B95 00037 DECFSZ 15H,1 ;Create the HIGH time 001B 2819 00038 GOTO HAW2 001C 30FF 00039 MOVLW 0FFH ;Duration of the LOW 001D 0095 00040 MOVWF 15H ;The LOW file 001E 1386 00041 BCF 06,7 ;Turn off piezo 001F 0000 00042 HAW3 NOP 0020 0B95 00043 DECFSZ 15H,1 ;Create the LOW time 0021 281F 00044 GOTO HAW3 0022 0B94 00045 DECFSZ 14H,1 ;Decrement the loop file 0023 2816 00046 GOTO HAW1 ;Do more cycles  0024 2805 00047 GOTO HEE1 00048 00049 END ;Tells assembler end of program MPASM 02.15 Released EXPT7A.ASM 3-3-2002 1:35:37 PAGE 2 SYMBOL TABLE LABEL VALUE HAW1 00000016 HAW2 00000019 HAW3 0000001F HEE1 00000005 HEE2 00000007 HEE3 00000009 HEE4 0000000F SETUP 00000000 __16F84 00000001 MEMORY USAGE MAP ('X' = Used, '-' = Unused) 0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXX----------- ---------------- All other memory blocks unused. Program Memory Words Used: 37 Program Memory Words Free: 987 Errors : 0 Warnings : 0 reported, 0 suppressed Messages : 0 reported, 0 suppressed