                         .module finally.c
 0000                   .dbfile finally.c
                         .area text
                       ;  IX -> 0,x
 0000                 _SCI_isr::
 0000                   .dbfile C:\ICCTJP\include/isrdecl.h
 0000                   .dbfunc SCI_isr
 0000                   .dbline 41
                       ; /************************************************************************************************************************
                       ; *   Program:        finally.c                           *
                       ; *   Description:    This program was written to test the pneumatic                      *
                       ; *                   valves and cylinders.  It will prompt the user  *
                       ; *                   to select the desired function (manual or       *
                       ; *                   automatic positioning) and to select the desired      *
                       ; *                   characteristics of the PWM signal for the       *
                       ; *                   valves.                 *
                       ; *   Programmer:     Scott Nortman                   *
                       ; *   Date:           March, 2000                 *
                       ; ************************************************************************************************************************/
                       ; 
                       ; /**************************** Constants *********************************/
                       ; #define pulse_handler TOC2_isr
                       ; #define tolerance 10 
                       ; #define valve_sensor analog(1)
                       ; /**************************** End of Constants **************************/
                       ; 
                       ; /*************************** Interrupts *********************************/
                       ; #pragma interrupt_handler TOC2_isr, RTI_isr, TOF_isr;
                       ; /*************************** End of Interrupts **************************/
                       ; 
                       ; /************************** Includes ************************************/
                       ; #include <tjpbase.h>
                       ; #include <analog.h>
                       ; #include <vectors.h>
                       ; #include <mil.h>
                       ; #include <hc11.h>
                       ; /************************ End of includes *******************************/
                       ; 
                       ; /************************** Global Variables*****************************/
                       ; long duty_cycle;    //duty_cycle in e clocks
                       ; long period;        //period in e clocks
                       ; int error[3] = {0};
                       ; int desired = 150;
                       ; long count = 0;
                       ;     
                       ; /************************ End of Global Variables ***********************/
                       ; 
                       ; 
                       ; /************************** Function Declarations  **********************/
 0000                 L2:
 0000 3B                rti
                       ;  IX -> 0,x
 0001                 _SPI_isr::
 0001                   .dbfunc SPI_isr
 0001                   .dbline 47
                       ; void init_pulse();      //Initilizes TOC for PWM interrupts
                       ; void pulse_handler();   //This is the function executed at each TOC2_isr
                       ; /******************** End of Function Declarations  *********************/
                       ; 
                       ; 
                       ; /**************************** Main **************************************/
 0001                 L3:
 0001 3B                rti
                       ;  IX -> 0,x
 0002                 _PAIE_isr::
 0002                   .dbfunc PAIE_isr
 0002                   .dbline 53
                       ; 
                       ; void main(void)
                       ; {
                       ;     int Mp, Md;
                       ;     int Kp, Kd;
                       ;     /* VT100 clear screen */ 
 0002                 L4:
 0002 3B                rti
                       ;  IX -> 0,x
 0003                 _PAV_isr::
 0003                   .dbfunc PAV_isr
 0003                   .dbline 59
                       ;     char clear[]= "\x1b\x5B\x32\x4A\x04"; 
                       ;     
                       ;     /* VT100 position cursor at (x,y) = (3,12) command is "\x1b[3;12H"*/
                       ;     char place[]= "\x1b[1;1H";  /*Home*/
                       ;  
                       ;     SET_BIT(PACTL, 0x80);
 0003                 L5:
 0003 3B                rti
                       ;  IX -> 0,x
 0004                 _TOC3_isr::
 0004                   .dbfunc TOC3_isr
 0004                   .dbline 89
                       ;     CLEAR_BIT(PACTL, 0x03);     //Set RTI rate
                       ;     SET_BIT(TMSK2, 0x40);       //Enable RTI interrupt
                       ;         
                       ;     init_pulse();
                       ;     init_analog();
                       ;     init_serial();
                       ; 
                       ;     //printf("%s", clear);  
                       ;     //printf("%s", place);
                       ;     
                       ;     printf("\tTitle:\t\tvalve.c\n"
                       ;   "\tProgrammer:\tScott Nortman\n"
                       ;   "\tDate:\t\tMarch, 2000\n"
                       ;   "\tVersion\t\t1\n\n");
                       ;   
                       ;     printf("PNEUMATIC CYLINDER DIAGNOSTIC PROGRAM\n\n");
                       ;     //printf("Enter the desired period in e clocks:\n");
                       ;     //period = (read_int() * 1000);
                       ;     printf("Enter the proportional gain\n");
                       ;     Kp = read_int();
                       ;     printf("Enter the derivative gain\n");
                       ;     Kd = read_int();
                       ;     INTR_ON();
                       ;     desired = 150;
                       ; 
                       ;     
                       ;     
                       ;     while(1)
                       ;     {
                       ;         
 0004                 L6:
 0004 3B                rti
                       ;  IX -> 0,x
 0005                 _TIC3_isr::
 0005                   .dbfunc TIC3_isr
 0005                   .dbline 101
                       ;         //Proportional control
                       ;         Mp = Kp * error[0];
                       ;         //Derivative Control
                       ;         Md = Kd * (error[0] - error[1]);
                       ;         
                       ;         period = Mp + Md;
                       ;         duty_cycle = (period / 2);
                       ;     
                       ;         if (duty_cycle < 0)
                       ;         {
                       ;             duty_cycle = -1 * duty_cycle;
                       ;             CLEAR_BIT(PORTA, 0x20);
 0005                 L7:
 0005 3B                rti
                       ;  IX -> 0,x
 0006                 _TIC2_isr::
 0006                   .dbfunc TIC2_isr
 0006                   .dbline 107
                       ;         }
                       ;         else
                       ;         {
                       ;             SET_BIT(PORTA, 0x20);
                       ;         }
                       ;         
 0006                 L8:
 0006 3B                rti
                       ;  IX -> 0,x
 0007                 _TIC1_isr::
 0007                   .dbfunc TIC1_isr
 0007                   .dbline 113
                       ;     }/*End While*/
                       ;     
                       ; }/*End Main*/
                       ; 
                       ; 
                       ; /**************************** End of Main *******************************/
 0007                 L9:
 0007 3B                rti
                       ;  IX -> 0,x
 0008                 _IRQ_isr::
 0008                   .dbfunc IRQ_isr
 0008                   .dbline 125
                       ; 
                       ; 
                       ; 
                       ; /************************** Function Defintions *************************/
                       ; 
                       ; void init_pulse(void)
                       ; {
                       ;     INTR_OFF();
                       ;     SET_BIT(TCTL1, 0x80);   //Enable OC2 for falling edge on first sucessful compare (safe default)
                       ;     CLEAR_BIT(TCTL1, 0x40);
                       ;     TOC2 = 0;   //Set TOC2 to zero
                       ;     SET_BIT(TMSK1, 0x40);   //Enable OC2 mask
 0008                 L10:
 0008 3B                rti
                       ;  IX -> 0,x
 0009                 _XIRQ_isr::
 0009                   .dbfunc XIRQ_isr
 0009                   .dbline 131
                       ;     //INTR_ON();
                       ;     
                       ;     printf("End of Init pulse\n\n");
                       ; }
                       ; 
                       ; void pulse_handler()
 0009                 L11:
 0009 3B                rti
                       ;  IX -> 0,x
 000A                 _SWI_isr::
 000A                   .dbfunc SWI_isr
 000A                   .dbline 137
                       ; {   //printf("ISR\n");
                       ; 
                       ; 
                       ;     //enable toggle
                       ;     //CLEAR_BIT(TCTL1, 0x80);
                       ;     //SET_BIT(TCTL1, 0x40);
 000A                 L12:
 000A 3B                rti
                       ;  IX -> 0,x
 000B                 _ILLOP_isr::
 000B                   .dbfunc ILLOP_isr
 000B                   .dbline 143
                       ;     if (duty_cycle <= 100)  
                       ;     //This handles if duty cycle is less than or equal to 100 e clocks ( almost always off)
                       ;     {
                       ;         SET_BIT(TCTL1, 0x80);   //Enable OC2 for falling edge (make sure pin goes low)
                       ;         CLEAR_BIT(TCTL1, 0X40);
                       ;         TOC2 += period;         //Add the period to TOC2
 000B                 L13:
 000B 3B                rti
                       ;  IX -> 0,x
 000C                 _COP_isr::
 000C                   .dbfunc COP_isr
 000C                   .dbline 149
                       ;     }
                       ;     
                       ;     else if ((period - duty_cycle) <= 100)  //This handles what to do if the pin should almost always be high
                       ;     {
                       ;         CLEAR_BIT(TCTL1, 0x80); //Set the pin to rising edge
                       ;         SET_BIT(TCTL1, 0X40);
 000C                 L14:
 000C 3B                rti
                       ;  IX -> 0,x
 000D                 _CLMON_isr::
 000D                   .dbfunc CLMON_isr
 000D                   .dbline 155
                       ;         TOC2 += period;         //Add period
                       ;     }
                       ;     
                       ;     else        //This is for the general case
                       ;     {
                       ;         if (TCTL1 & 0x40)   //Test bit 6.  If it is a one, you are now high and must change to go low
 000D                 L15:
 000D 3B                rti
                         .area data
 0000                 _drew::
 0000                   .blkw 1
                         .area idata
 0000 0000              .word _interrupt_vectors
                         .area data
 0002                 _error::
 0002                   .blkb 2
                         .area idata
 0002 0000              .word 0
                         .area data
 0004                   .blkb 4
                         .area idata
 0004 00000000          .byte 0,0,0,0
                         .area data
 0008                 _desired::
 0008                   .blkb 2
                         .area idata
 0008 0096              .word 150
                         .area data
 000A                 _count::
 000A                   .blkb 4
                         .area idata
 000A 00000000          .word 0,0
                         .area text
 000E                 L17:
 000E 1B5B324A0400      .byte 27,91,50,'J,4,0
 0014                 L18:
 0014 1B5B313B314800    .byte 27,91,49,59,49,'H,0
                       ;  lreg1 -> -4,x
                       ;  lreg2 -> -8,x
                       ;  IX -> 0,x
                       ;          place -> 3,x
                       ;          clear -> 10,x
                       ;             Kd -> 16,x
                       ;             Kp -> 18,x
                       ;             Md -> 20,x
                       ;             Mp -> 22,x
 001B                 _main::
 001B BD0000            jsr __enterb
 001E 98                .byte 0x98
 001F                   .dbfile finally.c
 001F                   .dbfunc main
 001F                   .dbline 54
 001F EC00              ldd 0,x
 0021 C3000A            addd #10
 0024 18CE000E          ldy #L17
 0028 3C                pshx
 0029 8F                xgdx
 002A CC0006            ldd #6
 002D BD0000            jsr __asgnblk
 0030 38                pulx
 0031                   .dbline 57
 0031 EC00              ldd 0,x
 0033 C30003            addd #3
 0036 18CE0014          ldy #L18
 003A 3C                pshx
 003B 8F                xgdx
 003C CC0007            ldd #7
 003F BD0000            jsr __asgnblk
 0042 38                pulx
 0043                   .dbline 59
 0043 18CE1026          ldy #0x1026
 0047 181C0080          bset 0,y,#128
 004B                   .dbline 60
 004B 18CE1026          ldy #0x1026
 004F 181D0003          bclr 0,y,#0x3
 0053                   .dbline 61
 0053 18CE1024          ldy #0x1024
 0057 181C0040          bset 0,y,#64
 005B                   .dbline 63
 005B BD0118            jsr _init_pulse
 005E                   .dbline 64
 005E BD0000            jsr _init_analog
 0061                   .dbline 65
 0061 BD0000            jsr _init_serial
 0064                   .dbline 70
 0064 CC035D            ldd #L19
 0067 BD0000            jsr _printf
 006A                   .dbline 75
 006A CC0335            ldd #L20
 006D BD0000            jsr _printf
 0070                   .dbline 78
 0070 CC0318            ldd #L21
 0073 BD0000            jsr _printf
 0076                   .dbline 79
 0076 BD0000            jsr _read_int
 0079 ED12              std 18,x
 007B                   .dbline 80
 007B CC02FD            ldd #L22
 007E BD0000            jsr _printf
 0081                   .dbline 81
 0081 BD0000            jsr _read_int
 0084 ED10              std 16,x
 0086 0E                        cli
                       
 0087                   .dbline 83
 0087 CC0096            ldd #150
 008A FD0008            std _desired
 008D 7E010D            jmp L24
 0090                 L23:
 0090                   .dbline 91
 0090 EC12              ldd 18,x
 0092 18FE0002          ldy _error
 0096 BD0000            jsr __muli
 0099 ED16              std 22,x
 009B                   .dbline 93
 009B FC0002            ldd _error
 009E B30004            subd _error+2
 00A1 188F              xgdy
 00A3 EC10              ldd 16,x
 00A5 BD0000            jsr __muli
 00A8 ED14              std 20,x
 00AA                   .dbline 95
 00AA EC16              ldd 22,x
 00AC E314              addd 20,x
 00AE BD0000            jsr __d2lreg
 00B1 18CE0000          ldy #_period
 00B5 BD0000            jsr __lreg2y
 00B8                   .dbline 96
 00B8 18CE0000          ldy #_period
 00BC BD0000            jsr __ly2reg
 00BF 18CE02F9          ldy #L27
 00C3 BD0000            jsr __ly2reg2
 00C6 BD0000            jsr __ldiv
 00C9 18CE0004          ldy #_duty_cycle
 00CD BD0000            jsr __lreg2y
 00D0                   .dbline 98
 00D0 18CE0004          ldy #_duty_cycle
 00D4 BD0000            jsr __ly2reg
 00D7 18CE02F5          ldy #L30
 00DB BD0000            jsr __ly2reg2
 00DE BD0000            jsr __lcmp
 00E1 2C22              bge L28
 00E3                   .dbline 100
 00E3 18CE02F1          ldy #L31
 00E7 BD0000            jsr __ly2reg
 00EA 18CE0004          ldy #_duty_cycle
 00EE BD0000            jsr __ly2reg2
 00F1 BD0000            jsr __lmul
 00F4 18CE0004          ldy #_duty_cycle
 00F8 BD0000            jsr __lreg2y
 00FB                   .dbline 101
 00FB 18CE1000          ldy #0x1000
 00FF 181D0020          bclr 0,y,#0x20
 0103                   .dbline 102
 0103 2008              bra L29
 0105                 L28:
 0105                   .dbline 105
 0105 18CE1000          ldy #0x1000
 0109 181C0020          bset 0,y,#32
 010D                   .dbline 106
 010D                 L29:
 010D                   .dbline 108
 010D                 L24:
 010D                   .dbline 87
 010D 7E0090            jmp L23
 0110                 L16:
 0110 8F                xgdx
 0111 C30018            addd #24
 0114 8F                xgdx
 0115 35                txs
 0116 38                pulx
 0117 39                rts
                       ;  IX -> 0,x
 0118                 _init_pulse::
 0118 0F                        sei
                       
 0119                   .dbfunc init_pulse
 0119                   .dbline 122
 0119 18CE1020          ldy #0x1020
 011D 181C0080          bset 0,y,#128
 0121                   .dbline 123
 0121 18CE1020          ldy #0x1020
 0125 181D0040          bclr 0,y,#0x40
 0129                   .dbline 124
 0129 CC0000            ldd #0
 012C FD1018            std 0x1018
 012F                   .dbline 125
 012F 18CE1022          ldy #0x1022
 0133 181C0040          bset 0,y,#64
 0137                   .dbline 128
 0137 CC02DD            ldd #L33
 013A BD0000            jsr _printf
 013D                   .dbline 129
 013D                 L32:
 013D 39                rts
                       ;  lreg1 -> -4,x
                       ;  lreg2 -> -8,x
                       ;  IX -> 0,x
 013E                 _TOC2_isr::
 013E BD0000            jsr __enterb
 0141 82                .byte 0x82
 0142                   .dbfunc TOC2_isr
 0142                   .dbline 138
 0142 18CE0004          ldy #_duty_cycle
 0146 BD0000            jsr __ly2reg
 0149 18CE02D9          ldy #L37
 014D BD0000            jsr __ly2reg2
 0150 BD0000            jsr __lcmp
 0153 2E29              bgt L35
 0155                   .dbline 141
 0155 18CE1020          ldy #0x1020
 0159 181C0080          bset 0,y,#128
 015D                   .dbline 142
 015D 18CE1020          ldy #0x1020
 0161 181D0040          bclr 0,y,#0x40
 0165                   .dbline 143
 0165 18CE0000          ldy #_period
 0169 BD0000            jsr __ly2reg2
                         ; vol
 016C FC1018            ldd 0x1018
 016F BD0000            jsr __ud2lreg
 0172 BD0000            jsr __ladd
 0175 BD0000            jsr __lreg2d
 0178 FD1018            std 0x1018
 017B                   .dbline 144
 017B 7E021F            jmp L36
 017E                 L35:
 017E                   .dbline 146
 017E 18CE0000          ldy #_period
 0182 BD0000            jsr __ly2reg
 0185 18CE0004          ldy #_duty_cycle
 0189 BD0000            jsr __ly2reg2
 018C BD0000            jsr __lsub
 018F 18CE02D9          ldy #L37
 0193 BD0000            jsr __ly2reg2
 0196 BD0000            jsr __lcmp
 0199 2E28              bgt L38
 019B                   .dbline 148
 019B 18CE1020          ldy #0x1020
 019F 181D0080          bclr 0,y,#0x80
 01A3                   .dbline 149
 01A3 18CE1020          ldy #0x1020
 01A7 181C0040          bset 0,y,#64
 01AB                   .dbline 150
 01AB 18CE0000          ldy #_period
 01AF BD0000            jsr __ly2reg2
                         ; vol
 01B2 FC1018            ldd 0x1018
 01B5 BD0000            jsr __ud2lreg
 01B8 BD0000            jsr __ladd
 01BB BD0000            jsr __lreg2d
 01BE FD1018            std 0x1018
 01C1                   .dbline 151
 01C1 205C              bra L39
 01C3                 L38:
 01C3                   .dbline 155
 01C3 18CE1020          ldy #0x1020
 01C7 181F004028        brclr 0,y,#64,L40
 01CC                   .dbline 157
                       ;         {
                       ;             CLEAR_BIT(TCTL1, 0x40);  //Clear bit 6 to set for falling edge on next interrupt
 01CC 18CE1020          ldy #0x1020
 01D0 181D0040          bclr 0,y,#0x40
 01D4                   .dbline 158
                       ;             SET_BIT(TCTL1, 0X80);
 01D4 18CE1020          ldy #0x1020
 01D8 181C0080          bset 0,y,#128
 01DC                   .dbline 159
                       ;             TOC2 += duty_cycle;     //Add the duty cycle e clocks if you are now high
 01DC 18CE0004          ldy #_duty_cycle
 01E0 BD0000            jsr __ly2reg2
                         ; vol
 01E3 FC1018            ldd 0x1018
 01E6 BD0000            jsr __ud2lreg
 01E9 BD0000            jsr __ladd
 01EC BD0000            jsr __lreg2d
 01EF FD1018            std 0x1018
 01F2                   .dbline 160
                       ;         }
 01F2 202B              bra L41
 01F4                 L40:
 01F4                   .dbline 164
                       ;         
                       ;         else //if(!(TCTL1 & 0x40))  //Test bit 6.  If it is low, you are now low and must change to go high
                       ;         {
                       ;             SET_BIT(TCTL1, 0xC0);   //Set bit 6 to go high next interrupt
 01F4 18CE1020          ldy #0x1020
 01F8 181C00C0          bset 0,y,#192
 01FC                   .dbline 165
                       ;             TOC2 += (period - duty_cycle);
 01FC 18CE0000          ldy #_period
 0200 BD0000            jsr __ly2reg
 0203 18CE0004          ldy #_duty_cycle
 0207 BD0000            jsr __ly2reg2
 020A BD0000            jsr __lsub
 020D BD0000            jsr __lregmov
                         ; vol
 0210 FC1018            ldd 0x1018
 0213 BD0000            jsr __ud2lreg
 0216 BD0000            jsr __ladd
 0219 BD0000            jsr __lreg2d
 021C FD1018            std 0x1018
 021F                   .dbline 166
                       ;         }
 021F                 L41:
 021F                   .dbline 167
                       ;     }
 021F                 L39:
 021F                 L36:
 021F                   .dbline 170
                       ;     
                       ;     
                       ;     CLEAR_FLAG(TFLG1, 0x40) //Clear the interrupt flag
 021F 18CE1023          ldy #0x1023
 0223 181D00BF          bclr 0,y,#0xbf
 0227                   .dbline 171
                       ; }   //This is the end of the interrupt routine
 0227                 L34:
 0227 08                inx
 0228 08                inx
 0229 35                txs
 022A 38                pulx
 022B 3B                rti
                       ;  lreg1 -> -4,x
                       ;  lreg2 -> -8,x
                       ;  IX -> 0,x
                       ;  func temp: 2,x - 4,x
 022C                 _RTI_isr::
 022C BD0000            jsr __enterb
 022F 84                .byte 0x84
 0230                   .dbfunc RTI_isr
 0230                   .dbline 175
                       ; 
                       ; void RTI_isr(void)
                       ; {
                       ;     printf("%d\n", valve_sensor);
 0230 CC0001            ldd #1
 0233 BD0000            jsr _analog
 0236 37                pshb
 0237 36                psha
 0238 CC02D5            ldd #L43
 023B BD0000            jsr _printf
 023E 1838              puly
 0240                   .dbline 176
                       ;     error[2] = error[1];
 0240 FC0004            ldd _error+2
 0243 FD0006            std _error+4
 0246                   .dbline 177
                       ;     error[1] = error[0];
 0246 FC0002            ldd _error
 0249 FD0004            std _error+2
 024C                   .dbline 178
                       ;     error[0] = desired - valve_sensor;
 024C CC0001            ldd #1
 024F BD0000            jsr _analog
 0252 ED02              std 2,x
 0254 FC0008            ldd _desired
 0257 A302              subd 2,x
 0259 FD0002            std _error
 025C                   .dbline 179
                       ;     count += 1;
 025C 18CE000A          ldy #_count
 0260 BD0000            jsr __ly2reg
 0263 18CE02D1          ldy #L47
 0267 BD0000            jsr __ly2reg2
 026A BD0000            jsr __ladd
 026D 18CE000A          ldy #_count
 0271 BD0000            jsr __lreg2y
 0274                   .dbline 180
                       ;     if (count >=500)
 0274 18CE000A          ldy #_count
 0278 BD0000            jsr __ly2reg
 027B 18CE02CD          ldy #L50
 027F BD0000            jsr __ly2reg2
 0282 BD0000            jsr __lcmp
 0285 2D2E              blt L48
 0287                   .dbline 182
                       ;     {
                       ;         count = 0;
 0287 18CE02F5          ldy #L30
 028B BD0000            jsr __ly2reg
 028E 18CE000A          ldy #_count
 0292 BD0000            jsr __lreg2y
 0295                   .dbline 183
                       ;         if (desired == 150)
 0295 FC0008            ldd _desired
 0298 1A830096          cpd #150
 029C 2608              bne L51
 029E                   .dbline 185
                       ;         {
                       ;             desired = 100;
 029E CC0064            ldd #100
 02A1 FD0008            std _desired
 02A4                   .dbline 186
                       ;         }
 02A4 200F              bra L52
 02A6                 L51:
 02A6                   .dbline 188
                       ;         
                       ;         else if (desired == 100)
 02A6 FC0008            ldd _desired
 02A9 1A830064          cpd #100
 02AD 2606              bne L53
 02AF                   .dbline 190
                       ;         {
                       ;             desired = 150;
 02AF CC0096            ldd #150
 02B2 FD0008            std _desired
 02B5                   .dbline 191
                       ;         }
 02B5                 L53:
 02B5                 L52:
 02B5                   .dbline 192
                       ;     }
 02B5                 L48:
 02B5                   .dbline 193
                       ;     CLEAR_FLAG(TFLG2, 0x40);
 02B5 18CE1025          ldy #0x1025
 02B9 181D00BF          bclr 0,y,#0xbf
 02BD                   .dbline 194
                       ; }
 02BD                 L42:
 02BD 08                inx
 02BE 08                inx
 02BF 08                inx
 02C0 08                inx
 02C1 35                txs
 02C2 38                pulx
 02C3 3B                rti
                       ;  IX -> 0,x
 02C4                 _TOF_isr::
 02C4                   .dbfunc TOF_isr
 02C4                   .dbline 198
                       ; 
                       ; void TOF_isr(void)
                       ; {
                       ;     CLEAR_FLAG(TFLG1, 0x80);
 02C4 18CE1023          ldy #0x1023
 02C8 181D007F          bclr 0,y,#0x7f
 02CC                   .dbline 199
                       ; }
 02CC                 L55:
 02CC 3B                rti
                         .area bss
 0000                 _period::
 0000                   .blkb 4
 0004                 _duty_cycle::
 0004                   .blkb 4
 0008                 _timertjp::
 0008                   .blkb 2
 000A                 _days::
 000A                   .blkb 2
 000C                 _hours::
 000C                   .blkb 2
 000E                 _minutes::
 000E                   .blkb 2
 0010                 _seconds::
 0010                   .blkb 2
 0012                 _msec::
 0012                   .blkb 2
                         .area text
 02CD                 L50:
 02CD 000001F4          .word 0,500
 02D1                 L47:
 02D1 00000001          .word 0,1
 02D5                 L43:
 02D5 25640A00          .byte 37,'d,10,0
 02D9                 L37:
 02D9 00000064          .word 0,100
 02DD                 L33:
 02DD 456E64206F6620496E69742070756C73  .byte 'E,'n,'d,32,'o,'f,32,'I,'n,'i,'t,32,'p,'u,'l,'s
 02ED 650A0A00          .byte 'e,10,10,0
 02F1                 L31:
 02F1 FFFFFFFF          .word 65535,65535
 02F5                 L30:
 02F5 00000000          .word 0,0
 02F9                 L27:
 02F9 00000002          .word 0,2
 02FD                 L22:
 02FD 456E7465722074686520646572697661  .byte 'E,'n,'t,'e,'r,32,'t,'h,'e,32,'d,'e,'r,'i,'v,'a
 030D 74697665206761696E0A00    .byte 't,'i,'v,'e,32,'g,'a,'i,'n,10,0
 0318                 L21:
 0318 456E746572207468652070726F706F72  .byte 'E,'n,'t,'e,'r,32,'t,'h,'e,32,'p,'r,'o,'p,'o,'r
 0328 74696F6E616C206761696E0A00    .byte 't,'i,'o,'n,'a,'l,32,'g,'a,'i,'n,10,0
 0335                 L20:
 0335 504E45554D415449432043594C494E44  .byte 'P,'N,'E,'U,'M,'A,'T,'I,'C,32,'C,'Y,'L,'I,'N,'D
 0345 455220444941474E4F53544943205052  .byte 'E,'R,32,'D,'I,'A,'G,'N,'O,'S,'T,'I,'C,32,'P,'R
 0355 4F4752414D0A0A00  .byte 'O,'G,'R,'A,'M,10,10,0
 035D                 L19:
 035D 095469746C653A090976616C76652E63  .byte 9,'T,'i,'t,'l,'e,58,9,9,'v,'a,'l,'v,'e,46,'c
 036D 0A0950726F6772616D6D65723A095363  .byte 10,9,'P,'r,'o,'g,'r,'a,'m,'m,'e,'r,58,9,'S,'c
 037D 6F7474204E6F72746D616E0A09446174  .byte 'o,'t,'t,32,'N,'o,'r,'t,'m,'a,'n,10,9,'D,'a,'t
 038D 653A09094D617263682C20323030300A  .byte 'e,58,9,9,'M,'a,'r,'c,'h,44,32,50,48,48,48,10
 039D 0956657273696F6E0909310A0A00  .byte 9,'V,'e,'r,'s,'i,'o,'n,9,9,49,10,10,0
