//MACRO String.length Length, String, WReg //-------------------------------------------------------------------------------------------------- // // @ 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. // //-------------------------------------------------------------------------------------------------- // // // Get NUL terminated string length // \#Label LI #Length, 0 // Set length to zero \ LB #WReg, 0[#String] // Load first byte \ WHILE CONDITION= ( #WReg != 0 ) // Start hash loop one byte a time \ ADDI #String, 1 // Load next byte address \ ADDI #Length, 1 // Load next byte address \ LB #WReg, 0[#String] // Load next byte \ ENDWHILE