ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 1 PC Object I Line Source A 1 ; ZiLOG Z8 Encore! ANSI C Compiler Release 3.51 A 2 ; -noregvar -debug -const=RAM -model=L -nooptlink -reduceopt A 3 ; -norevaa -peephole -localcse -optsize -alias -doublesize=32 A 4 ; -floatsize=32 -bitfieldsize=32 -longsize=32 -charsize=8 A 5 ; -intsize=16 A 6 DEFINE mazer4_TEXT,SPACE=ROM A 7 FILE "..\MAZER4.C" A 8 .debug "C" A 9 SEGMENT FAR_BSS 000000 A 10 _a: 000000 A 11 DS 2*1 A 12 .define "a" A 13 .alias "_a" A 14 .class 83 A 15 .value _a A 16 .type 3 A 17 .type 0 A 18 .endef 000002 A 19 _b: 000002 A 20 DS 2*1 A 21 .define "b" A 22 .alias "_b" A 23 .class 83 A 24 .value _b A 25 .type 3 A 26 .type 0 A 27 .endef 000004 A 28 _d: 000004 A 29 DS 2*1 A 30 .define "d" A 31 .alias "_d" A 32 .class 83 A 33 .value _d A 34 .type 3 A 35 .type 0 A 36 .endef A 37 SEGMENT ROM_DATA A 38 A 39 A 40 ;**************************** _main *************************** A 41 ;Name Addr/Register Size Type A 42 ;_left IMPORT ----- function A 43 ;_rotateL IMPORT ----- function A 44 ;_right IMPORT ----- function A 45 ;_forward IMPORT ----- function A 46 ;_rotateR IMPORT ----- function A 47 ;_reverse IMPORT ----- function A 48 ;_b STATIC 1 variable A 49 ;_a STATIC 1 variable A 50 ;input R15-2 1 variable A 51 A 52 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 2 PC Object I Line Source mazer4.src A 53 ; Aggregate Stack Size: -2 (words) A 54 A 55 A 56 ; 1 #include A 57 ; 2 A 58 ; 3 void forward(int ontime1, int offtime1); A 59 ; 4 void reverse(int ontime1, int offtime1); A 60 ; 5 void left(int ontime1, int offtime1); A 61 ; 6 void rotateL(int ontime1, int offtime1); A 62 ; 7 void right(int ontime1, int offtime1); A 63 ; 8 void rotateR(int ontime1, int offtime1); A 64 ; 9 A 65 ; 10 int a, b, d; A 66 SEGMENT mazer4_TEXT A 67 ; 11 A 68 ; 12 void main() A 69 ; 13 { 000000 A 70 _main: A 71 .define "_main" A 72 .value _main A 73 .class 2 A 74 .type 65 A 75 .type 0 A 76 .endef A 77 .begfunc "main",13,"_main" A 78 .define "input" A 79 .class 1 A 80 .value -2 A 81 .type 3 A 82 .type 0 A 83 .endef 000000 9C02 A 84 LD R9,#2 000002 D6 0000 A 85 CALL __b_frameset0 A 86 ; 14 int input; A 87 ; 15 a=0; A 88 .line 15 000005 E9000000 A 89 LDX _a,#-0 000009 E9000001 A 90 LDX _a+1,#-0 A 91 ; 16 A 92 ; 17 // PAADDR=0x01; A 93 ; 18 PADD=0xff; //Port A all input A 94 .line 18 00000D E9010FD0 A 95 LDX 4048,#1 000011 E9FF0FD1 A 96 LDX 4049,#255 A 97 ; 19 // PBADDR=0x01; A 98 ; 20 PBDD=0x00; //Port B all output A 99 .line 20 000015 E9010FD4 A 100 LDX 4052,#1 000019 E9000FD5 A 101 LDX 4053,#-0 A 102 ; 21 // PCADDR=0x01; A 103 ; 22 PCDD=0xff; //Port C all input A 104 .line 22 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 3 PC Object I Line Source mazer4.src 00001D E9010FD8 A 105 LDX 4056,#1 000021 E9FF0FD9 A 106 LDX 4057,#255 A 107 ; 23 A 108 ; 24 input=PAIN; A 109 .line 24 000025 840FD2 A 110 LDX R0,4050 000028 B0E1 A 111 CLR R1 00002A 89E1FE A 112 LDX -2(RR14),R1 00002D 89E0FF A 113 LDX -1(RR14),R0 A 114 ; 25 input=input&0x70; A 115 .line 25 000030 880EFF A 116 LDX R0,-1(RR14) 000033 56E070 A 117 AND R0,#112 000036 89E0FF A 118 LDX -1(RR14),R0 000039 B0E0 A 119 CLR R0 00003B 89E0FE A 120 LDX -2(RR14),R0 A 121 ; 26 A 122 ; 27 /* PB truth table: hex value: A 123 ; 28 0000 = stop 0x00 A 124 ; 29 0010 = left 0x02 A 125 ; 30 1111 = reverse 0x0f A 126 ; 31 1110 = rotateL 0x0e A 127 ; 32 1000 = right 0x08 A 128 ; 33 1011 = rotateR 0x0b A 129 ; 34 1010 = forward 0x0a A 130 ; 35 A 131 ; 36 Sensor truth table: hex value: A 132 ; 37 000 = reverse 0x00 A 133 ; 38 001 = rotateR 0x01 A 134 ; 39 010 = forward 0x02 A 135 ; 40 011 = right 0x03 A 136 ; 41 100 = rotateL 0x04 A 137 ; 42 101 = 0x05 A 138 ; 43 110 = left 0x06 A 139 ; 44 111 = forward 0x07 A 140 ; 45 */ A 141 ; 46 while(1) A 142 .line 46 A 143 ; 47 { A 144 ; 48 while(input==0x00) A 145 .line 48 00003E 8B 4D A 146 JR _1_L_8 000040 A 147 _1_L_9: 000040 E9000002 A 148 LDX _b,#-0 000044 E9000003 A 149 LDX _b+1,#-0 A 150 ; 49 { A 151 ; 50 for(b=0;b<10;b++){ A 152 .line 50 000048 8B 1F A 153 JR _1_L_6 00004A A 154 _1_L_4: A 155 ; 51 reverse(400,800);} A 156 .line 51 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 4 PC Object I Line Source mazer4.src 00004A 1F7020 A 157 PUSH #32 00004D 1F7003 A 158 PUSH #3 000050 1F7090 A 159 PUSH #144 000053 1F7001 A 160 PUSH #1 000056 D6 0328 A 161 CALL _reverse 000059 50E0 A 162 POP R0 00005B 50E0 A 163 POP R0 00005D 50E0 A 164 POP R0 00005F 50E0 A 165 POP R0 000061 09010003 A 166 ADDX _b+1,#1 000065 19000002 A 167 ADCX _b,#-0 000069 A 168 _1_L_6: A 169 .line 50 000069 A90A0003 A 170 CPX _b+1,#10 00006D 1FA90000 02 A 171 CPCX _b,#0 000072 1B D6 A 172 JR LT,_1_L_4 A 173 ; 52 input=PAIN; A 174 .line 52 000074 840FD2 A 175 LDX R0,4050 000077 B0E1 A 176 CLR R1 000079 89E1FE A 177 LDX -2(RR14),R1 00007C 89E0FF A 178 LDX -1(RR14),R0 A 179 ; 53 input=input&0x70; A 180 .line 53 00007F 880EFF A 181 LDX R0,-1(RR14) 000082 56E070 A 182 AND R0,#112 000085 89E0FF A 183 LDX -1(RR14),R0 000088 B0E0 A 184 CLR R0 00008A 89E0FE A 185 LDX -2(RR14),R0 A 186 ; 54 } 00008D A 187 _1_L_8: A 188 .line 54 00008D 880EFE A 189 LDX R0,-2(RR14) 000090 881EFF A 190 LDX R1,-1(RR14) 000093 A6E100 A 191 CP R1,#0 000096 1FA6E000 A 192 CPC R0,#-0 00009A 6B A4 A 193 JR Z,_1_L_9 A 194 ; 55 while(input==0x10) A 195 .line 55 00009C 8B 38 A 196 JR _1_L_10 00009E A 197 _1_L_11: A 198 ; 56 { A 199 ; 57 rotateR(550,650); A 200 .line 57 00009E 1F708A A 201 PUSH #138 0000A1 1F7002 A 202 PUSH #2 0000A4 1F7026 A 203 PUSH #38 0000A7 1F7002 A 204 PUSH #2 0000AA D6 047C A 205 CALL _rotateR 0000AD 50E0 A 206 POP R0 0000AF 50E0 A 207 POP R0 0000B1 50E0 A 208 POP R0 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 5 PC Object I Line Source mazer4.src 0000B3 50E0 A 209 POP R0 A 210 ; 58 a=1; A 211 .line 58 0000B5 E9000000 A 212 LDX _a,#-0 0000B9 E9010001 A 213 LDX _a+1,#1 A 214 ; 59 input=PAIN; A 215 .line 59 0000BD 840FD2 A 216 LDX R0,4050 0000C0 B0E1 A 217 CLR R1 0000C2 89E1FE A 218 LDX -2(RR14),R1 0000C5 89E0FF A 219 LDX -1(RR14),R0 A 220 ; 60 input=input&0x70; A 221 .line 60 0000C8 880EFF A 222 LDX R0,-1(RR14) 0000CB 56E070 A 223 AND R0,#112 0000CE 89E0FF A 224 LDX -1(RR14),R0 0000D1 B0E0 A 225 CLR R0 0000D3 89E0FE A 226 LDX -2(RR14),R0 A 227 ; 61 } 0000D6 A 228 _1_L_10: A 229 .line 61 0000D6 880EFE A 230 LDX R0,-2(RR14) 0000D9 881EFF A 231 LDX R1,-1(RR14) 0000DC A6E110 A 232 CP R1,#16 0000DF 1FA6E000 A 233 CPC R0,#-0 0000E3 6B B9 A 234 JR Z,_1_L_11 A 235 ; 62 while(input==0x20) A 236 .line 62 0000E5 8B 30 A 237 JR _1_L_13 0000E7 A 238 _1_L_14: A 239 ; 63 { A 240 ; 64 forward(250,950); A 241 .line 64 0000E7 1F70B6 A 242 PUSH #182 0000EA 1F7003 A 243 PUSH #3 0000ED 1F70FA A 244 PUSH #250 0000F0 1F7000 A 245 PUSH #0 0000F3 D6 04D1 A 246 CALL _forward 0000F6 50E0 A 247 POP R0 0000F8 50E0 A 248 POP R0 0000FA 50E0 A 249 POP R0 0000FC 50E0 A 250 POP R0 A 251 ; 65 input=PAIN; A 252 .line 65 0000FE 840FD2 A 253 LDX R0,4050 000101 B0E1 A 254 CLR R1 000103 89E1FE A 255 LDX -2(RR14),R1 000106 89E0FF A 256 LDX -1(RR14),R0 A 257 ; 66 input=input&0x70; A 258 .line 66 000109 880EFF A 259 LDX R0,-1(RR14) 00010C 56E070 A 260 AND R0,#112 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 6 PC Object I Line Source mazer4.src 00010F 89E0FF A 261 LDX -1(RR14),R0 000112 B0E0 A 262 CLR R0 000114 89E0FE A 263 LDX -2(RR14),R0 A 264 ; 67 } 000117 A 265 _1_L_13: A 266 .line 67 000117 880EFE A 267 LDX R0,-2(RR14) 00011A 881EFF A 268 LDX R1,-1(RR14) 00011D A6E120 A 269 CP R1,#32 000120 1FA6E000 A 270 CPC R0,#-0 000124 6B C1 A 271 JR Z,_1_L_14 A 272 ; 68 while(input==0x30) //right A 273 .line 68 000126 8B 4F A 274 JR _1_L_16 000128 A 275 _1_L_17: A 276 ; 69 { A 277 ; 70 rotateR(275,325); A 278 .line 70 000128 1F7045 A 279 PUSH #69 00012B 1F7001 A 280 PUSH #1 00012E 1F7013 A 281 PUSH #19 000131 1F7001 A 282 PUSH #1 000134 D6 047C A 283 CALL _rotateR 000137 50E0 A 284 POP R0 000139 50E0 A 285 POP R0 00013B 50E0 A 286 POP R0 00013D 50E0 A 287 POP R0 A 288 ; 71 right(325,275); A 289 .line 71 00013F 1F7013 A 290 PUSH #19 000142 1F7001 A 291 PUSH #1 000145 1F7045 A 292 PUSH #69 000148 1F7001 A 293 PUSH #1 00014B D6 0427 A 294 CALL _right 00014E 50E0 A 295 POP R0 000150 50E0 A 296 POP R0 000152 50E0 A 297 POP R0 000154 50E0 A 298 POP R0 A 299 ; 72 a=1; A 300 .line 72 000156 E9000000 A 301 LDX _a,#-0 00015A E9010001 A 302 LDX _a+1,#1 A 303 ; 73 input=PAIN; A 304 .line 73 00015E 840FD2 A 305 LDX R0,4050 000161 B0E1 A 306 CLR R1 000163 89E1FE A 307 LDX -2(RR14),R1 000166 89E0FF A 308 LDX -1(RR14),R0 A 309 ; 74 input=input&0x70; A 310 .line 74 000169 880EFF A 311 LDX R0,-1(RR14) 00016C 56E070 A 312 AND R0,#112 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 7 PC Object I Line Source mazer4.src 00016F 89E0FF A 313 LDX -1(RR14),R0 000172 B0E0 A 314 CLR R0 000174 89E0FE A 315 LDX -2(RR14),R0 A 316 ; 75 } 000177 A 317 _1_L_16: A 318 .line 75 000177 880EFE A 319 LDX R0,-2(RR14) 00017A 881EFF A 320 LDX R1,-1(RR14) 00017D A6E130 A 321 CP R1,#48 000180 1FA6E000 A 322 CPC R0,#-0 000184 6B A2 A 323 JR Z,_1_L_17 A 324 ; 76 while(input==0x40) A 325 .line 76 000186 8B 38 A 326 JR _1_L_19 000188 A 327 _1_L_20: A 328 ; 77 { A 329 ; 78 rotateL(550,650); A 330 .line 78 000188 1F708A A 331 PUSH #138 00018B 1F7002 A 332 PUSH #2 00018E 1F7026 A 333 PUSH #38 000191 1F7002 A 334 PUSH #2 000194 D6 03D2 A 335 CALL _rotateL 000197 50E0 A 336 POP R0 000199 50E0 A 337 POP R0 00019B 50E0 A 338 POP R0 00019D 50E0 A 339 POP R0 A 340 ; 79 a=0; A 341 .line 79 00019F E9000000 A 342 LDX _a,#-0 0001A3 E9000001 A 343 LDX _a+1,#-0 A 344 ; 80 input=PAIN; A 345 .line 80 0001A7 840FD2 A 346 LDX R0,4050 0001AA B0E1 A 347 CLR R1 0001AC 89E1FE A 348 LDX -2(RR14),R1 0001AF 89E0FF A 349 LDX -1(RR14),R0 A 350 ; 81 input=input&0x70; A 351 .line 81 0001B2 880EFF A 352 LDX R0,-1(RR14) 0001B5 56E070 A 353 AND R0,#112 0001B8 89E0FF A 354 LDX -1(RR14),R0 0001BB B0E0 A 355 CLR R0 0001BD 89E0FE A 356 LDX -2(RR14),R0 A 357 ; 82 } 0001C0 A 358 _1_L_19: A 359 .line 82 0001C0 880EFE A 360 LDX R0,-2(RR14) 0001C3 881EFF A 361 LDX R1,-1(RR14) 0001C6 A6E140 A 362 CP R1,#64 0001C9 1FA6E000 A 363 CPC R0,#-0 0001CD 6B B9 A 364 JR Z,_1_L_20 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 8 PC Object I Line Source mazer4.src A 365 ; 83 while(input==0x50 && a==1) A 366 .line 83 0001CF 8B 30 A 367 JR _1_L_23 0001D1 A 368 _1_L_24: A 369 ; 84 { A 370 ; 85 rotateR(5500,650); A 371 .line 85 0001D1 1F708A A 372 PUSH #138 0001D4 1F7002 A 373 PUSH #2 0001D7 1F707C A 374 PUSH #124 0001DA 1F7015 A 375 PUSH #21 0001DD D6 047C A 376 CALL _rotateR 0001E0 50E0 A 377 POP R0 0001E2 50E0 A 378 POP R0 0001E4 50E0 A 379 POP R0 0001E6 50E0 A 380 POP R0 A 381 ; 86 input=PAIN; A 382 .line 86 0001E8 840FD2 A 383 LDX R0,4050 0001EB B0E1 A 384 CLR R1 0001ED 89E1FE A 385 LDX -2(RR14),R1 0001F0 89E0FF A 386 LDX -1(RR14),R0 A 387 ; 87 input=input&0x70; A 388 .line 87 0001F3 880EFF A 389 LDX R0,-1(RR14) 0001F6 56E070 A 390 AND R0,#112 0001F9 89E0FF A 391 LDX -1(RR14),R0 0001FC B0E0 A 392 CLR R0 0001FE 89E0FE A 393 LDX -2(RR14),R0 A 394 ; 88 } 000201 A 395 _1_L_23: A 396 .line 88 000201 880EFE A 397 LDX R0,-2(RR14) 000204 881EFF A 398 LDX R1,-1(RR14) 000207 A6E150 A 399 CP R1,#80 00020A 1FA6E000 A 400 CPC R0,#-0 00020E EB 3D A 401 JR NE,_1_L_27 000210 A9010001 A 402 CPX _a+1,#1 000214 1FA90000 00 A 403 CPCX _a,#0 000219 6B B6 A 404 JR Z,_1_L_24 A 405 ; 89 while(input==0x50 && a==0) A 406 .line 89 00021B 8B 30 A 407 JR _1_L_27 00021D A 408 _1_L_28: A 409 ; 90 { A 410 ; 91 rotateL(550,650); A 411 .line 91 00021D 1F708A A 412 PUSH #138 000220 1F7002 A 413 PUSH #2 000223 1F7026 A 414 PUSH #38 000226 1F7002 A 415 PUSH #2 000229 D6 03D2 A 416 CALL _rotateL ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 9 PC Object I Line Source mazer4.src 00022C 50E0 A 417 POP R0 00022E 50E0 A 418 POP R0 000230 50E0 A 419 POP R0 000232 50E0 A 420 POP R0 A 421 ; 92 input=PAIN; A 422 .line 92 000234 840FD2 A 423 LDX R0,4050 000237 B0E1 A 424 CLR R1 000239 89E1FE A 425 LDX -2(RR14),R1 00023C 89E0FF A 426 LDX -1(RR14),R0 A 427 ; 93 input=input&0x70; A 428 .line 93 00023F 880EFF A 429 LDX R0,-1(RR14) 000242 56E070 A 430 AND R0,#112 000245 89E0FF A 431 LDX -1(RR14),R0 000248 B0E0 A 432 CLR R0 00024A 89E0FE A 433 LDX -2(RR14),R0 A 434 ; 94 } 00024D A 435 _1_L_27: A 436 .line 94 00024D 880EFE A 437 LDX R0,-2(RR14) 000250 881EFF A 438 LDX R1,-1(RR14) 000253 A6E150 A 439 CP R1,#80 000256 1FA6E000 A 440 CPC R0,#-0 00025A EB 5C A 441 JR NE,_1_L_30 00025C A9000001 A 442 CPX _a+1,#-0 000260 1FA90000 00 A 443 CPCX _a,#0 000265 6B B6 A 444 JR Z,_1_L_28 A 445 ; 95 while(input==0x60) A 446 .line 95 000267 8B 4F A 447 JR _1_L_30 000269 A 448 _1_L_31: A 449 ; 96 { A 450 ; 97 rotateL(275,325); A 451 .line 97 000269 1F7045 A 452 PUSH #69 00026C 1F7001 A 453 PUSH #1 00026F 1F7013 A 454 PUSH #19 000272 1F7001 A 455 PUSH #1 000275 D6 03D2 A 456 CALL _rotateL 000278 50E0 A 457 POP R0 00027A 50E0 A 458 POP R0 00027C 50E0 A 459 POP R0 00027E 50E0 A 460 POP R0 A 461 ; 98 left(325,275); //left A 462 .line 98 000280 1F7013 A 463 PUSH #19 000283 1F7001 A 464 PUSH #1 000286 1F7045 A 465 PUSH #69 000289 1F7001 A 466 PUSH #1 00028C D6 037D A 467 CALL _left 00028F 50E0 A 468 POP R0 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 10 PC Object I Line Source mazer4.src 000291 50E0 A 469 POP R0 000293 50E0 A 470 POP R0 000295 50E0 A 471 POP R0 A 472 ; 99 a=0; A 473 .line 99 000297 E9000000 A 474 LDX _a,#-0 00029B E9000001 A 475 LDX _a+1,#-0 A 476 ; 100 input=PAIN; A 477 .line 100 00029F 840FD2 A 478 LDX R0,4050 0002A2 B0E1 A 479 CLR R1 0002A4 89E1FE A 480 LDX -2(RR14),R1 0002A7 89E0FF A 481 LDX -1(RR14),R0 A 482 ; 101 input=input&0x70; A 483 .line 101 0002AA 880EFF A 484 LDX R0,-1(RR14) 0002AD 56E070 A 485 AND R0,#112 0002B0 89E0FF A 486 LDX -1(RR14),R0 0002B3 B0E0 A 487 CLR R0 0002B5 89E0FE A 488 LDX -2(RR14),R0 A 489 ; 102 } 0002B8 A 490 _1_L_30: A 491 .line 102 0002B8 880EFE A 492 LDX R0,-2(RR14) 0002BB 881EFF A 493 LDX R1,-1(RR14) 0002BE A6E160 A 494 CP R1,#96 0002C1 1FA6E000 A 495 CPC R0,#-0 0002C5 6B A2 A 496 JR Z,_1_L_31 A 497 ; 103 while(input==0x70) A 498 .line 103 0002C7 8B 30 A 499 JR _1_L_33 0002C9 A 500 _1_L_34: A 501 ; 104 { A 502 ; 105 forward(250,950); A 503 .line 105 0002C9 1F70B6 A 504 PUSH #182 0002CC 1F7003 A 505 PUSH #3 0002CF 1F70FA A 506 PUSH #250 0002D2 1F7000 A 507 PUSH #0 0002D5 D6 04D1 A 508 CALL _forward 0002D8 50E0 A 509 POP R0 0002DA 50E0 A 510 POP R0 0002DC 50E0 A 511 POP R0 0002DE 50E0 A 512 POP R0 A 513 ; 106 input=PAIN; A 514 .line 106 0002E0 840FD2 A 515 LDX R0,4050 0002E3 B0E1 A 516 CLR R1 0002E5 89E1FE A 517 LDX -2(RR14),R1 0002E8 89E0FF A 518 LDX -1(RR14),R0 A 519 ; 107 input=input&0x70; A 520 .line 107 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 11 PC Object I Line Source mazer4.src 0002EB 880EFF A 521 LDX R0,-1(RR14) 0002EE 56E070 A 522 AND R0,#112 0002F1 89E0FF A 523 LDX -1(RR14),R0 0002F4 B0E0 A 524 CLR R0 0002F6 89E0FE A 525 LDX -2(RR14),R0 A 526 ; 108 } 0002F9 A 527 _1_L_33: A 528 .line 108 0002F9 880EFE A 529 LDX R0,-2(RR14) 0002FC 881EFF A 530 LDX R1,-1(RR14) 0002FF A6E170 A 531 CP R1,#112 000302 1FA6E000 A 532 CPC R0,#-0 000306 6B C1 A 533 JR Z,_1_L_34 A 534 ; 109 input=PAIN; A 535 .line 109 000308 840FD2 A 536 LDX R0,4050 00030B B0E1 A 537 CLR R1 00030D 89E1FE A 538 LDX -2(RR14),R1 000310 89E0FF A 539 LDX -1(RR14),R0 A 540 ; 110 input=input&0x70; A 541 .line 110 000313 880EFF A 542 LDX R0,-1(RR14) 000316 56E070 A 543 AND R0,#112 000319 89E0FF A 544 LDX -1(RR14),R0 00031C B0E0 A 545 CLR R0 00031E 89E0FE A 546 LDX -2(RR14),R0 A 547 ; 111 } A 548 .line 111 000321 8D 00 8D A 549 JR _1_L_8 A 550 ; 112 } A 551 .line 112 000324 D6 0000 A 552 CALL __b_framereset 000327 AF A 553 RET A 554 .endfunc "main",112,"_main" A 555 SEGMENT ROM_DATA A 556 A 557 A 558 ;**************************** _reverse *************************** A 559 ;Name Addr/Register Size Type A 560 ;_d STATIC 1 variable A 561 ;offtime1 R15+6 1 parameter A 562 ;ontime1 R15+4 1 parameter A 563 A 564 A 565 ; Aggregate Stack Size: 0 (words) A 566 A 567 A 568 SEGMENT mazer4_TEXT A 569 ; 113 A 570 ; 114 void reverse(int ontime1, int offtime1) A 571 ; 115 { 000328 A 572 _reverse: ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 26-Aug-07 11:32:00 page: 12 PC Object I Line Source mazer4.src A 573 .define "_reverse" A 574 .value _reverse A 575 .class 2 A 576 .type 65 A 577 .type 0 A 578 .endef A 579 .begfunc "reverse",115,"_reverse" A 580 .define "ontime1" A 581 .class 17 A 582 .reg -1 A 583 .type 3 A 584 .type 0 A 585 .endef A 586 .define "offtime1" A 587 .class 17 A 588 .reg -1 A 589 .type 3 A 590 .type 0 A 591 .endef 000328 D6 0000 A 592 CALL __b_frameset00 A 593 ; 116 PBOUT=0x0f; // reverse A 594 .line 116 00032B E90F0FD7 A 595 LDX 4055,#15 00032F E9000004 A 596 LDX _d,#-0 000333 E9000005 A 597 LDX _d+1,#-0 A 598 ; 117 for(d=0;d