LAB 5: RECURSIVE SUBROUTINES

ldaa 5,x ; load ASCII char from stack. suba #30 ; subtract 30 from ASCII. cmpa #a ; check if number was less than A (10) blo Done ; if so, done, restore registers. suba #27 ; if not, convert to "a" thru "f" value. Done: staa 5,x ; put HEX number on stack. pula ; restore contents of A and X. pulx. rts;;;;; HtoA:; Convert 4-bit Hex to 8-bit ASCII ................
................