*************************************************************** * * * Module Name: ASCIIBIN.LIB Rev. 1.00 * * Function: Convert two ascii Last rev. 13 May 85 * * values (in HL) to binary By: glh/w6bsk * * * *************************************************************** ascbin: mov a,h ; Load the second byte ora a ; and test for entry. jz only1 ; Exit if no second number. mov a,l ; Get first entry sui 30h ; Convert from ascii and ral!ral!ral ; multiply x8 and then add add l ; to get x10. sui 30h add l sui 30h mov c,a ; Store intermediate value mov a,h ; Get second value sui 30h ; Make binary add c ; Combine for final value ret ; Return with binary in A only1: mov a,l ; Get first byte sui 30h ; Make binary ret ; and return.