I have a question about what this subroutine is doing in RZASA and if it compares to anything in the strategy docs? I can not seem to find anything in any of the 4 docs that I have and I am a bit confused about what it is actually doing. Thanks
Code: Select all
Sub_9ebd1:
9ebd1: f2 pushp push(PSW);
9ebd2: b0,13,3a ldb R3a,R13 TMP4L = CLOCK_EXTEN;
9ebd5: a0,06,38 ldw R38,R6 TMP3L = CLOCK;
9ebd8: 98,13,3a cmpb R3a,R13
9ebdb: d7,f5 jne 9ebd2 if (TMP4L != CLOCK_EXTEN) goto 9ebd2;
9ebdd: a0,38,3c ldw R3c,R38 TMP5L = TMP3L;
9ebe0: b0,3a,3e ldb R3e,R3a TMP6L = TMP4L;
9ebe3: 6b,d4,52,38 sb2w R38,[Rd4+52] TMP3L -= LAST_BG;
9ebe7: bb,d6,6e,3a sbbb R3a,[Rd6+6e] TMP4L -= LAST_BG_EXT - CY;
9ebeb: 11,3b clrb R3b TMP4H = 0;
9ebed: c3,d4,52,3c stw R3c,[Rd4+52] LAST_BG = TMP5L;
9ebf1: c7,d6,6e,3e stb R3e,[Rd6+6e] LAST_BG_EXT = TMP6L;
9ebf5: 4f,ce,32,3a,3c ml3w R3c,R3a,[Rce+32] TMP5L = TMP4L * S.0x1AD50;
9ebfa: 6f,ce,32,38 ml2w R38,[Rce+32] TMP3L *= S.0x1AD50;
9ebfe: 64,3a,3c ad2w R3c,R3a TMP5L += TMP4L;
9ec01: a4,00,3e adcw R3e,R0 TMP6L += CY;
9ec04: 0c,04,3c shrdw R3c,4 TMP5L >>= 4;
9ec07: a3,d4,4a,36 ldw R36,[Rd4+4a] TMP2L = BG_TMRBAR;
9ec0b: a0,3c,38 ldw R38,R3c TMP3L = TMP5L;
9ec0e: a3,f6,02,3a ldw R3a,[Rf6+2] TMP4L = TCBGTMR;
9ec12: ef,97,40 call 92cac Sub_92cac ();
9ec15: c3,d4,4a,42 stw R42,[Rd4+4a] BG_TMRBAR = TMP8L;
9ec19: f3 popp PSW = pop();
9ec1a: f0 ret return;
9ec1b: f2 pushp push(PSW);
9ec1c: b0,13,3a ldb R3a,R13 TMP4L = CLOCK_EXTEN;
9ec1f: a0,06,38 ldw R38,R6 TMP3L = CLOCK;
9ec22: 98,13,3a cmpb R3a,R13
9ec25: d7,f5 jne 9ec1c if (TMP4L != CLOCK_EXTEN) goto 9ec1c;
9ec27: a0,38,3c ldw R3c,R38 TMP5L = TMP3L;
9ec2a: b0,3a,3e ldb R3e,R3a TMP6L = TMP4L;
9ec2d: 6b,d6,6c,38 sb2w R38,[Rd6+6c] TMP3L -= LAST_BG_32;
9ec31: bb,d6,6f,3a sbbb R3a,[Rd6+6f] TMP4L -= LAST_BG_EXT_32 - CY;
9ec35: 11,3b clrb R3b TMP4H = 0;
9ec37: c3,d6,6c,3c stw R3c,[Rd6+6c] LAST_BG_32 = TMP5L;
9ec3b: c7,d6,6f,3e stb R3e,[Rd6+6f] LAST_BG_EXT_32 = TMP6L;
9ec3f: 4f,ce,32,3a,3c ml3w R3c,R3a,[Rce+32] TMP5L = TMP4L * S.0x1AD50;
9ec44: 6f,ce,32,38 ml2w R38,[Rce+32] TMP3L *= S.0x1AD50;
9ec48: 64,3a,3c ad2w R3c,R3a TMP5L += TMP4L;
9ec4b: a4,00,3e adcw R3e,R0 TMP6L += CY;
9ec4e: 0c,02,3c shrdw R3c,2 TMP5L >>= 2;
9ec51: a0,3c,38 ldw R38,R3c TMP3L = TMP5L;
9ec54: b1,3c,34 ldb R34,3c TMP1L = 3c;
9ec57: 98,7c,34 cmpb R34,R7c
9ec5a: d1,0a jleu 9ec66 if (TMP1L > ATMR1) {
9ec5c: c3,d4,4e,38 stw R38,[Rd4+4e] DELAY_MIN_32 = TMP3L;
9ec60: c3,d4,50,38 stw R38,[Rd4+50] DELAY_MAX_32 = TMP3L;
9ec64: 20,14 sjmp 9ec7a goto 9ec7a; }
9ec66: 8b,d4,50,38 cmpw R38,[Rd4+50]
9ec6a: d1,04 jleu 9ec70 if (TMP3L > DELAY_MAX_32) {
9ec6c: c3,d4,50,38 stw R38,[Rd4+50] DELAY_MAX_32 = TMP3L; }
9ec70: 8b,d4,4e,38 cmpw R38,[Rd4+4e]
9ec74: db,04 jc 9ec7a if (TMP3L < DELAY_MIN_32) {
9ec76: c3,d4,4e,38 stw R38,[Rd4+4e] DELAY_MIN_32 = TMP3L; }
9ec7a: a3,d4,4c,36 ldw R36,[Rd4+4c] TMP2L = DELAYBAR_32;
9ec7e: a3,f6,06,3a ldw R3a,[Rf6+6] TMP4L = [1389c];
9ec82: ef,27,40 call 92cac Sub_92cac ();
9ec85: c3,d4,4c,42 stw R42,[Rd4+4c] DELAYBAR_32 = TMP8L;
9ec89: f3 popp PSW = pop();
9ec8a: f0 ret return;
Also, should this be 2 subroutines? I see that 9EC1B is a push command, but it doesn't seem to have a call anywhere in the code, does that mean it is not a subroutine or just that it does not actually get used in this particular strategy?