Guest User

Untitled

a guest
Jun 18th, 2018
2,839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. --Custom type name, total bytes, and function name
  2. typename="Val*8"
  3. bytecount=4
  4. functionbasename="valueTimesEight"
  5.  
  6. --Function that reads custom value to display properly
  7. function valueTimesEight_bytestovalue(b1,b2,b3,b4,address)
  8.  
  9. return (byteTableToDword({b1,b2,b3,b4}) / 8)
  10.  
  11. end
  12.  
  13. --Function that writes custom value to display properly
  14. function valueTimesEight_valuetobytes(i,address)
  15.  
  16. return unpack(dwordToByteTable(i * 8)) --Thanks FreeER for the unpack() idea.
  17.  
  18. end
  19.  
  20. --Return for CE use
  21. return typename,bytecount,functionbasename
Advertisement
Add Comment
Please, Sign In to add comment