ASCII converter Web page?

Feb 02, 2005 6 Replies

Has anyone come across a simple web-page based utility to convert text into ASCII codes?



It's always been a bit annoying to stop and look up all the codes from a table when coding, surely someone has made this easier for me.... What I mean is, if I am creating a series of messages that my embedded device will send over serial to either an LCD, or to a serial port, I take a message like "Hello" and create a block of text:



hello_data: .db 0x48 ;'H' .db 0x65 ;'e' .db 0x6c ;'l' .db 0x6c ;'l' .db 0x6f ;'o'


It would be nice if i could just type in the characters, and get something cut and pasteable into my work. I did arrange something in Excel once, but now I try and run it and I need an add-in that won't load - the hex2dec() function won't work properly, blah blah blah.



Any URL suggestions appreciated.


Cheers,



Ross.


Most assemblers I've used will accept things like

.db "(C) 2005 Spehro Pefhany"

All I've used will accept statements along the lines of:

.db 'H'

Best regards, Spehro Pefhany

"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

Sure. It's called an assembler.

Good grief, where did you find an assembler that does't understand ASCII character and string constants? You need to ask for your money back!

I've been doing assemly stuff for 25 years, and have never seen an assembler that couldn't do this:

hello_data: .ascii 'Hello'

The syntax varies a bit from one to the next...

[Well I wouldn't bet that the CDC-6600 assmebler did ASCII, but it did know whatever 6-bit text encoding the system peripherals used.]
Grant Edwards grante Yow! ... I don't like at FRANK SINATRA or his visi.com CHILDREN.

I wrote one once :

formatting link
formatting link

Rene

Ing.Buero R.Tschaggelar - http://www.ibrtses.com & commercial newsgroups - http://www.talkto.net

No need to look it up on a web-site. I use my Forth develoipment environment to do things like that for me. Compile the embedded strings from the plain text source and shove them into the memory array that you wish to allocate for it (often with a character count as well).

This is the sort of thing you should be able to get your IDE to do with ease.

******************************************************************** Paul E. Bennett .................... Forth based HIDECS Consultancy ..... Mob: +44 (0)7811-639972 .........NOW AVAILABLE:- HIDECS COURSE...... Tel: +44 (0)1235-811095 .... see http://www.feabhas.com for details. Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************

Ahh, a little perl is a beautiful thing. It's a very efficient language, but I'm afraid I've never used it enough to retain it any time I've learned it. Thanks for that, it works very nicely in Unix (Mac OS X) , I will use it often, as I am happy in the unix environment.

Thanks also to the others who posted suggestions & URL's.

Unfortunately my AVR assembler (MacAVRpa) doesn't take the direct text and convert it during assembly. (But it's free, so I won't ask for my money back.)

Ross.

That sounds extremely primitive. I'd swith to the Gnu assembler if I were you. It's also free, but it's a professional-strength assembler.

Grant Edwards grante Yow! I had a lease on an at OEDIPUS COMPLEX back in visi.com '81...

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required