Load routines |
Up: Map | Next: 32768 |
Entering the code here from BASIC means that C=23 (the LSB of 23831); this value is used later on in the routine at 32815.
|
||||||
23831 | DI | Disable interrupts | ||||
23832 | LD B,49 | |||||
23834 | LD DE,65487 | |||||
23837 | CALL 24046 | |||||
And so begins the misdirection.
|
||||||
24046 | POP HL | HL=23840 | ||||
24047 | ADD HL,DE | HL=23791 | ||||
24048 | PUSH HL | |||||
24049 | LD DE,7 | |||||
24052 | ADD HL,DE | HL=23798 | ||||
24053 | RET | Jump to 23791 | ||||
Undo some code obfuscation before continuing.
|
||||||
23791 | LD A,(HL) | Do some XOR-ing on the 49 bytes from 23798 to 23846 | ||||
23792 | XOR H | |||||
23793 | XOR L | |||||
23794 | LD (HL),A | |||||
23795 | INC HL | |||||
23796 | DJNZ 23791 | |||||
After the XOR-ing:
|
||||||
23798 | EXX | |||||
23799 | EX (SP),HL | HL'=11563 | ||||
23800 | LD A,H | A=45 | ||||
23801 | AND L | A=41 | ||||
23802 | ADD A,L | A=84 | ||||
23803 | ADD A,L | A=127 | ||||
23804 | LD H,A | H'=127 | ||||
23805 | ADD A,78 | A=205 | ||||
23807 | LD L,A | HL'=32717 | ||||
23808 | EXX | |||||
23809 | LD HL,23551 | INK 6: PAPER 2 | ||||
23812 | LD (HL),22 | |||||
23814 | DEC HL | |||||
23815 | BIT 3,H | |||||
23817 | JR NZ,23812 | |||||
23819 | LD (HL),0 | Clear the display file | ||||
23821 | DEC HL | |||||
23822 | BIT 6,H | |||||
23824 | JR NZ,23819 | |||||
23826 | INC E | DE=9 | ||||
23827 | INC E | |||||
23828 | CALL 24046 | |||||
More misdirection.
|
||||||
24046 | POP HL | HL=23831 | ||||
24047 | ADD HL,DE | HL=23840 | ||||
24048 | PUSH HL | |||||
24049 | LD DE,7 | |||||
24052 | ADD HL,DE | HL=23847 | ||||
24053 | RET | Jump to 23840 | ||||
Undo some more code obfuscation before continuing.
|
||||||
23840 | LD A,(HL) | Do some XOR-ing and RLC-ing on the 217 bytes from 23847 to 24063 | ||||
23841 | XOR E | |||||
23842 | RLCA | |||||
23843 | LD (HL),A | |||||
23844 | INC L | |||||
23845 | JR NZ,23840 | |||||
After the XOR-ing and RLC-ing:
|
||||||
23847 | PUSH HL | HL=23808 | ||||
23848 | EXX | |||||
23849 | POP DE | DE'=23808 | ||||
23850 | EX DE,HL | DE'=32717 | ||||
23851 | LD BC,255 | Copy 255 bytes from 23808-24062 to 32717-32971 | ||||
23854 | LDIR | |||||
23856 | LD E,A | E'=47 | ||||
23857 | EX DE,HL | HL'=32815 | ||||
23858 | JP (HL) | Jump to 32815 |
Up: Map | Next: 32768 |