Організація і використання пам’яті даних, страница 3

       bsf STATUS,RP0

       bsf EECON1,WREN

       bcf EECON1,EEIF

       bcf INTCON,GIE

       movlw 0x55

       movwf EECON2

       movlw 0xaa

       movwf EECON2

       bsf EECON1,WR

m5     btfss EECON1,EEIF

       goto m5

       bcf STATUS,RP0

       return

       END                   ;конец программы

Тект файлу лістинга цієї програми має наступний вигляд:

MPASM 02.20 Released          LAB_444.ASM   4-11-2004  22:17:39         PAGE  1

LOC  OBJECT CODE     LINE SOURCE TEXT

  VALUE

                    00001         list p=16f84

                    00002         #include p16f84.inc     ;подключение библиотеки

                    00001         LIST

                    00002 ; P16F84.INC  Standard Header File, Version 2.00    Microchip Technology, Inc.

                    00136         LIST

                    00003

  0000000F          00004 kol EQU .15                     ;для реализации задержки

  00000010          00005 name EQU 0x10

  0000000C          00006 adr EQU 0x0c

                    00007

0000                00008         org 0                   ;адрес сегмента размещения начала программы

0000                00009 main

0000 2006           00010         call init

0001 300C           00011         movlw .12

0002 008F           00012         movwf kol

0003 201F           00013         call proc1

0004 2036           00014         call proc2

                    00015

0005 2800           00016         goto main               ;зацикливание основной программы

                    00017        

0006 304B           00018 init    movlw 'B'

0007 0090           00019         movwf name

0008 3075           00020         movlw 'o'

0009 0091           00021         movwf name+1

000A 3063           00022         movlw 'g'

000B 0092           00023         movwf name+2   

000C 3068           00024         movlw 'a'

000D 0093           00025         movwf name+3           

000E 3065           00026         movlw 'c'

000F 0094           00027         movwf name+4           

0010 3072           00028         movlw 'h'

0011 0095           00029         movwf name+5           

0012 3065           00030         movlw 'e'

0013 0096           00031         movwf name+6           

0014 306E           00032         movlw 'v'

0015 0097           00033         movwf name+7           

0016 306B           00034         movlw ' '

0017 0098           00035         movwf name+8           

0018 306F           00036         movlw 'A'

0019 0099           00037         movwf name+9           

001A 3020           00038         movlw ' '

001B 009A           00039         movwf name+0x0a        

001C 304D           00040         movlw 'S'              

001D 009B           00041         movwf name+0x0b

001E 0008           00042         return

                    00043

001F 3010           00044 proc1   movlw 0x10

0020 0084           00045         movwf FSR

0021 1283           00046 m1      bcf STATUS,RP0

0022 0800           00047         movf INDF,w

0023 0088           00048         movwf EEDATA

0024 0804           00049         movfw FSR

0025 0089           00050         movwf EEADR

MPASM 02.20 Released          LAB_444.ASM   4-11-2004  22:17:39         PAGE  2

LOC  OBJECT CODE     LINE SOURCE TEXT

  VALUE

0026 1683           00051         bsf STATUS,RP0

0027 1508           00052         bsf EECON1,WREN

0028 1208           00053         bcf EECON1,EEIF

0029 138B           00054         bcf INTCON,GIE

002A 3055           00055         movlw 0x55

002B 0089           00056         movwf EECON2