Page 243 - Programming Microcontrollers in C
P. 243

228    Chapter 5  Programming Large 8-Bit Systems

                   3 .list +
                   4 .psect _text
                   5  ; 1 volatile char able;
                   6  ; 2 char baker ;
                   7  ; 3
                   8  ; 4 test(void)
                   9  ; 5 {
                   10 _test:
                   11 0000 3C pshx
                   12 0001 34 des
                   13 0002 30 tsx
                   14 .set OFST=1
                   15 ; 6 char dog;
                   16 ; 7
                   17 ; 8 dog = able;
                   18 0003 F60000 ldab _able
                   19 LL4:
                   20 0006 E700 stab OFST-1,x
                   21 ; 9 dog = able;
                   22 0008 F60000 ldab _able
                   23 LL6:
                   24 000B E700 stab OFST-1,x
                   25 ; 10 able = 0;
                   26 000D 7F0000 clr _able
                   27 LL01:
                   28 ; 11 able = 0;
                   29 0010 7F0000 clr _able
                   30 LL21:
                   31 ; 12 dog = baker;
                   32 0013 F60001 ldab _baker
                   33 ; 13 dog = baker;
                   34 0016 E700 stab OFST-1,x
                   35 ; 14 baker = 0;
                   36 ; 15 baker = 0;
                   37 0018 7F0001 clr _baker
                   38 ; 16 }
                   39 001B 31 ins
                   40 001C 38 pulx
                   41 001D 39 rts
   238   239   240   241   242   243   244   245   246   247   248