fun dwrite(p:int; v:bool) returns ()