The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [Unix-jun72] confused about disk clearing
@ 2008-05-01 20:37 Brad Parker
  2008-05-01 21:23 ` Tim Newsham
  0 siblings, 1 reply; 2+ messages in thread
From: Brad Parker @ 2008-05-01 20:37 UTC (permalink / raw)



I'm confused about the disk clearing code in u0.s:

...
/ zero i list

1:
	dec    r0 / r0=33.,...,1
dec r1
	jsr    r0,clear / zero block 'r1' on fixed head disk
	tst    r1
	bgt    1b / if blocks 33,...,1 have all been zeroed, done.
...

I had to add the "dec r1" above to get it to work.  Otherwise it loops
forever.  Since 'clear' takes a block # in r1, I'm not sure it could
work as written...

anyone look at this?

If I add the "dec r1" it does write some sort of structure to the disk.  I'm
not sure it's correct, but it wrote a bunch of blocks.

-brad




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Unix-jun72] confused about disk clearing
  2008-05-01 20:37 [Unix-jun72] confused about disk clearing Brad Parker
@ 2008-05-01 21:23 ` Tim Newsham
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Newsham @ 2008-05-01 21:23 UTC (permalink / raw)


> I'm confused about the disk clearing code in u0.s:

It's possible the "cold" code was not maintained?

> / zero i list
>
> 1:
> 	dec    r0 / r0=33.,...,1
> dec r1
> 	jsr    r0,clear / zero block 'r1' on fixed head disk
> 	tst    r1
> 	bgt    1b / if blocks 33,...,1 have all been zeroed, done.

Hmm.. looking at the code the "dec r0" looks like it should be
"dec r1".  The value of r1 at this point is 34 (and r0 is not).
The comment is likely also wrong: "r1=33.,...,1".  This would
agree with the current values.  r0 looks to be used for an entirely
different purpose throughout the code (linking jsr's).

> -brad

Tim Newsham
http://www.thenewsh.com/~newsham/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-01 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-01 20:37 [Unix-jun72] confused about disk clearing Brad Parker
2008-05-01 21:23 ` Tim Newsham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).