
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
Hello, Thanks Achim, I’ll be the first to admit that you are correct! ;) Your idea also gave me a new idea, have a look. It looks a lot “cleaner” this way. Thanks again, H.J. Windt define nr byte[1] define temp byte[2] define variable word[2] for nr = 0 to 5 looktab cheksum, nr, variable gosub print_hex next end #print_hex put &h26 : put &h68 temp = (variable and 61440) shr 12 : if temp < 10 then put temp + &h30 else put temp + &h37 temp = (variable and 3840) shr 8 : if temp < 10 then put temp + &h30 else put temp + &h37 temp = (variable and 240) shr 4 : if temp < 10 then put temp + &h30 else put temp + &h37 temp = (variable and 15) : if temp < 10 then put temp + &h30 else put temp + &h37 print"" return Table cheksum &H64 &H65 &H66 &H67 &HFFFF &hA tabend |
| Antwort schreiben |