[net.micro.atari16] Problems with Atari Basic

markr@molihp.UUCP (Mark Reid) (02/21/86)

[]
After waiting over three months for my basic from Atari, I finally
received it. Either the manual is incorrect or maybe I'm thick
but I can't get some of the functions to work as described in the
manual. I would appreciate any help...

1) inp()   function is supposed to read from the keyboard single
	characters. I tried inp(-4) to read the status and it only
	returns 16. Try inp(4) which also returns 16. Anybody know
	how this works?
2) wave()   function for producing sound. Manual page is missing the
	table for envelope shape. Would like a complete explaination.
3) buf graphics   what is this? I didn't understand it's use.
4) large files    If you try to load in a very large basic program
	the 520 will load the file from the disk in one large piece,
	then several small pieces. It tells you of no errors.
	The real magic is it will give you all sorts of undefined
	errors, none of which are out of memory errors.

Thanks in advance for any help with the above problems. As I have a
manual I am willing to help others without, just send me which functions
you would like descriptions of.

-------------------------------------------------------------------------------

Mark Reid
ubc-vision!molihp!markr

neil@atari.UUcp (Neil Harris) (02/26/86)

In article <146@molihp.UUCP>, markr@molihp.UUCP (Mark Reid) writes:

> After waiting over three months for my basic from Atari, I finally
> received it. Either the manual is incorrect or maybe I'm thick
> but I can't get some of the functions to work as described in the
> manual. I would appreciate any help...
> 
> 1) inp()   function is supposed to read from the keyboard single
> 	characters. I tried inp(-4) to read the status and it only
> 	returns 16. Try inp(4) which also returns 16. Anybody know
> 	how this works?

The manual is in error -- use INP(2) and INP(-2).  Using SYSTAB to turn off
GEM will make this work very well.

> 2) wave()   function for producing sound. Manual page is missing the
> 	table for envelope shape. Would like a complete explaination.

WAVE a,b,c,d,e
 a=voice to enable.  1 is the default (which is why the SOUND command only
   uses 1 voice normally.  Add 2 to use voice 2, add 4 to use voice 3.  Add 8
   to use noise on voice 1, 16 for noise on 2, 32 for noise on 3.

 b=envelope enable, to use the programmable envelope instead of pure tone.
   Add 1 for voice 1, 2 for voice 2, 4 for voice 3.

 c=which envelope to use.
     	0-3= \________

        4-7= /|_______

    	8=   \|\|\|\|\|

	9=   \_________

	10=  \/\/\/\/\/

	11=    ________
	      \|

	12=   /|/|/|/|/|

	13=    _________
	      /

	14=   /\/\/\/\/\

	15=  /|_________

 d=period of envelope.  Use large numbers, in hundreds or thousands.

 e=duration of sound before next BASIC command is executed.  Usually 0.

NOTE: Best technique seems to be to set WAVE then set SOUND for each voice,
      setting delay>0 only on the _last_ SOUND command.

> 3) buf graphics   what is this? I didn't understand it's use.

This sets up a 32K graphics buffer, so menus and other windows do not
obliterate your graphics.

> 4) large files    If you try to load in a very large basic program
> 	the 520 will load the file from the disk in one large piece,
> 	then several small pieces. It tells you of no errors.
> 	The real magic is it will give you all sorts of undefined
> 	errors, none of which are out of memory errors.

Are you sure?  I never had that problem with my programs.  How large is
large?

--->Neil @ Atari
    Usenet: ...lll-crg!vecpyr!atari!neil
    CIS: 70007,1135
    BIX: neilharris
    Atari BBS: 408-745-5308