HDTenEightyP/NetNews huggingface dataset:
From: cooper@carson.u.washington.edu (Ken Cooper)
Newsgroups: comp.sys.amiga.programmer
Subject: Task Switching, tc_Launch() and tc_Switch()
Date: 28 Dec 92 19:37:18 GMT
Article-I.D.: shelley.1hnl1eINNd2m
Distribution: world
Organization: University of Washington, Seattle
NNTP-Posting-Host: carson.u.washington.edu


     I would appreciate it if anybody out there with some knowledge in the
area of Amiga task switching could help me out.  I have been playing around
over the past couple of days with a program that needs to do some monitoring
of task switching so that it can accurately determine task CPU usage, among
other things.  I was attempting to use the tc_Launch() and tc_Switch() function
pointers to do this without any real success.  The steps I was using to do this
was essentially as shown below:

        void launch_function(void)
        {
              /* do the launch function stuff */
        }

        void switch_function(void)
        {
              /* do the switch function stuff */
        }

        void subtask_code(void)
        {
              geta4();
              /* subtask code */
        }

        int main(int argc,char **argv)
        {
              struct Task *subtask;
              .....
              Forbid();
              subtask=CreateTask("mysubtask",subtask_code,0,4096);
              subtask->(*tc_Launch)() = launch_function; 
              subtask->(*tc_Switch)() = switch_function;
              subtask->tc_Flags |= TF_SWITCH | TF_LAUNCH;
              Permit();
              .....
        }

     Due to my lack of success and the poor documentation in the RKM Manuals
(I am running 2.04 and have the 2.04 Libraries, Devices, and Autodocs Manuals)
I have the following questions:

      1)  Do the tc_Switch() and tc_Launch() hooks actually work?
      2)  What is the correct procedure for setting up these functions?
      3)  What is the state of the cpu and registers when these functions are
          called?
      4)  What do these functions need to do to access the program's global
          variable space? (geta4() or reload registers off the stack?)
      5)  Can these functions be written in C or is assembly language required
          due to the answers to questions 3 and 4?
      6)  Out of curiosity, does the TF_PROCTIME bit in the tc_Flags variable
          do anything?  If the PROCTIME accounting does work, where is the
          variable that the time is kept in?
      7)  Are there any other hooks into the EXEC task switching function?

    I would really appreciate answers to any of these questions from anybody
that knows anything about this stuff.  Of course, if it were documented 
properly in the RKM manuals I would need to take up your time.

Best Regards,

Ken Cooper
Applied Physics Laboratory
University of Washington
cooper@u.washington.edu
cooper@apl.washington.edu
Newsgroups: comp.sys.amiga.programmer
From: willw@extro.ucc.su.OZ.AU (William Waring)
Subject: Re: Simple C question
Keywords: PLEASE RESPOND ASAP ;) (vaction almost  over....:) )
Organization: /etc/organization
Date: Thu, 31 Dec 1992 08:38:22 GMT

In article <C02JCH.pC@ccu.umanitoba.ca> umbadiu0@ccu.umanitoba.ca (Ted Babiuk) writes:
>
>Ok....I'm using Lattice/SAS C 5.10 and have done the following...
>
>A have a main program which creates a child task using createtask()....
>
>The child task runs TO FASSST! (its a color cycling routine....)
>
>I've  tried using a Delay(x) or wait(x) function to slow it down and make
>it delay/wait...but this either stops the task entirely (no cycling
>occures?...strange.....with Delay(10) i believe....) or crashes the
>system....:(...
>
>I've been able to do it with a loop as follows:
>
>for (count=0;count<8000;count++);
>......
>cycle colors....etc.
>
>
>BUT this takes processor time.....
>
>I could use the timer.device to do a timed wait but...
>
>there must be an easier way.....
>
>is there something simular to a sleep() command which puts a task to sleep
>for 'x' ticks? (and uses little/no cpu time?)
>
>Thanks in advance,

Okay, do NOT use loops a time delay on the amiga! (Take it to IBM). The
reason why Delay() does not work in your TASK is because it is a TASK and
TASKS's cannot call dos.library functions. Since Delay() is a dos.library
function, it don't work.

There are two solutiuons:
1:	Use the timer.device, which is easier than you think
2:	Turn the task into a process.

Solution to 1: (no I'm NOT a mathmatician)

	Timer device is quite easy to program, once ytou have it going. It
doesn't use the dos.library at all, but uses the hardware is the
recommended way of causing a wait of xxx seconds or however long you want.
Grab a copy of the RKM: Devices manual and read up on the timer device.
Programming a simple wait is quite simple.

Solution to 2:

	Use CreateNewProcTags instead of CreateTask()... Here is an
example:

struct Process *CycleProcess = NULL;
struct Process *MainProcess = NULL;

main()
{
	struct TagItem CycleProcTags[] = {
		NP_Entry,	ColourServer,
		NP_Name,	(UBYTE *)"Colour Cycle Process",
		NP_Priority,	0,
		TAG_DONE};

	
	MainProcess = (struct Process *)FindTask(NULL);

	if (CycleProcess = CreateNewProc(&CycleProcTags))
		{
		Wait(SIGBREAKF_CTRL_C);
		if (!CycleProcess)
			CloseAll("Cycle task startup failed");
		}
	else
		CloseAll("Couldn't create cycle process!");
	}

	Wait(ON_ANYTHING);

	.
	.
	.

}

VOID __saveds ColourServer(VOID)
{
	if (SetupCylceStuff())
		Signal(MainProcess,SIGBREAKF_CTRL_C);
	else
		{
		CycleProcess = NULL;
		Signal(MainProcess,SIGBREAKF_CTRL_C);
		}
	
	while(CheckContinue())
		{
		CycleColours();
		Delay(length);
		}

	etc..
}

BTW: This is obviously a section of code..

Hope this helps...

Regards,
	Eddie
From: jesup@cbmvax.commodore.com (Randell Jesup)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: New hardware reference guide?
Date: 28 Dec 92 19:34:11 GMT
Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
Organization: Commodore, West Chester, PA

paulk@terapin.com (Paul Kienitz) writes:
>> What 25Mhz AGA chip?  AGA still runs at 14Mhz.
> 
>Great.  I heard from about 29000 people that the ones in the 4000 ran
>at 25 mHz, and told 29000 more people this "fact" ...

	The A4000 does (the '040 is 25Mhz).  The Chip memory bus is 14Mhz
(but it double-CASes, unlike ECS).

>> Alice only has 16 data pins, if you noticed.
> 
>Then where's the 32 bit bus at?

	At Lisa and the ram.  Alice can only use it in 16-bit mode, because
Alice is a slightly modified Agnus.

>On the other hand, this is good news because it means it can be
>attached to the A3000's existing chip memory!  (?)

	Nope.

>Someone once told me that C= has a lower R&D budget *for its size* than its
>competitors do.  If that's true you guys have done amazing amounts with no
>resources but sheer human talent, but DAMN it sure would have helped to put
>more into the effort and get it done sooner.

	In $ R&D per $ revenue, Commodore is I think pretty far down there.
(I don't have a report handy.)  I think 1/4, maybe even far lower, compared
to Apple.

-- 
To be or not to be = 0xff
-
Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Disclaimer: Nothing I say is anything other than my personal opinion.
Xref: sparky comp.sys.amiga.programmer:17805 comp.sys.amiga.hardware:22068
From: robart@agora.rain.com (Joe Bob)
Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.hardware
Subject: Re: Attn Commodore: You are making a Big Mistake (Hardware
Date: 25 Dec 92 17:35:30 GMT
Article-I.D.: agora.Bztsv7.DJC
Distribution: world
Organization: a gora

In article <38m5VB4w165w@lakes.trenton.sc.us> rock@lakes.trenton.sc.us (Rockerboy) writes:
>andy@cbmvax.commodore.com (Andy Finkel) writes:
>
>> Copy protection is generally added by people other than those who
>> programmed the game.  Often, its added by programmers hired by
>> the game publisher.  
>
>But the fact that said coding was done 
>by democoders doesn't place the balme entirely on _their_ shoulders.  I 
>suggest that they simply did what the company asked them to do.  


  I believe this excuse is called the "Nuremberg Defense".
From: chucks@pnet51.orb.mn.org (Erik Funkenbusch)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: SAS 6.1 (ARGH!)
Date: 30 Dec 92 10:45:06 GMT
Organization: People-Net [pnet51], Minneapolis, MN.

walker@twix.unx.sas.com (Doug Walker) writes:
>
>In article <8824@orbit.cts.com>, chucks@pnet51.orb.mn.org (Erik Funkenbusch) writes:
>|> Why, oh why could anyone imagine that supplying a struct 
>|> Window * in a TagItem would cause SAS 6.1 to not only complain, but reject the
>|> code as an Error 20:  invalid constant expression?  A TagItem does not use
>|> constants, and a window pointer is certainly not a constant...  This is
>|> annoying to say the least.
>
>I can't tell for sure from your rather vague reference, but my guess
>is that you are attempting to intialize a static or extern struct
>TagItem with a variable.  This is illegal in C.  You cannot use
>expressions that cannot be evaluated at compile time to initialize
>static or extern data items.   If this is a wrong guess, please post
>the code that is producing the message and the actual text of
>the message.
>
>-- 
>  *****
>=*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
> *|. o.| ||                                          1200/2400/9600 Dual
>  | o  |//     For all you do, this bug's for you!
>  ====== 
>usenet: walker@unx.sas.com                            bix: djwalker 
>Any opinions expressed are mine, not those of SAS Institute, Inc.


Yep, ;)

I whipped out my trusty white book, and what do you know.. You can't
auto-initialize pointers, since the pointer is set at run time.

This didn't strike me however, since i was thinking in terms of pointers to
pointers for some reason.. oh well..
From: vac133m@nella7.cc.monash.edu.au (Richard Jones)
Newsgroups: comp.sys.amiga.programmer
Subject: GadToolsBox's ExtNewGadget....LEGAL?
Date: 21 Dec 92 03:15:05 GMT
Organization: Monash University, Melb., Australia.


  All I wanted was a TOGGLE button like I can ask for in GadToolsBox. However,
after generating the source from gtb, I find my toggler buttons don't TOGGLE!
Looking in my RKM I find that TOGGLE GadTools buttons DON'T EXIST.
  Searching through the GadToolsBox source, I find the ExtNewGadget structure
that is used to implement the toggle buttons. It's not documented anywhere..
just stated by the author of the software that it's how the new gadget data is
stored. If this is a private system structure, I'd like to know so I go no
further down that alley.
  If anyone has any LEGAL way of implementing a toggle button (no.. I don't
want a checkbox) using GadTools library, then PLEASE mail (or post) me. If I
have to go down to basic Intuition (or even.. boopsi) then I suppose I will,
but I'd really rather not.

  Thankyou,
     Richard.
-- 
/--------------------------------------------------------------------------\
|Richard Jones, Robotics and Digital Technology, Monash University.     ///|
|  please send all e-mail to .. ... .. drat@yoyo.cc.monash.edu.au   \\\/// |
|                                                                    \///  |
Newsgroups: comp.sys.amiga.programmer
From: umbadiu0@ccu.umanitoba.ca (Ted Babiuk)
Subject: Simple C question
Keywords: PLEASE RESPOND ASAP ;) (vaction almost  over....:) )
Organization: University of Manitoba, Winnipeg, Canada
Date: Wed, 30 Dec 1992 10:48:17 GMT


Ok....I'm using Lattice/SAS C 5.10 and have done the following...

A have a main program which creates a child task using createtask()....

The child task runs TO FASSST! (its a color cycling routine....)

I've  tried using a Delay(x) or wait(x) function to slow it down and make
it delay/wait...but this either stops the task entirely (no cycling
occures?...strange.....with Delay(10) i believe....) or crashes the
system....:(...

I've been able to do it with a loop as follows:

for (count=0;count<8000;count++);
......
cycle colors....etc.


BUT this takes processor time.....

I could use the timer.device to do a timed wait but...

there must be an easier way.....

is there something simular to a sleep() command which puts a task to sleep
for 'x' ticks? (and uses little/no cpu time?)

Thanks in advance,

Ted Badiuk
umbadiu0@ccu.umanitoba.ca

No sig.....Band width friendly.....:)
From: paulk@terapin.com (Paul Kienitz)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: Chunky Pixels vs. Bitplanes (was: Chunky Chip Set...)
Date: 30 Dec 92 21:54:44 PST
Organization: BBS

> Here's the point:  <<EACH SYSTEM HAS TO MOVE THE SAME AMOUNT OF
> DATA>>, but <<PLANAR MUST AFFECT ANY ADJACENT PIXELS IN THE
> BOUNDARY WHILE CHUNKY DOES NOT>>.  (once again ignoring the
> shifting/masking aspects which you seem to patently ignore as if
> they were of no consequence at all)
 
But this entire pronouncement is based on the assumption that you
just happen to be using a number of bitplanes that exactly matches
the depth of the chunky display.  In other words, artificially
dismissing the one factor which is the sole reason why anyone ever
chose planar in the first place.
 
BTW, Jay Miner once told me that if they'd done the A1000 a few years
later he would have used VRAM for the chip memory.  If they had done
that as the first significant upgrade to the chipset, like maybe
around the time they were working on the 3000, we wouldn't have had
to wait nearly as long for better depth/resolution performance...
Newsgroups: comp.sys.amiga.programmer
Subject: Re: Big mistake - A compromise (of sorts)
From: alien@acheron.amigans.gen.nz (Ross Smith)
Date: 23 Dec 92 09:01:25 GMT+12
Distribution: world
Organization: Muppet Labs

In article <1992Dec18.211223.29630@clipper.ingr.com> kontos@clipper.ingr.com (Thorne Kontos) writes:
>
>     Since I believe I started this thread, let me put forth a compromise
>solution. There are two classes of people who will continue to write
>software for the Amiga. The professional programmer who is attempting to
>create a piece of software that may become a viable commercial product
>is one of these. The other is the hardware hacker/demo coder who writes
>"demos" for fun. The obvious solution given that Commodore does not wish
>to release the AGA specs, is to release code that will allow the hacker
>to bang the hardware, yet return to the normal OS when the demo is
>finished. A generic piece of code that covers all Amigas (regardless of
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>configuration) would be perfect. In this manner, the demo coders can happily
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>bang the hardware all they want, but by using this snippet of code, the
>computer can be returned to its "normal" state, without having to do
>the three finger salute and reboot the machine which is so prevalent among
>the current demos that I have seen. So what do you think?
>     IMHO, this solution works well, and satisfies all. Commodore does not
>have to release the AGA specs. Demo coders will be able to continue to code
>demos, but they will be OS friendly demos. Professional programmers can and
>will continue to use the normal OS function calls.

The whole point of the pro-OS argument is that, since C= want to be able to
change the hardware in whatever way they please (IMHO a Good Thing), "a
generic piece of code that covers all Amigas (regardless of configuration)"
would be *impossible*.


--
...... Ross Smith (Wanganui, NZ) ...... alien@acheron.amigans.gen.nz ......

This is not a disclaimer, but it plays one on TV.

--
From: stern+@pitt.edu (Eric G Stern)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: What is htonl() ?
Date: 23 Dec 92 12:08:33 GMT
Organization: University of Pittsburgh


htonl() is a function from the BSD networking library.  It converts
a long from "host byte order" to "network byte order".  This is to
deal with certain architectures that store four byte objects with
the least significant byte in the lower byte address, while the
(BSD) network specifications say that four byte objects (network addresses
for instance) are stored and transmitted with the most significant byte
first.  For the Amiga, and most unix-boxes (except DEC) this function
is probably a no-op.

				Eric Stern
From: jonallen@acsu.buffalo.edu (Jon J. Allen)
Newsgroups: comp.sys.amiga.programmer
Subject: Power Windows 2.5
Date: 1 Jan 93 01:33:38 GMT
Organization: SUNY AT BUFFALO Computer Science
X-Newsreader: TIN [version 1.1 PL8]

I was looking for Power Windows 2.5 today, byt all the places I called
said that it was out of stock.  At least the ones who knew what I was
talking about.  

My local Amiga shop said that it was a "Slow Mover"  

So, what's up with this package?



--
--Jon-J-Allen--jonallen@cs.buffalo.edu----Computer-Science--SUNY-@-Buffalo-NY--
"This is the end, my only friend, the end.
  the end of all I have known."  - The Doors

-- 
--Jon-J-Allen--jonallen@cs.buffalo.edu----Computer-Science--SUNY-@-Buffalo-NY--
"This is the end, my only friend, the end.
  the end of all I have known."  - The Doors
From: dnavas@oracle.uucp (David Navas)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: THANK YOU!! (ReadArgs()).. but I'm handling something wrong
Date: 22 Dec 92 18:08:41 GMT
Organization: Oracle Corporation, Redwood Shores CA
X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

In article <38083@cbmvax.commodore.com> jesup@cbmvax.commodore.com (Randell Jesup) writes:
>2) It's best to define an enum or a bunch of defines, one
>for each parameter in the template.  This means that if you change the
>template, all you have to do is change the enum/defines, instead of searching
>through your source code.

Well, that's better, but....

What's best is to define a set of routines for your "state" variables which
can be changed at run-time either via rexx or the command-line (run the
program again? -- depends on the program, often times), and store these
strings in some kind of localizable file.

I've got the command-line reset working, the rexx stuff ready to be hooked
up (more or less), but am lacking in the localizable area (this is for my
WEB modules -- shameless, but short, plug).

It's very handy, you write this interface once, and then all you have to do
is give a state description for every one of your different programs.
Really, quite nice :)

What's even more fun is that, strictly speaking, all of these web programs
are really just subclasses off of one Module_Services program, so they
literally inherit this behaviour automatically, without a sizable
increase in code size (a few bytes to make sure Module_Services is up
and running :)).

Frankly, that sort of thing would be nice to have in the OS....

David C. Navas						dnavas@oracle.com
Working for, but not speaking on behalf of, Oracle Corp.
Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.misc
From: dege@umn-cs.cs.umn.edu (Dege Jeffrey Charles)
Subject: Re: SAS C6.1 datecmp bug [Was: Re: Advice to SAS/C 5.10b users]
Organization: University of Minnesota
Date: Thu, 24 Dec 1992 02:24:59 GMT

In <rlcarr.09a3@animato.network23.com> rlcarr@animato.network23.com (Rich Carreiro) writes:

>In article <BzMJJB.84z@unx.sas.com> jamie@cdevil.unx.sas.com (James Cooper) writes:
>> Let's see... counting everyone at Commodore (U.S.), plus the people here, plus
>> the regular poeple we recruited through other means, we had about 70 - 100
>> people testing the heck out of 6.0.  We all thought that was enough...
>> 
>> Doug was correct.  Out of all those people, things can still slip past... for
>> instance, one of the things fixed in 6.1 over 6.0 was not being able to compile

>Slip past?  SLIP PAST?  How on earth did the MATH=68881 bug manage to 
>"slip past."  Even though I admittedly don't use it much, I fail to
>comprehend how any decent testing procedure could have let that fall through
>the cracks.  It wasn't like it was a subtle, hard-to-reproduce problem.


    I've been working (HORRORS) with a commercial Basic package that coredumped
when you called a function in the test expression of a while-loop.  I found it
astounding that nobody had done such a thing in testing or in the year and a
half since the release of the product.  (I am quickly growing to loath Basic
programmers.)  So I'm much less astounded when a vendor lets something slip
by testing that I would have thought should have been caught.
 
===========================================

Newsgroups: comp.sys.amiga.programmer
From: epang@fraser.sfu.ca (Eugene Pang)
Subject: Re: Aztec Tech Support on BIX -- address?
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Tue, 22 Dec 1992 05:15:01 GMT

walker@twix.unx.sas.com (Doug Walker) writes:
>This might be a good time to mention that there is a Manx-SAS
>upgrade offer for version 6.0.  You send in one page from your
>Manx manual and get a 50% discount off the retail price, [...]

Can that page be one of the 3 blank pages at the back of the Manx manual?
:-)
From: mbs@adastra.cvl.va.us (Michael B. Smith)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: problems with gcc222-fix1.lha
Distribution: world
X-NewsSoftware: GRn-beta 1.16g (26.12.92) by Michael B. Smith & Mike Schwartz
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Date: 29 Dec 92 22:57:00 EST
Organization: Well, I haven't decided on a name yet...

In article <benjamin.725669648@manning> benjamin@cs.UAlberta.CA (Ben Ferreira) writes:
> and it keeps going.. after all 3 fix files have been executed I can only
> compile c and not c++ code properly.  Could someone tell me what's going on
> here?
>
> By the way, I DID assign all the proper dirs and paths as in the README file.
>
> Thanks for any help,

I recommend that you get GCC 2.3.3 (available as of about 2100 EST (-5) today)
and reinstall from scratch. All 3.6 MB compressed, 9.6 MB uncompressed.

I've got the un-lha running right now....
--
  //   Michael B. Smith
\X/    mbs@adastra.cvl.va.us  -or-  uunet.uu.net!virginia.edu!adastra!mbs
From: sjchmura@kimbark.uchicago.edu (steven joseph chmura)
Newsgroups: comp.sys.amiga.programmer
Subject: Re: Subliminal Messages
Date: 3 Jan 93 06:17:13 GMT
Reply-To: sjchmura@midway.uchicago.edu
Organization: University of Chicago

In article <Paul_Trauth.1bkb@agwbbs.new-orleans.LA.US> Paul_Trauth@agwbbs.new-orleans.LA.US (Paul Trauth) writes:
>In a message dated Sat  3 Jan 93  1:48, Gene_ruebsamen@republik.fidonet.org
>wrote:
>
> G> I am trying to figure out a way to get my A3000 to flash a text
> G> message on the screen for a brief period of time (about 1/15th to
> G> 1/30th)
>
>I remember one utility for the C64 that attempted to include a subliminal.
>Every so often, it would flash, for one frame, the words "Support
>Shareware!" at a point on the screen. Once i discovered this, i quit using
					^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>it...
^^^^
Why?  Are you scared of your computer?

-- 
________________________________________________________________________________Steven Chmura				University of Chicago Medical School(M1)
  "Given enough time, the impossible becomes probable, and the probable
	inevitable.."  -George Wald, "On the Origins of Life"
Newsgroups: comp.sys.amiga.programmer