title Module from library HILIB_1 : @LENG name ('@LENG') maclib baselib.lib ; Language : PASCAL and BASIC ; Compute length of string ; Copyright (C) Werner Cirsovius ; Hohe Weide 44 ; D-20253 Hamburg ; Tel.: +49-40-4223247 ; Version 1.0, August 1987 ; ENTRY Reg pair HL points to string closed by zero ; EXIT Reg B and Accu hold length of string ; Zero flag set on empty string entry @leng @leng: push hl ld b,-1 ; Init counter leng: ld a,(hl) inc b inc hl or a ; Test end jr nz,leng ld a,b or a ; Set flag pop hl ret end