Code: Select all
s$ = "12"
ReadFile(0,somefile$,#PB_Ascii)
While Eof(0) = 0
redByte = Asc(ReadString(0,#PB_Ascii)
Xit1.W = (Xit1.W << 8) + redByte ;move right byte To the left & add $0D
PokeW(@s$,Xit1.W)
;Evaluate s$
Wend
Code: Select all
s$ = "12"
Xit1.W = 33
Debug Xit1.W ; prove Xit1 has 2 bytes
TAG_CR$ = Chr(13) + Chr(10)
redByte =13
Xit1.W = (Xit1.W << 8) + redByte ;move right byte To the left & add $0D
redByte =10
Xit1.W = (Xit1.W << 8) + redByte ;move right byte To the left & add $0A
PokeW(@s$,Xit1.W)
Debug Len(s$) ; prove Xit1 still has 2 bytes
Debug Hex(Asc(Left(s$,1))) ; NOT showing $0D value
Debug Hex(Asc(Right(s$,1))) ; NOT showing $0A value
If s$ = #CRLF$ ; Does not equal $0DOA but should?!!
Debug "Matched" ; works if 10 and 13 are reversed above?!!
EndIf
Debug "Now Compare #CRLF"
Debug Hex(Asc(Left(#CRLF$,1))) ; NOW showing $0D value
Debug Hex(Asc(Right(#CRLF$,1))) ; NOW showing $0A value


