![]() |
Routines |
| Prev: D1DB | Up: Map | Next: D206 |
|
Used by the routine at ProcessObjectDisplayLogic.
Adds 0F to the record's flag byte and steps IX on by that many bytes.
|
||||
| CalculateHandlerOffset | D1DC | PUSH DE | Read the record's flag byte and add 0F to the total. | |
| D1DD | LD D,A | |||
| D1DE | LD A,(IX+$00) | |||
| D1E1 | ADD A,$0F | |||
| D1E3 | LD E,A | |||
| D1E4 | LD A,D | Step to the next record. | ||
| D1E5 | LD D,$00 | |||
| D1E7 | ADD IX,DE | |||
| D1E9 | POP DE | |||
| CalculateHandlerOffset_Loop | D1EA | CP (IX+$00) | Jump ahead to CalculateHandlerOffset_Next if this id matches the record's flag byte. | |
| D1ED | JR Z,CalculateHandlerOffset_Next | |||
| D1EF | INC (IX+$00) | Jump to CalculateHandlerOffset_TestSignalStepFailed if this byte was the FF end marker. | ||
| D1F2 | JR Z,CalculateHandlerOffset_TestSignalStepFailed | |||
| D1F4 | DEC (IX+$00) | Go to CalculateHandlerOffset_0 if stepping this byte down leaves zero. | ||
| D1F7 | JR Z,CalculateHandlerOffset_0 | |||
| D1F9 | INC IX | Skip this handler and try the next one. | ||
| D1FB | INC IX | |||
| D1FD | JR CalculateHandlerOffset_Loop | |||
|
The condition holds, so the caller continues.
|
||||
| CalculateHandlerOffset_Next | D1FF | SCF | Mark the condition as met. | |
| D200 | RET | Return. | ||
| CalculateHandlerOffset_TestSignalStepFailed | D201 | DEC (IX+$00) | Restore the end marker. | |
| CalculateHandlerOffset_0 | D204 | XOR A | Clear A. | |
| D205 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: D1DB | Up: Map | Next: D206 |