display binary ??

binary1248

Senior Member
Is there a way to get this sertxd to display the 8 bit binary string. I tried the % but it just returns an syntax error.
I want b9 and b8 to show as binary, not hex or decimal, for debugging purposes only.
Or am I stuck with decimal or hex ?

.
Code:
 ;Note b8 is lsb, b9 is msb of ctvalue
sertxd ("The value is ",#ctvalue,"==>","  b9=",b9,"  b8=",b8,13,10,13,10)
 

BESQUEUT

Senior Member
Try this:
Code:
 ;Note b8 is lsb, b9 is msb of ctvalue
symbol CtValue=w4 

CtValue=62
w0=CtValue
sertxd ("The value is ",#ctvalue,"==>",#bit15,#bit14,#bit13,#bit12,#bit11,#bit10,#bit9,#bit8," ",#bit7,#bit6,#bit5,#bit4,#bit3,#bit2,#bit1,#bit0,13,10,13,10)
 

binary1248

Senior Member
Many thanks Excellent BESQUEUT, I will use that.
I should have thought of that, I am now slapping my head and drinking more coffee.
Since I am bit banging I wanted a way to display the bits being worked on by way of the terminal.
Paul
 
Last edited:
Top