Prev: 43870 Up: Map Next: 43915
43891: 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 43891 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.
43894 LD L,(IX+1) Load the saved-byte index from *IX+1 into HL.
43897 LD H,0
43899 LD A,(IX+2) Fetch the new value from *IX+2 into A.
43902 ADD HL,HL Double the index and add Table_SavedStateAddresses to point at that pointer entry.
43903 LD DE,47865
43906 ADD HL,DE
43907 LD E,(HL) Fetch the destination address from the table into HL.
43908 INC HL
43909 LD D,(HL)
43910 EX DE,HL
43911 LD (HL),A Write the new value through HL.
43912 JP RunScript_SkipAction_ThreeBytes Jump to RunScript_SkipAction_ThreeBytes.
Prev: 43870 Up: Map Next: 43915