                        .module LEDCONtest.c
                        .area text
 0000           L4:
 0000 4945454500        .byte 'I,'E,'E,'E,0
 0005           L5:
 0005 B587              .word 46471
 0007 B586              .word 46470
 0009 B585              .word 46469
 000B B584              .word 46468
 000D B58F              .word 46479
 000F B58E              .word 46478
 0011 B58D              .word 46477
 0013 B58C              .word 46476
 0015           ;  IX -> 0,x
 0015           ;  rMEM -> 2,x
 0015           ;          count -> +4,x
 0015           ;          digit -> +6,x
 0015           ;         string -> +22,x
 0015           ;          ascii -> +27,x
 0015           ;             ad -> +28,x
 0015           ;            cnt -> +30,x
 0015           _main::
 0015 BD0000            jsr __enterb
 0018 20                .byte 0x20
 0019           ; #include <hc11.h>
 0019           ; #include <stdio.h>
 0019           ; 
 0019           ; void timmy (unsigned int, unsigned char);
 0019           ; 
 0019           ; void main (void)
 0019           ; {      
 0019           ;        unsigned int ad;
 0019           ;        unsigned char ascii;
 0019           ;        int cnt, count=0;
 0019 CC0000            ldd #0
 001C ED04              std 4,x
 001E           ;        unsigned char string[]="IEEE";
 001E EC00              ldd 0,x
 0020 C30016            addd #22
 0023 18CE0000          ldy #L4
 0027 3C                pshx
 0028 8F                xgdx
 0029 CC0005            ldd #5
 002C BD0000            jsr __asgnblk
 002F 38                pulx
 0030           ;        unsigned int digit[8] = {0xb587, 0xb586, 0xb585, 0xb584,0xb58f, 0xb58e, 0xb58d,
 0030 EC00              ldd 0,x
 0032 C30006            addd #6
 0035 18CE0005          ldy #L5
 0039 3C                pshx
 003A 8F                xgdx
 003B CC0010            ldd #16
 003E BD0000            jsr __asgnblk
 0041 38                pulx
 0042           ;                                          0xb58c};
 0042           ;                                        
 0042           ;        asm (" ldaa #$02");
 0042 8602                       ldaa #$02
 0044           
 0044           ;        asm (" staa $b580");
 0044 B7B580                     staa $b580
 0047           
 0047           ;        asm (" staa $b588");
 0047 B7B588                     staa $b588
 004A           
 004A           ;        
 004A           ;        for(cnt=0; cnt<=3; cnt++)
 004A CC0000            ldd #0
 004D ED1E              std 30,x
 004F           L6:
 004F EC00              ldd 0,x
 0051 C30016            addd #22
 0054 ED02              std 2,x
 0056 EC1E              ldd 30,x
 0058 E302              addd 2,x
 005A 188F              xgdy
 005C 18E600            ldab 0,y
 005F E71B              stab 27,x
 0061 EC00              ldd 0,x
 0063 C30006            addd #6
 0066 ED02              std 2,x
 0068 EC1E              ldd 30,x
 006A 05                lsld
 006B E302              addd 2,x
 006D 188F              xgdy
 006F 18EC00            ldd 0,y
 0072 ED1C              std 28,x
 0074 A61B                       ldaa 27,x
 0076           
 0076 1AEE1C                     ldy 28,x
 0079           
 0079 18A700                     staa 0,y
 007C           
 007C           L7:
 007C EC1E              ldd 30,x
 007E C30001            addd #1
 0081 ED1E              std 30,x
 0083 EC1E              ldd 30,x
 0085 1A830003          cpd #3
 0089 2FC4              ble L6
 008B           ;        {
 008B           ;        ascii=string[cnt];
 008B           ;        ad=digit[cnt];
 008B           ;        asm (" ldaa %ascii");
 008B           ;        asm (" ldy %ad");
 008B           ;        asm (" staa 0,y");
 008B           ;        }
 008B           ;                
 008B           ;        
 008B           ; }
 008B           L3:
 008B 8F                xgdx
 008C C30020            addd #32
 008F 8F                xgdx
 0090 35                txs
 0091 38                pulx
 0092                   .dbline 0 ; func end
 0092 39                rts
