- Name:
- bintoascii
- Syntax:
-
BINTOASCII variable, hundreds, tens, units
BINTOASCII wordvariable, tenthousands, thousands, hundreds, tens, units
Variable - contains the value (0-255) or wordvariable (0-65535)
TenThousands - receives the ASCII value ("0" to "9")
Thousands - receives the ASCII value ("0" to "9")
Hundreds - receives the ASCII value ("0" to "9")
Tens - receives the ASCII value ("0" to "9")
Units - receives the ASCII value ("0" to "9")
- Description:
-
Convert a binary value into separate ASCII bytes. This is a 'pseudo' command designed to simplify the conversion of byte or word binary values into ASCII.
- Applies To:
- All
- See Also:
- Related Create:
-
Convert binary byte to ascii characters
Convert the binary byte value in b1 to three ascii characters in b2, b3 and b4
- Code Example:
-
main: inc b1 bintoascii b1,b2,b3,b4 ; convert to ascii debug ; debug values for testing goto main ; loop back to start
Copy Code Submit an Example
Convert binary word to ascii characters
Convert the binary word value in w0 to five ascii characters in b2, b3, b4, b5 and b6
- Code Example:
-
main: inc w0 bintoascii w0,b2,b3,b4,b5,b6 ; convert to ascii debug ; debug values for testing goto main ; loop back to start
Copy Code Submit an Example
Submit Your Own Code!
You must be logged in to submit code examples. Login now.