Prev: AB5E Up: Map Next: AB8B
AB73: Action: Write Saved Byte
Writes the second operand through the state-byte pointer selected from Table_SavedStateAddresses.
Input
F The zero flag is set when the conditions hold
IX Pointer to the script entry (opcode, index, value)
When the condition failed, skip this action.
Action_WriteSavedByte AB73 JP NZ,RunScript_SkipAction_ThreeBytes Jump to RunScript_SkipAction_ThreeBytes if the condition failed.
The first operand selects a saved-byte pointer from Table_SavedStateAddresses; the second operand is the value to write.
AB76 LD L,(IX+$01) Load the saved-byte index from *IX+01 into HL.
AB79 LD H,$00
AB7B LD A,(IX+$02) Fetch the new value from *IX+02 into A.
AB7E ADD HL,HL Double the index and add Table_SavedStateAddresses to point at that pointer entry.
AB7F LD DE,$BAF9
AB82 ADD HL,DE
AB83 LD E,(HL) Fetch the destination address from the table into HL.
AB84 INC HL
AB85 LD D,(HL)
AB86 EX DE,HL
AB87 LD (HL),A Write the new value through HL.
AB88 JP RunScript_SkipAction_ThreeBytes Jump to RunScript_SkipAction_ThreeBytes.
Prev: AB5E Up: Map Next: AB8B