[Coco] basic09 - append to file
gene heskett
gheskett at wdtv.com
Tue Jan 11 23:10:44 EST 2011
On Tuesday, January 11, 2011 10:46:16 pm Willard Goosey did opine:
> On Tue, Jan 11, 2011 at 07:28:21PM -0500, gene heskett wrote:
> > Yes, and ISTR that the register stack you setup for the syscall can be
> > directly used without changes by doing a seek call with those
> > registers still sitting in the buffer, so once the syscall stack is
> > setup, its just 2 lines of code.
>
> POW! Gene wins!
>
> I looked up B09 SEEK, and GETSTA but I didn't even think about the raw
> syscall for seek!
>
> I always get worried that B09's IO system will get confused (mixing in
> SYSCALL system calls with regular B09 reads/writes), but I
> guess it really doesn't do much buffering on its own?
>
> Willard
Not really Willard, the file pointers current value is still getting as
close to the hardware as you can. One can do it in assembly somewhat
faster once the code is written, but the higher level language does most of
the housekeeping so you don't have to, which equals delivered stable code
faster but generally slightly slower running code. That equals a heck of a
lot fewer calls to F$RegDmp being spliced into your .asm code to verify
that you are doing the housekeeping correctly as you develop the program.
Back when I was writing vfy, there were times when I had calls to F$RegDmp
in it only 4 or 5 lines apart. It pays off, I don't believe it has ever
crashed on anybody, and it was intended to be _the_ swiss army knife of
file tools. And like Topsy, it just kept growing over a period of at least
2 years, until it was more capable than the osk version I modeled it after.
Paul Jerkatis sort of taunted us with his osk stuff back in the day and to
stop his bragging I had him send me a screen text output of it. I looked
at that and said I can do that, so I did. But Paul found some money for a
sun workstation and disappeared to someplace else. Its been fairly
peaceful in coco/os9 land since. I rather like it that way. ;-)
--
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)
The control of the production of wealth is the control of human life
itself.
-- Hilaire Belloc
More information about the Coco
mailing list