"DA" works fine with anything under 128, so 10,13 isn't a problem.But you're right. Unless you are using an 18F part, if you want 8-bit data, it will take 2x the code space.Code:da "Danger Will Robinson",13,10,0
"DA" works fine with anything under 128, so 10,13 isn't a problem.But you're right. Unless you are using an 18F part, if you want 8-bit data, it will take 2x the code space.Code:da "Danger Will Robinson",13,10,0
Last edited by Darrel Taylor; - 27th August 2005 at 20:45.
DT
mmm i already tried the above... MIIIIIIIIP doesn't work. GOT YA... for the first time in my life... probably the last too
We must send a 14 bit pack stuff... as it's suppose to!
So i just found that
the above will send cr+lf.Code:@ da "This is a string....",0x068a,0
Sounds like
it works... just harder to figure out. BAH could be worst. And BTW, a 18F will be more appropriate for that.Code:CR con 13 LF con 10 CRLF var WORD CRLF.HighByte=CR CRLF=CRLF>>1 CRLF.LOWBYTE=CRLF.LowByte | LF
About the String placement... you're right. As i figure to place all string at the top, it shouldn't be a problem. All the string together. Make it easy if some modification have to be done.
Last edited by mister_e; - 27th August 2005 at 21:14.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
mmm, another solution...
Just modify a little bit the StringOut SubCode:String1 da "My string",13,10,"blah blah",13,10,125,126,127,0
that way it works. BUT it don't take all the advantage of the 14 BIT pack stuff. It's just more readable the the previous.Code:StringOut: ' Send the string out via Hserout Readcode Addr, TwoChars ' Get the 14 bit packed characters Char = TwoChars >> 7 ' Separate first char if Char then ' Look for Null char, Stop if found hserout [Char] ' Send first char endif Char = TwoChars & $7F ' Separate second char if Char then ' Look for Null char, Stop if found hserout [Char] ' Send the second char Addr = Addr + 1 ' Point to next two characters goto StringOut ' Continue with rest of the string endif return
Last edited by mister_e; - 27th August 2005 at 21:21.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hmmmpf,
Apparently, none of them are right.
With mine, it puts 00's in front of each byte (13,10), that will cause the send routine to terminate early.
With the 0x068a, if there's an ODD number of characters in the string, it will pad the string with a 00, again causing the send routine to terminate early.
So there doesn't seem to be a way to add CRLF on the end of a string with "DA".
Your program seems to have an advantage after all. My apologies.
<br>
DT
How dare you fix my program while I'm still posting that you were right!
Ha ha, Good job!
<br>
DT
OK as i will probably never happen again, i'll write the date/month/year in my notebook with the note
Just kidding Darrelonce in my life, i beat Mr Darrel Taylor
THE Canadian 1
United State 0I learn a lot from all of your previous posts.
Keep up the good work !!!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Oh shoot,
Still has that "Padding the string" problem.
Sendstring still terminates early if the string has an ODD number of charaters.Code:010D 26F9 1073 3A72 00255 String1 da "My string",13,10,"blah blah",13,10,125,126,127,0 34EE 3380 000D 000A 316C 30E8 1062 3661 3400 000D 000A 007D 007E 007F 0000
Almost there.
P.S.<br>THE Canadian 0.99
Last edited by Darrel Taylor; - 27th August 2005 at 22:02.
DT
Maybe this...Code:StringOut: ' Send the string out via Hserout Readcode Addr, TwoChars ' Get the 14 bit packed characters IF TwoChars <> 0 then Char = TwoChars >> 7 ' Separate first char if Char then ' Look for Null char, Don't send if found hserout [Char] ' Send first char endif Char = TwoChars & $7F ' Separate second char if Char then ' Look for Null char, Don't send if found hserout [Char] ' Send the second char endif Addr = Addr + 1 ' Point to next two characters goto StringOut ' Continue with rest of the string ENDIF return
DT
hmmpff... is it me or
is unecesary since we check both character anyway???Code:IF TwoChars <> 0 then
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks