//MACRO Li32 Reg, Value //-------------------------------------------------------------------------------------------------- // // @ CopyRight Roberti & Parau Enterprises, Inc. 2021-2023 // // This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License. // To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/4.0/ // or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. // //-------------------------------------------------------------------------------------------------- // \#Label LUI #Reg, ((#Value) & (~ 0xFFF)) + (((#Value) & 0x800) << 1) // Load immediate value - high 12-20 bits"); \ ADDI #Reg, (#Value) & 0xFFF [0] // Load immediate value - low 12 bits