Category : Network Files
Archive   : PKTD11A.ZIP
Filename : GETDIG.ASM

 
Output of file : GETDIG.ASM contained in archive : PKTD11A.ZIP
;put into the public domain by Russell Nelson, [email protected]

public get_digit
get_digit:
;enter with al = character
;return nc, al=digit, or cy if not a digit.
cmp al,'0' ;decimal digit?
jb get_digit_1 ;no.
cmp al,'9' ;. .?
ja get_digit_2 ;no.
sub al,'0'
clc
ret
get_digit_2:
cmp al,'a' ;hex digit?
jb get_digit_3
cmp al,'f' ;hex digit?
ja get_digit_3
sub al,'a'-10
clc
ret
get_digit_3:
cmp al,'A' ;hex digit?
jb get_digit_1
cmp al,'F' ;hex digit?
ja get_digit_1
sub al,'A'-10
clc
ret
get_digit_1:
stc
ret




  3 Responses to “Category : Network Files
Archive   : PKTD11A.ZIP
Filename : GETDIG.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/