Just out of curiosity, how close does my attempt to implement pset() come to the built-in version? Mine appears to be slower.
function my_pset(x, y, c)
addr = 0x6000 + shr(x, 1) + shl(y, 6)
old_val = peek(addr)
if (band(1, x) == 0) then
new_val = c + band(0xf0, old_val)
else
new_val = shl(c, 4) + band(0x0f, old_val)
end
poke(addr, new_val)
end
|
P#22009 2016-06-01 00:13 ( Edited 2016-06-02 23:40)





  2 comments