![]() |
Routines |
| Prev: A90D | Up: Map | Next: A947 |
|
Calls the parser check indexed in JumpTable_ParserChecks and succeeds when it returns with the carry clear.
Stores A at ScriptParserResult.
|
||||||||||||
|
The operand selects a parser check from JumpTable_ParserChecks.
|
||||||||||||
| Condition_ParserSucceeds | A924 | LD E,(IX+$01) | Fetch the check number (the operand) from *IX+01 into E. | |||||||||
| A927 | PUSH IX | Stash IX on the stack. | ||||||||||
| A929 | LD IX,$A779 | Point IX at the parser-check jump table at JumpTable_ParserChecks. | ||||||||||
|
Resolve the check routine address from that table.
|
||||||||||||
| A92D | CALL GetTableEntry | Call GetTableEntry. | ||||||||||
|
Jump to that check, returning here at ParserSucceeds_Return.
|
||||||||||||
| A930 | LD DE,$A935 | Push the return address ParserSucceeds_Return onto the stack. | ||||||||||
| A933 | PUSH DE | |||||||||||
| A934 | JP (HL) | Jump to the check routine held in HL. | ||||||||||
|
The check returns here with its result in A and the carry flag.
|
||||||||||||
| ParserSucceeds_Return | A935 | POP IX | Restore the script pointer from the stack. | |||||||||
| A937 | LD ($A806),A | Store the check's result at ScriptParserResult. | ||||||||||
| A93A | JR C,ParserSucceeds_Failed | Jump to ParserSucceeds_Failed if the check failed (carry set). | ||||||||||
| A93C | XOR A | Clear A and set the zero flag; the parser check passed. | ||||||||||
| A93D | JP RunScript_SkipCondition_TwoBytes | Jump to RunScript_SkipCondition_TwoBytes. | ||||||||||
|
The check failed, so force the condition to fail.
|
||||||||||||
| ParserSucceeds_Failed | A940 | XOR A | Clear A ready for RunScript_InvertConditionResult. | |||||||||
| A941 | CALL RunScript_InvertConditionResult | Call RunScript_InvertConditionResult so the condition fails when the check failed. | ||||||||||
| A944 | JP RunScript_SkipCondition_TwoBytes | Jump to RunScript_SkipCondition_TwoBytes. | ||||||||||
| Prev: A90D | Up: Map | Next: A947 |