All pastes #396941 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-16 03:12 UTC
rendered paste body
	function writebit($offset, $location, $fill){
		global $rom;
		if ($fill == 0){
			if ($location == 0) {$change = 0x80;}
			if ($location == 1) {$change = 0x40;}
			if ($location == 2) {$change = 0x20;}
			if ($location == 3) {$change = 0x20;}
			if ($location == 4) {$change = 0x08;}
			if ($location == 5) {$change = 0x04;}
			if ($location == 6) {$change = 0x02;}
			if ($location == 7) {$change = 0x01;}
		}
		
		$rom[$offset] = ($rom[$offset] | $change);
		return 1;
	}