'L_T2Dat.mac / convert text array to data / by Kabuneko 99/11/11 proc main const file$ = "data.tmp" dim n,fnum,s$ fnum = freefile() open @@qxdirectory$ + "\" + file$ for output as #fnum do while 1 s$ = @getcursorword$ if @code > 47 then n = val("&h"+s$) print #fnum, chr$(n) ; end if @moverightword if @code = CODE_EOF then exit do loop close #fnum print "DONE!!" end proc
'L_D2Txt.mac / convert data to text array / by Kabuneko 99/11/11 proc main const file$ = "text.tmp" dim i,n,fnum fnum = freefile() open @@qxdirectory$ + "\" + file$ for output as #fnum do while 1 n = @code if n = -224 then 'return code -- can be any of three types i = @ScrLineToCrLine(@Line) 'get current line number if @TextCrReturnCode(i) = 0 then 'get type of return code print #fnum, """0a"",""0d"","; elseif @TextCrReturnCode(i) = 1 then print #fnum, """0a"","; elseif @TextCrReturnCode(i) = 2 then print #fnum, """0d"","; end if else print #fnum, """" + cformat$("%02x",n) + ""","; end if @moverightchar if @code = CODE_EOF then exit do loop close #fnum print "DONE!!" end proc