Guides:Fast 0x1500 ACE: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
Line 556: Line 556:
D6 FF sub $FF ; a = $01
D6 FF sub $FF ; a = $01
EA 84 FB ld ($FB84), a
EA 84 FB ld ($FB84), a
E1 pop hl
E1 pop hl ; first of two pops to prevent side effects of 0x1500 ACE
F6 FF or $FF ; a = $FF
F6 FF or $FF ; a = $FF
50 ld d, b
50 ld d, b
Line 563: Line 563:
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 41 30
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 41 30
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
E1 pop hl
E1 pop hl ; second of two pops to prevent side effects of 0x1500 ACE
D6 50 sub $50 ; a = $AF
D6 50 sub $50 ; a = $AF


Line 663: Line 663:
D6 FF sub $FF ; a = $01
D6 FF sub $FF ; a = $01
EA 84 FB ld ($FB84), a
EA 84 FB ld ($FB84), a
E1 pop hl
E1 pop hl ; first of two pops to prevent side effects of 0x1500 ACE
F6 FF or $FF ; a = $FF
F6 FF or $FF ; a = $FF
50 ld d, b
50 ld d, b
Line 670: Line 670:
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 2F 30
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 2F 30
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
E1 pop hl
E1 pop hl ; second of two pops to prevent side effects of 0x1500 ACE
D6 50 sub $50 ; a = $AF
D6 50 sub $50 ; a = $AF


Line 770: Line 770:
D6 FF sub $FF ; a = $01
D6 FF sub $FF ; a = $01
EA 84 FB ld ($FB84), a
EA 84 FB ld ($FB84), a
E1 pop hl
E1 pop hl ; first of two pops to prevent side effects of 0x1500 ACE
F6 FF or $FF ; a = $FF
F6 FF or $FF ; a = $FF
50 ld d, b
50 ld d, b
Line 777: Line 777:
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 2B 30
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 2B 30
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
E1 pop hl
E1 pop hl ; second of two pops to prevent side effects of 0x1500 ACE
D6 50 sub $50 ; a = $AF
D6 50 sub $50 ; a = $AF