| The Hobbit (v1.0) | Routines |
| Prev: 7240 | Up: Map | Next: 7288 |
|
A 16-bit comparison: compares H with D and, if they are equal, L with E. Returns with Z set if HL=DE, and the carry flag set if HL is less than DE. A is corrupted.
|
||||||||||||||
| 7282 | LD A,H | A = HL's high byte | ||||||||||||
| 7283 | SUB D | Subtract DE's high byte | ||||||||||||
| 7284 | RET NZ | Different: HL and DE are not equal (the carry flag also shows which is bigger) | ||||||||||||
| 7285 | LD A,L | Same high byte: now compare the low bytes | ||||||||||||
| 7286 | SUB E | |||||||||||||
| 7287 | RET | |||||||||||||
| Prev: 7240 | Up: Map | Next: 7288 |