[Coco] NitrOS-9 boot module common code
Gene Heskett
gene.heskett at verizon.net
Tue May 11 23:01:01 EDT 2010
On Tuesday 11 May 2010, Roger Taylor wrote:
>Here's a snippet from the boot_common.asm file that caught my eye.
>Back2Krn
> lbsr HWTerm call HW termination routine
> ldx blockimg,u pointer to start of os9boot in memory
> clrb clear carry
> ldd bootsize,u
>
>Doesn't ldd bootsize,u set the CPU Carry? Is clrb really
>needed? Heck, every byte counts since the limit is $1D0 bytes.
I don't believe so Roger. When loading an INT to an INT sized register,
there can be no condition which would cause a carry. If that byte is
valuable, it might be worthwhile to do a one time F$RegDump call to see if
there are any situations where HWTerm might return with a set carry. If not,
save that byte.
>Also, in NitrOS-9 Level Two, can I "request" 512 bytes of space in
>the same manner as the 256-byte stack adjustment or is this pushing
>my luck? I need to add an optional 512-byte sector mode to my Drive
>Pak modules and just need to find the space so I can use a simple
>deblocking scheme.
AFAIK, you can request as much free memory as the system might have in
contiguous blocks at that instant. So 512 bytes basically means you must use
an int sized register for the pointer into it, byte sized stuff won't work.
You would probably need another 16 bytes to hold the pointers and such that
access that 512 byte buffer. Actually, 2 of them so you can keep reads and
writes properly segregated. In any event, I would not do it with a stack
pointer adjustment, there be sharks in those waters.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
"His great aim was to escape from civilization, and, as soon as he had
money, he went to Southern California."
More information about the Coco
mailing list