                        .module SWITCHTEST.c
                        .area text
                ;  IX -> 0,x
                ;         helper -> +2,x
 0000           _main::
 0000 BD0000            jsr __enterb
 0003 04                .byte 0x4
 0004           ; #include <stdio.h>
 0004           ; #include <hc11.h>
 0004           ; #define       limitswitches *(unsigned char volatile *) (0xB5C0)
 0004           ; void main (void)
 0004           ; {
 0004           ;  int helper = 0;
 0004 CC0000            ldd #0
 0007 ED02              std 2,x
 0009 2016              bra L5
 000B           L4:
 000B           	; vol
 000B F6B5C0            ldab 0xb5c0
 000E 4F                clra
 000F 8400              anda #0
 0011 C4F0              andb #240
 0013 ED02              std 2,x
 0015 EC02              ldd 2,x
 0017 37                pshb
 0018 36                psha
 0019 CC002A            ldd #L7
 001C BD0000            jsr _printf
 001F 1838              puly
 0021           L5:
 0021           ;   while (1)
 0021 20E8              bra L4
 0023           X0:
 0023           ;   {
 0023           ;    	helper = limitswitches & 0xF0;
 0023           ;   	 printf (" %X \n", helper );
 0023           ;   }
 0023           ; }  
 0023           L3:
 0023 08                inx
 0024 08                inx
 0025 08                inx
 0026 08                inx
 0027 35                txs
 0028 38                pulx
 0029                   .dbline 0 ; func end
 0029 39                rts
 002A           L7:
 002A 202558200A00      .byte 32,37,'X,32,10,0
