ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01: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 w_breax_TEXT,SPACE=ROM A 7 FILE "..\MAZER1 W BREAX.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 ;_rotateL IMPORT ----- function A 43 ;_forward IMPORT ----- function A 44 ;_rotateR IMPORT ----- function A 45 ;_d STATIC 1 variable A 46 ;_reverse IMPORT ----- function A 47 ;_b STATIC 1 variable A 48 ;_a STATIC 1 variable A 49 ;input R15-2 1 variable A 50 A 51 A 52 ; Aggregate Stack Size: -2 (words) ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 2 PC Object I Line Source mazer1 w breax.src A 53 A 54 A 55 ; 1 #include A 56 ; 2 A 57 ; 3 void forward(int ontime1, int offtime1); A 58 ; 4 void reverse(int ontime1, int offtime1); A 59 ; 5 void left(int ontime1, int offtime1); A 60 ; 6 void rotateL(int ontime1, int offtime1); A 61 ; 7 void right(int ontime1, int offtime1); A 62 ; 8 void rotateR(int ontime1, int offtime1); A 63 ; 9 A 64 ; 10 int a, b, d; A 65 SEGMENT w_breax_TEXT A 66 ; 11 A 67 ; 12 void main() A 68 ; 13 { 000000 A 69 _main: A 70 .define "_main" A 71 .value _main A 72 .class 2 A 73 .type 65 A 74 .type 0 A 75 .endef A 76 .begfunc "main",13,"_main" A 77 .define "input" A 78 .class 1 A 79 .value -2 A 80 .type 3 A 81 .type 0 A 82 .endef 000000 9C02 A 83 LD R9,#2 000002 D6 0000 A 84 CALL __b_frameset0 A 85 ; 14 int input; A 86 ; 15 a=0; A 87 .line 15 000005 E9000000 A 88 LDX _a,#-0 000009 E9000001 A 89 LDX _a+1,#-0 A 90 ; 16 A 91 ; 17 // PAADDR=0x01; A 92 ; 18 PADD=0xff; //Port A all input A 93 .line 18 00000D E9010FD0 A 94 LDX 4048,#1 000011 E9FF0FD1 A 95 LDX 4049,#255 A 96 ; 19 // PBADDR=0x01; A 97 ; 20 PBDD=0x00; //Port B all output A 98 .line 20 000015 E9010FD4 A 99 LDX 4052,#1 000019 E9000FD5 A 100 LDX 4053,#-0 A 101 ; 21 // PCADDR=0x01; A 102 ; 22 PCDD=0xff; //Port C all input A 103 .line 22 00001D E9010FD8 A 104 LDX 4056,#1 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 3 PC Object I Line Source mazer1 w breax.src 000021 E9FF0FD9 A 105 LDX 4057,#255 A 106 ; 23 A 107 ; 24 input=PAIN; A 108 .line 24 000025 840FD2 A 109 LDX R0,4050 000028 B0E1 A 110 CLR R1 00002A 89E1FE A 111 LDX -2(RR14),R1 00002D 89E0FF A 112 LDX -1(RR14),R0 A 113 ; 25 input=input&0x70; A 114 .line 25 000030 880EFF A 115 LDX R0,-1(RR14) 000033 56E070 A 116 AND R0,#112 000036 89E0FF A 117 LDX -1(RR14),R0 000039 B0E0 A 118 CLR R0 00003B 89E0FE A 119 LDX -2(RR14),R0 A 120 ; 26 A 121 ; 27 /* PB truth table: hex value: A 122 ; 28 0000 = stop 0x00 A 123 ; 29 0010 = left 0x02 A 124 ; 30 1111 = reverse 0x0f A 125 ; 31 1110 = rotateL 0x0e A 126 ; 32 1000 = right 0x08 A 127 ; 33 1011 = rotateR 0x0b A 128 ; 34 1010 = forward 0x0a A 129 ; 35 A 130 ; 36 Sensor truth table: hex value: A 131 ; 37 000 = reverse 0x00 A 132 ; 38 001 = rotateR 0x01 A 133 ; 39 010 = forward 0x02 A 134 ; 40 011 = right 0x03 A 135 ; 41 100 = rotateL 0x04 A 136 ; 42 101 = 0x05 A 137 ; 43 110 = left 0x06 A 138 ; 44 111 = forward 0x07 A 139 ; 45 */ A 140 ; 46 while(1) A 141 .line 46 A 142 ; 47 { A 143 ; 48 while(input==0x00) A 144 .line 48 00003E 8B 4D A 145 JR _1_L_8 000040 A 146 _1_L_9: 000040 E9000002 A 147 LDX _b,#-0 000044 E9000003 A 148 LDX _b+1,#-0 A 149 ; 49 { A 150 ; 50 for(b=0;b<10;b++){ A 151 .line 50 000048 8B 1F A 152 JR _1_L_6 00004A A 153 _1_L_4: A 154 ; 51 reverse(400,800);} A 155 .line 51 00004A 1F7020 A 156 PUSH #32 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 4 PC Object I Line Source mazer1 w breax.src 00004D 1F7003 A 157 PUSH #3 000050 1F7090 A 158 PUSH #144 000053 1F7001 A 159 PUSH #1 000056 D6 03CA A 160 CALL _reverse 000059 50E0 A 161 POP R0 00005B 50E0 A 162 POP R0 00005D 50E0 A 163 POP R0 00005F 50E0 A 164 POP R0 000061 09010003 A 165 ADDX _b+1,#1 000065 19000002 A 166 ADCX _b,#-0 000069 A 167 _1_L_6: A 168 .line 50 000069 A90A0003 A 169 CPX _b+1,#10 00006D 1FA90000 02 A 170 CPCX _b,#0 000072 1B D6 A 171 JR LT,_1_L_4 A 172 ; 52 input=PAIN; A 173 .line 52 000074 840FD2 A 174 LDX R0,4050 000077 B0E1 A 175 CLR R1 000079 89E1FE A 176 LDX -2(RR14),R1 00007C 89E0FF A 177 LDX -1(RR14),R0 A 178 ; 53 input=input&0x70; A 179 .line 53 00007F 880EFF A 180 LDX R0,-1(RR14) 000082 56E070 A 181 AND R0,#112 000085 89E0FF A 182 LDX -1(RR14),R0 000088 B0E0 A 183 CLR R0 00008A 89E0FE A 184 LDX -2(RR14),R0 A 185 ; 54 } 00008D A 186 _1_L_8: A 187 .line 54 00008D 880EFE A 188 LDX R0,-2(RR14) 000090 881EFF A 189 LDX R1,-1(RR14) 000093 A6E100 A 190 CP R1,#0 000096 1FA6E000 A 191 CPC R0,#-0 00009A 6B A4 A 192 JR Z,_1_L_9 A 193 ; 55 while(input==0x10) A 194 .line 55 00009C 8B 6C A 195 JR _1_L_15 00009E A 196 _1_L_16: 00009E E9000004 A 197 LDX _d,#-0 0000A2 E9000005 A 198 LDX _d+1,#-0 A 199 ; 56 { A 200 ; 57 for(d=0;d<100;d++){reverse(600,600);} A 201 .line 57 0000A6 8B 1F A 202 JR _1_L_13 0000A8 A 203 _1_L_11: 0000A8 1F7058 A 204 PUSH #88 0000AB 1F7002 A 205 PUSH #2 0000AE 1F7058 A 206 PUSH #88 0000B1 1F7002 A 207 PUSH #2 0000B4 D6 03CA A 208 CALL _reverse ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 5 PC Object I Line Source mazer1 w breax.src 0000B7 50E0 A 209 POP R0 0000B9 50E0 A 210 POP R0 0000BB 50E0 A 211 POP R0 0000BD 50E0 A 212 POP R0 0000BF 09010005 A 213 ADDX _d+1,#1 0000C3 19000004 A 214 ADCX _d,#-0 0000C7 A 215 _1_L_13: 0000C7 A9640005 A 216 CPX _d+1,#100 0000CB 1FA90000 04 A 217 CPCX _d,#0 0000D0 1B D6 A 218 JR LT,_1_L_11 A 219 ; 58 rotateR(450,750); A 220 .line 58 0000D2 1F70EE A 221 PUSH #238 0000D5 1F7002 A 222 PUSH #2 0000D8 1F70C2 A 223 PUSH #194 0000DB 1F7001 A 224 PUSH #1 0000DE D6 051E A 225 CALL _rotateR 0000E1 50E0 A 226 POP R0 0000E3 50E0 A 227 POP R0 0000E5 50E0 A 228 POP R0 0000E7 50E0 A 229 POP R0 A 230 ; 59 a=1; A 231 .line 59 0000E9 E9000000 A 232 LDX _a,#-0 0000ED E9010001 A 233 LDX _a+1,#1 A 234 ; 60 input=PAIN; A 235 .line 60 0000F1 840FD2 A 236 LDX R0,4050 0000F4 B0E1 A 237 CLR R1 0000F6 89E1FE A 238 LDX -2(RR14),R1 0000F9 89E0FF A 239 LDX -1(RR14),R0 A 240 ; 61 input=input&0x70; A 241 .line 61 0000FC 880EFF A 242 LDX R0,-1(RR14) 0000FF 56E070 A 243 AND R0,#112 000102 89E0FF A 244 LDX -1(RR14),R0 000105 B0E0 A 245 CLR R0 000107 89E0FE A 246 LDX -2(RR14),R0 A 247 ; 62 } 00010A A 248 _1_L_15: A 249 .line 62 00010A 880EFE A 250 LDX R0,-2(RR14) 00010D 881EFF A 251 LDX R1,-1(RR14) 000110 A6E110 A 252 CP R1,#16 000113 1FA6E000 A 253 CPC R0,#-0 000117 6B 85 A 254 JR Z,_1_L_16 A 255 ; 63 while(input==0x20) A 256 .line 63 000119 8B 30 A 257 JR _1_L_18 00011B A 258 _1_L_19: A 259 ; 64 { A 260 ; 65 forward(220,980); ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 6 PC Object I Line Source mazer1 w breax.src A 261 .line 65 00011B 1F70D4 A 262 PUSH #212 00011E 1F7003 A 263 PUSH #3 000121 1F70DC A 264 PUSH #220 000124 1F7000 A 265 PUSH #0 000127 D6 0573 A 266 CALL _forward 00012A 50E0 A 267 POP R0 00012C 50E0 A 268 POP R0 00012E 50E0 A 269 POP R0 000130 50E0 A 270 POP R0 A 271 ; 66 input=PAIN; A 272 .line 66 000132 840FD2 A 273 LDX R0,4050 000135 B0E1 A 274 CLR R1 000137 89E1FE A 275 LDX -2(RR14),R1 00013A 89E0FF A 276 LDX -1(RR14),R0 A 277 ; 67 input=input&0x70; A 278 .line 67 00013D 880EFF A 279 LDX R0,-1(RR14) 000140 56E070 A 280 AND R0,#112 000143 89E0FF A 281 LDX -1(RR14),R0 000146 B0E0 A 282 CLR R0 000148 89E0FE A 283 LDX -2(RR14),R0 A 284 ; 68 } 00014B A 285 _1_L_18: A 286 .line 68 00014B 880EFE A 287 LDX R0,-2(RR14) 00014E 881EFF A 288 LDX R1,-1(RR14) 000151 A6E120 A 289 CP R1,#32 000154 1FA6E000 A 290 CPC R0,#-0 000158 6B C1 A 291 JR Z,_1_L_19 A 292 ; 69 while(input==0x30) //right A 293 .line 69 00015A 8B 38 A 294 JR _1_L_21 00015C A 295 _1_L_22: A 296 ; 70 { A 297 ; 71 rotateR(450,750); A 298 .line 71 00015C 1F70EE A 299 PUSH #238 00015F 1F7002 A 300 PUSH #2 000162 1F70C2 A 301 PUSH #194 000165 1F7001 A 302 PUSH #1 000168 D6 051E A 303 CALL _rotateR 00016B 50E0 A 304 POP R0 00016D 50E0 A 305 POP R0 00016F 50E0 A 306 POP R0 000171 50E0 A 307 POP R0 A 308 ; 72 a=1; A 309 .line 72 000173 E9000000 A 310 LDX _a,#-0 000177 E9010001 A 311 LDX _a+1,#1 A 312 ; 73 input=PAIN; ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 7 PC Object I Line Source mazer1 w breax.src A 313 .line 73 00017B 840FD2 A 314 LDX R0,4050 00017E B0E1 A 315 CLR R1 000180 89E1FE A 316 LDX -2(RR14),R1 000183 89E0FF A 317 LDX -1(RR14),R0 A 318 ; 74 input=input&0x70; A 319 .line 74 000186 880EFF A 320 LDX R0,-1(RR14) 000189 56E070 A 321 AND R0,#112 00018C 89E0FF A 322 LDX -1(RR14),R0 00018F B0E0 A 323 CLR R0 000191 89E0FE A 324 LDX -2(RR14),R0 A 325 ; 75 } 000194 A 326 _1_L_21: A 327 .line 75 000194 880EFE A 328 LDX R0,-2(RR14) 000197 881EFF A 329 LDX R1,-1(RR14) 00019A A6E130 A 330 CP R1,#48 00019D 1FA6E000 A 331 CPC R0,#-0 0001A1 6B B9 A 332 JR Z,_1_L_22 A 333 ; 76 while(input==0x40) A 334 .line 76 0001A3 8B 6C A 335 JR _1_L_29 0001A5 A 336 _1_L_30: 0001A5 E9000004 A 337 LDX _d,#-0 0001A9 E9000005 A 338 LDX _d+1,#-0 A 339 ; 77 { A 340 ; 78 for(d=0;d<100;d++){reverse(600,600);} A 341 .line 78 0001AD 8B 1F A 342 JR _1_L_27 0001AF A 343 _1_L_25: 0001AF 1F7058 A 344 PUSH #88 0001B2 1F7002 A 345 PUSH #2 0001B5 1F7058 A 346 PUSH #88 0001B8 1F7002 A 347 PUSH #2 0001BB D6 03CA A 348 CALL _reverse 0001BE 50E0 A 349 POP R0 0001C0 50E0 A 350 POP R0 0001C2 50E0 A 351 POP R0 0001C4 50E0 A 352 POP R0 0001C6 09010005 A 353 ADDX _d+1,#1 0001CA 19000004 A 354 ADCX _d,#-0 0001CE A 355 _1_L_27: 0001CE A9640005 A 356 CPX _d+1,#100 0001D2 1FA90000 04 A 357 CPCX _d,#0 0001D7 1B D6 A 358 JR LT,_1_L_25 A 359 ; 79 rotateL(450,750); A 360 .line 79 0001D9 1F70EE A 361 PUSH #238 0001DC 1F7002 A 362 PUSH #2 0001DF 1F70C2 A 363 PUSH #194 0001E2 1F7001 A 364 PUSH #1 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 8 PC Object I Line Source mazer1 w breax.src 0001E5 D6 0474 A 365 CALL _rotateL 0001E8 50E0 A 366 POP R0 0001EA 50E0 A 367 POP R0 0001EC 50E0 A 368 POP R0 0001EE 50E0 A 369 POP R0 A 370 ; 80 a=0; A 371 .line 80 0001F0 E9000000 A 372 LDX _a,#-0 0001F4 E9000001 A 373 LDX _a+1,#-0 A 374 ; 81 input=PAIN; A 375 .line 81 0001F8 840FD2 A 376 LDX R0,4050 0001FB B0E1 A 377 CLR R1 0001FD 89E1FE A 378 LDX -2(RR14),R1 000200 89E0FF A 379 LDX -1(RR14),R0 A 380 ; 82 input=input&0x70; A 381 .line 82 000203 880EFF A 382 LDX R0,-1(RR14) 000206 56E070 A 383 AND R0,#112 000209 89E0FF A 384 LDX -1(RR14),R0 00020C B0E0 A 385 CLR R0 00020E 89E0FE A 386 LDX -2(RR14),R0 A 387 ; 83 } 000211 A 388 _1_L_29: A 389 .line 83 000211 880EFE A 390 LDX R0,-2(RR14) 000214 881EFF A 391 LDX R1,-1(RR14) 000217 A6E140 A 392 CP R1,#64 00021A 1FA6E000 A 393 CPC R0,#-0 00021E 6B 85 A 394 JR Z,_1_L_30 A 395 ; 84 while(input==0x50 && a==1) A 396 .line 84 000220 8B 64 A 397 JR _1_L_38 000222 A 398 _1_L_39: 000222 E9000004 A 399 LDX _d,#-0 000226 E9000005 A 400 LDX _d+1,#-0 A 401 ; 85 { A 402 ; 86 for(d=0;d<100;d++){reverse(600,600);} A 403 .line 86 00022A 8B 1F A 404 JR _1_L_36 00022C A 405 _1_L_34: 00022C 1F7058 A 406 PUSH #88 00022F 1F7002 A 407 PUSH #2 000232 1F7058 A 408 PUSH #88 000235 1F7002 A 409 PUSH #2 000238 D6 03CA A 410 CALL _reverse 00023B 50E0 A 411 POP R0 00023D 50E0 A 412 POP R0 00023F 50E0 A 413 POP R0 000241 50E0 A 414 POP R0 000243 09010005 A 415 ADDX _d+1,#1 000247 19000004 A 416 ADCX _d,#-0 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 9 PC Object I Line Source mazer1 w breax.src 00024B A 417 _1_L_36: 00024B A9640005 A 418 CPX _d+1,#100 00024F 1FA90000 04 A 419 CPCX _d,#0 000254 1B D6 A 420 JR LT,_1_L_34 A 421 ; 87 rotateR(450,750); A 422 .line 87 000256 1F70EE A 423 PUSH #238 000259 1F7002 A 424 PUSH #2 00025C 1F70C2 A 425 PUSH #194 00025F 1F7001 A 426 PUSH #1 000262 D6 051E A 427 CALL _rotateR 000265 50E0 A 428 POP R0 000267 50E0 A 429 POP R0 000269 50E0 A 430 POP R0 00026B 50E0 A 431 POP R0 A 432 ; 88 input=PAIN; A 433 .line 88 00026D 840FD2 A 434 LDX R0,4050 000270 B0E1 A 435 CLR R1 000272 89E1FE A 436 LDX -2(RR14),R1 000275 89E0FF A 437 LDX -1(RR14),R0 A 438 ; 89 input=input&0x70; A 439 .line 89 000278 880EFF A 440 LDX R0,-1(RR14) 00027B 56E070 A 441 AND R0,#112 00027E 89E0FF A 442 LDX -1(RR14),R0 000281 B0E0 A 443 CLR R0 000283 89E0FE A 444 LDX -2(RR14),R0 A 445 ; 90 } 000286 A 446 _1_L_38: A 447 .line 90 000286 880EFE A 448 LDX R0,-2(RR14) 000289 881EFF A 449 LDX R1,-1(RR14) 00028C A6E150 A 450 CP R1,#80 00028F 1FA6E000 A 451 CPC R0,#-0 000293 EB 71 A 452 JR NE,_1_L_47 000295 A9010001 A 453 CPX _a+1,#1 000299 1FA90000 00 A 454 CPCX _a,#0 00029E 6B 82 A 455 JR Z,_1_L_39 A 456 ; 91 while(input==0x50 && a==0) A 457 .line 91 0002A0 8B 64 A 458 JR _1_L_47 0002A2 A 459 _1_L_48: 0002A2 E9000004 A 460 LDX _d,#-0 0002A6 E9000005 A 461 LDX _d+1,#-0 A 462 ; 92 { A 463 ; 93 for(d=0;d<100;d++){reverse(600,600);} A 464 .line 93 0002AA 8B 1F A 465 JR _1_L_45 0002AC A 466 _1_L_43: 0002AC 1F7058 A 467 PUSH #88 0002AF 1F7002 A 468 PUSH #2 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 10 PC Object I Line Source mazer1 w breax.src 0002B2 1F7058 A 469 PUSH #88 0002B5 1F7002 A 470 PUSH #2 0002B8 D6 03CA A 471 CALL _reverse 0002BB 50E0 A 472 POP R0 0002BD 50E0 A 473 POP R0 0002BF 50E0 A 474 POP R0 0002C1 50E0 A 475 POP R0 0002C3 09010005 A 476 ADDX _d+1,#1 0002C7 19000004 A 477 ADCX _d,#-0 0002CB A 478 _1_L_45: 0002CB A9640005 A 479 CPX _d+1,#100 0002CF 1FA90000 04 A 480 CPCX _d,#0 0002D4 1B D6 A 481 JR LT,_1_L_43 A 482 ; 94 rotateL(450,750); A 483 .line 94 0002D6 1F70EE A 484 PUSH #238 0002D9 1F7002 A 485 PUSH #2 0002DC 1F70C2 A 486 PUSH #194 0002DF 1F7001 A 487 PUSH #1 0002E2 D6 0474 A 488 CALL _rotateL 0002E5 50E0 A 489 POP R0 0002E7 50E0 A 490 POP R0 0002E9 50E0 A 491 POP R0 0002EB 50E0 A 492 POP R0 A 493 ; 95 input=PAIN; A 494 .line 95 0002ED 840FD2 A 495 LDX R0,4050 0002F0 B0E1 A 496 CLR R1 0002F2 89E1FE A 497 LDX -2(RR14),R1 0002F5 89E0FF A 498 LDX -1(RR14),R0 A 499 ; 96 input=input&0x70; A 500 .line 96 0002F8 880EFF A 501 LDX R0,-1(RR14) 0002FB 56E070 A 502 AND R0,#112 0002FE 89E0FF A 503 LDX -1(RR14),R0 000301 B0E0 A 504 CLR R0 000303 89E0FE A 505 LDX -2(RR14),R0 A 506 ; 97 } 000306 A 507 _1_L_47: A 508 .line 97 000306 880EFE A 509 LDX R0,-2(RR14) 000309 881EFF A 510 LDX R1,-1(RR14) 00030C A6E150 A 511 CP R1,#80 00030F 1FA6E000 A 512 CPC R0,#-0 000313 EB 45 A 513 JR NE,_1_L_50 000315 A9000001 A 514 CPX _a+1,#-0 000319 1FA90000 00 A 515 CPCX _a,#0 00031E 6B 82 A 516 JR Z,_1_L_48 A 517 ; 98 while(input==0x60) A 518 .line 98 000320 8B 38 A 519 JR _1_L_50 000322 A 520 _1_L_51: ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 11 PC Object I Line Source mazer1 w breax.src A 521 ; 99 { A 522 ; 100 rotateL(450,750); //left A 523 .line 100 000322 1F70EE A 524 PUSH #238 000325 1F7002 A 525 PUSH #2 000328 1F70C2 A 526 PUSH #194 00032B 1F7001 A 527 PUSH #1 00032E D6 0474 A 528 CALL _rotateL 000331 50E0 A 529 POP R0 000333 50E0 A 530 POP R0 000335 50E0 A 531 POP R0 000337 50E0 A 532 POP R0 A 533 ; 101 a=0; A 534 .line 101 000339 E9000000 A 535 LDX _a,#-0 00033D E9000001 A 536 LDX _a+1,#-0 A 537 ; 102 input=PAIN; A 538 .line 102 000341 840FD2 A 539 LDX R0,4050 000344 B0E1 A 540 CLR R1 000346 89E1FE A 541 LDX -2(RR14),R1 000349 89E0FF A 542 LDX -1(RR14),R0 A 543 ; 103 input=input&0x70; A 544 .line 103 00034C 880EFF A 545 LDX R0,-1(RR14) 00034F 56E070 A 546 AND R0,#112 000352 89E0FF A 547 LDX -1(RR14),R0 000355 B0E0 A 548 CLR R0 000357 89E0FE A 549 LDX -2(RR14),R0 A 550 ; 104 } 00035A A 551 _1_L_50: A 552 .line 104 00035A 880EFE A 553 LDX R0,-2(RR14) 00035D 881EFF A 554 LDX R1,-1(RR14) 000360 A6E160 A 555 CP R1,#96 000363 1FA6E000 A 556 CPC R0,#-0 000367 6B B9 A 557 JR Z,_1_L_51 A 558 ; 105 while(input==0x70) A 559 .line 105 000369 8B 30 A 560 JR _1_L_53 00036B A 561 _1_L_54: A 562 ; 106 { A 563 ; 107 forward(220,980); A 564 .line 107 00036B 1F70D4 A 565 PUSH #212 00036E 1F7003 A 566 PUSH #3 000371 1F70DC A 567 PUSH #220 000374 1F7000 A 568 PUSH #0 000377 D6 0573 A 569 CALL _forward 00037A 50E0 A 570 POP R0 00037C 50E0 A 571 POP R0 00037E 50E0 A 572 POP R0 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 12 PC Object I Line Source mazer1 w breax.src 000380 50E0 A 573 POP R0 A 574 ; 108 input=PAIN; A 575 .line 108 000382 840FD2 A 576 LDX R0,4050 000385 B0E1 A 577 CLR R1 000387 89E1FE A 578 LDX -2(RR14),R1 00038A 89E0FF A 579 LDX -1(RR14),R0 A 580 ; 109 input=input&0x70; A 581 .line 109 00038D 880EFF A 582 LDX R0,-1(RR14) 000390 56E070 A 583 AND R0,#112 000393 89E0FF A 584 LDX -1(RR14),R0 000396 B0E0 A 585 CLR R0 000398 89E0FE A 586 LDX -2(RR14),R0 A 587 ; 110 } 00039B A 588 _1_L_53: A 589 .line 110 00039B 880EFE A 590 LDX R0,-2(RR14) 00039E 881EFF A 591 LDX R1,-1(RR14) 0003A1 A6E170 A 592 CP R1,#112 0003A4 1FA6E000 A 593 CPC R0,#-0 0003A8 6B C1 A 594 JR Z,_1_L_54 A 595 ; 111 input=PAIN; A 596 .line 111 0003AA 840FD2 A 597 LDX R0,4050 0003AD B0E1 A 598 CLR R1 0003AF 89E1FE A 599 LDX -2(RR14),R1 0003B2 89E0FF A 600 LDX -1(RR14),R0 A 601 ; 112 input=input&0x70; A 602 .line 112 0003B5 880EFF A 603 LDX R0,-1(RR14) 0003B8 56E070 A 604 AND R0,#112 0003BB 89E0FF A 605 LDX -1(RR14),R0 0003BE B0E0 A 606 CLR R0 0003C0 89E0FE A 607 LDX -2(RR14),R0 A 608 ; 113 } A 609 .line 113 0003C3 8D 00 8D A 610 JR _1_L_8 A 611 ; 114 } A 612 .line 114 0003C6 D6 0000 A 613 CALL __b_framereset 0003C9 AF A 614 RET A 615 .endfunc "main",114,"_main" A 616 SEGMENT ROM_DATA A 617 A 618 A 619 ;**************************** _reverse *************************** A 620 ;Name Addr/Register Size Type A 621 ;_d STATIC 1 variable A 622 ;offtime1 R15+6 1 parameter A 623 ;ontime1 R15+4 1 parameter A 624 ZiLOG Z8 Encore! Macro Assembler Version 2.45 (06120402) 07-Nov-07 11:01:00 page: 13 PC Object I Line Source mazer1 w breax.src A 625 A 626 ; Aggregate Stack Size: 0 (words) A 627 A 628 A 629 SEGMENT w_breax_TEXT A 630 ; 115 A 631 ; 116 void reverse(int ontime1, int offtime1) A 632 ; 117 { 0003CA A 633 _reverse: A 634 .define "_reverse" A 635 .value _reverse A 636 .class 2 A 637 .type 65 A 638 .type 0 A 639 .endef A 640 .begfunc "reverse",117,"_reverse" A 641 .define "ontime1" A 642 .class 17 A 643 .reg -1 A 644 .type 3 A 645 .type 0 A 646 .endef A 647 .define "offtime1" A 648 .class 17 A 649 .reg -1 A 650 .type 3 A 651 .type 0 A 652 .endef 0003CA D6 0000 A 653 CALL __b_frameset00 A 654 ; 118 PBOUT=0x0f; // reverse A 655 .line 118 0003CD E90F0FD7 A 656 LDX 4055,#15 0003D1 E9000004 A 657 LDX _d,#-0 0003D5 E9000005 A 658 LDX _d+1,#-0 A 659 ; 119 for(d=0;d