annotate lib/alib/bin_hex.a @ 2719:2fda91bdc268 lwtools-port

added httpd
author Boisy Pitre <boisy.pitre@nuance.com>
date Thu, 26 Jul 2012 11:01:43 -0500
parents 7d70b7e1cb21
children aaba193af04f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 ********************************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2 *
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * Binary to hexadecimal convertor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 *
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * This subroutine will convert the binary value in
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * 'D' to a 4 digit hexadecimal ascii string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * OTHER MODULES NEEDED: BIN2HEX
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * ENTRY: D=value to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * X=buffer for hex string-null terminated
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14 * EXIT all registers (except CC) preserved.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 nam Convert # to Hex String
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 psect BIN_HEX,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22 BIN_HEX:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 pshs d,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 ldb ,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25 lbsr BIN2HEX convert 1 byte
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 std ,x++
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 ldb 1,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 lbsr BIN2HEX convert 2nd byte
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 std ,x++
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 clr ,x term with null
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 puls d,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35