title Module from library BASE_1 : MULREC name ('MULREC') maclib baselib.lib ; Multiply by 128 computing 16 bit value from record size ; Copyright (C) Werner Cirsovius ; Hohe Weide 44 ; D-20253 Hamburg ; Tel.: +49-40-4223247 ; Version 1.0 September 1991 ; ENTRY Reg pair HL holds value ; EXIT Accu and reg pair HL hold product ; Accu holds high byte entry mulrec ; ; Algorithm: x*128 = (x*256)/2 ; mulrec: ld a,h ; Times 256 ld h,l ld l,0 ; .. clear low rra ; Divide by 2 rr h ; .. results in times 128 rr l ret end