home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 601-625 / apd612 / articles / amos_bbs.asc next >
Text File  |  1993-09-09  |  23KB  |  628 lines

  1. This little beauty of a text file was downloaded from a bulletin board and
  2. passed on to me, it originally contained the text to the Amos manual but
  3. for copyright reasons I have had to cut it out.
  4.  
  5. The Amos AmigaGuide help file main subjects:
  6. --------------------------------------------
  7.  
  8. Date: 17 Jun 93 18:15:00 EST
  9. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  10. Subject: Re: Processor type
  11. To: "amos-list" <amos-list@ccess.digex.net>
  12.  
  13.   To find out the type of processor being used, look at the word at offset
  14. 296 in ExecBase [=Deek(Leek(4)+296)].  The bits are as follows:
  15.  
  16. Processor:
  17.   Bit 0 = 68010 or better
  18.       1 = 68020 or better
  19.       2 = 68030 or better
  20.       3 = 68040 or better
  21.  
  22. Co-processor:
  23.   Bit 4 = 68881 or better
  24.   Bit 5 = 68882 or better
  25.  
  26.   So, to determine the actual processor, find the highest set bit in each
  27. field.  That bit indicates the processor.
  28.  
  29.   --Andy Church
  30.  
  31.  
  32. Date: Mon, 12 Jul 93 15:46 GMT0BST-1
  33. From: Phil South <snouty@ix.compulink.co.uk>
  34. Subject: Amos Pro Compiler
  35. To: amos-list@ccess.digex.net
  36.  
  37. This full review will be appearing in Amiga Computing. Or at least a
  38. version of it. Enjoy, my fellow AMOS fiends, or should that be
  39. friends? No I like fiends.
  40.  
  41. Phil
  42.  
  43. -------------
  44. Review
  45.  
  46. AMOS Professional Compiler
  47.  
  48. Phil South reviews the latest addition to the AMOS family, but when
  49. all the dust settles is it any cop?
  50.  
  51. This is the AMOS product that's perhaps been more hotly debated and
  52. more eagerly awaited than just about any other. The thing is that
  53. AMOS as a development system was pretty much perfect, and the only
  54. thing missing from Pro, apart from a really good bug fixed version,
  55. was the compiler.
  56.         Now don't get me wrong, I know I'm always banging on about
  57. how Pro is buggy but that's not because it's completely no good. No
  58. no no. It's just that it's at the stage that AMOS was a few years ago 
  59. when it first came out. It just needs a lot of use before all the
  60. bugs in the new features can be ironed out.
  61.         You see AMOS Pro is actually still the basic AMOS program you 
  62. know and love, but there's been a lot of augmentation, and it'll take 
  63. a while for the code to settle down after all the additions have been 
  64. used a lot and all the bugs ironed out. But it will happen, and truth 
  65. be told I'm going to start using Pro a lot more now. I know I said it 
  66. would take a while to make me switch from AMOS Classic, and I know
  67. I'll still have that to fall back on should Pro let me down. But it's 
  68. time to start having a little faith in the new program, and helping
  69. to iron out bugs rather than just sitting here griping about them
  70.  
  71. New Compiler Old Compiler
  72. The same things I just said about the Pro compiler are true about Pro 
  73. Compiler. It's still basically the same engine under the hood, just a 
  74. new 1993 body and few technical enhancements which affect the way the 
  75. thing drives, a bit like a Mondeo.
  76.         The face is different, that is to say that the front end
  77. program is much altered, and it runs from an icon rather than being
  78. loaded into AMOS, but I guess this just means that the program has
  79. been compiled. The compiler works with previous versions of the AMOS
  80. program like AMOS and Easy AMOS, so you can buy the new compiler even 
  81. if you don't yet have the newest version of the language.
  82.  
  83. New Commands
  84. The compiler obviously copes with all the new versions of AMOS Pro
  85. and all the new commands which have been added to the language since
  86. the last compiler was built. This obviously takes in all the ANIM
  87. player commands and music player commands too, and the library for
  88. compiled programs to share means small programs if the target
  89. computer for your programs is running the correct amos.library. Even
  90. though you should use the shared library setting if you want to be
  91. sure people can run your programs, this is a big saving on size and
  92. so should be considered if you know everyone who'll be using your
  93. code.
  94.         You can do the usual squash command to compress the files,
  95. but you know every time I use this something goes wrong, not just in
  96. Compiler Pro but in the old Compiler too. I tend to forget that and
  97. use PowerPacker for online compression and decompression. The remove
  98. default screen problem is still there too. If you program uses and
  99. unpack command then the screen is automatically created into your
  100. default screen right? But if there is no default screen the screen
  101. can't be created, so no go.
  102.         You can also load in ASCII files for compilation, which is
  103. handy if you want to develop your programs on a laptop or palmtop
  104. word processor and transfer them for compilation. (I could use my
  105. trusty Portfolio, even!) There is talk too of this compiler being
  106. even faster than the original compiler. That is very hard to test,
  107. and really I couldn't see any difference. (If anyone at Europress can 
  108. send me a reliable benchmark program, I'll be happy to run it, if not 
  109. print it in the next issue!) But the program sizes were very
  110. different with a shared library. 61K including library plays 18k
  111. without. Not bad, but not totally portable to any machine which
  112. doesn't run the amos.library, so not really as good as a fully
  113. optimised compiler which would not include any commands not used in
  114. the program itself.
  115.  
  116. Free AMOS Pro 2.0
  117. The program comes free with an updater to make your you have the
  118. latest version of AMOS Pro on your machine. I must admit I found this 
  119. a little bit odd. I installed the AMOS Pro program about 10 seconds
  120. before I tried to use the updater, and I got an error message saying
  121. I needed to use the correct path. I was using the correct path,
  122. dammit, and I couldn't get it to change it's tune, so I killed it and 
  123. installed to floppies, then RE-INSTALLED the new version to hard
  124. disk. This got up my nose more than a little, but I still can't
  125. figure out what the problem was.
  126.  
  127. Conclusion
  128. Despite all these niggles and quibbles I do think the release of this 
  129. program should be applauded, for no other reason than it allows us
  130. serious AMOS users to put our backs into it and see if AMOS Pro
  131. really has what it takes to be the Amiga development system of the
  132. 90s.
  133.         Obviously seasoned users will see that this is not anything
  134. new, but rather an upgrade of what has gone before. It's a tool, it
  135. does the job, but as my old man would say "if I wanted something to
  136. write home about I'd have been to the circus." Funny chap, my old
  137. man.
  138.  
  139.  
  140. (ENDS)
  141.  
  142.  
  143. AMOS 3D
  144. BITPLANES
  145.  
  146. OM FILEFORMAT
  147.  
  148. The om fileformat can be found in the file SimStructs on the object modeller disk
  149.  
  150. AMOS PRO CONFIG FILE
  151.  
  152. Date: 7 Sep 93 14:32:00 EST
  153. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  154. Subject: Re: Configuration
  155. To: "amos-list" <amos-list@ccess.digex.net>
  156.  
  157. >What is the name, and location of the configuration file used by AMOS
  158. >Pro? I added an extension, it won't run now, etc. I'm sure there are
  159. >lots of people out there who have had this same problem.
  160.  
  161.   It's S:AMOSPro_Interpreter_Config.
  162.  
  163.   --Andy Church
  164.  
  165.  
  166. Date: 12 Sep 93 11:41:00 EST
  167. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  168. Subject: Re: PAL/NTSC
  169. To: "amos-list" <amos-list@ccess.digex.net>
  170.  
  171. >Is there an OS call to change between NTSC and PAL? Or would it be easier
  172. >to Poke something? It can't be too hard, Mode_Switch is only 4K... can
  173. >someone help?
  174.  
  175.   Just Doke $DFF1DC,x.  For NTSC, x=0; for PAL, x=$20.
  176.  
  177.   Note that this only works on ECS systems (and probably AGA, although I
  178. haven't been able to test it).
  179.  
  180.   --Andy Church
  181.  
  182.  
  183. MATH
  184. MENUS
  185.  
  186. Date: 15 Sep 93 12:08:00 EST
  187. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  188. Subject: Re: Amos bugs, and thankyous
  189. To: "amos-list" <amos-list@ccess.digex.net>
  190.  
  191. >  Another bug I found is with the arccos function (hold on...but you don't NEED
  192. >arccos for vectors.....well, tis fixed now but still).  When you feed in very
  193. >small values (order of about 1*10^-7) it returns ludicrous values.  tsk tsk!
  194.  
  195.   It seems that a lot of the transcendental functions give bad return values
  196. in certain cases.  Try Cos(90) and see what you get.  It's not 0, but
  197. something like 10^-7, which was enough to make my vertical lines diagonal.
  198.  
  199. [18-line signature deleted]
  200.  
  201.   Please, don't get carried away!  Signatures are fine, but not HUGE ones!
  202.  
  203.   --Andy Church
  204.  
  205.  
  206. (DE)ACCELERATION
  207.  
  208. From: Mikko Makela <mmmakela@c.helsinki.fi>
  209. Message-Id: <199309151748.AA05528@ruuna.helsinki.fi>
  210. Subject: AMAL-routine
  211. To: amos-list@ccess.digex.net
  212. Date: Wed, 15 Sep 1993 20:48:22 +0300 (EET DST)
  213.  
  214. Quite many of you showed interest with this, so I'm sending
  215. this to the list (it's < 2k).
  216. I decided to make litle demonstration program out of it, just
  217. to make it easier to understand.
  218.  
  219. --------------------cut here-------------------
  220.  
  221. 'This is a small demo program to show, how to use AMAL's Move-command
  222. 'for (de)acceleration of objects.
  223.  
  224. 'Programmed by Mikko Mdkeld
  225.  
  226. BALL=4 : Rem amount of balls
  227. _TOPSPEED=200 : LOWEST_POSSIBLE_STEPCOUNT=4
  228. 'R2 must not > RB (topspeed) 
  229. 'RC will tell the lowest possible number of steps in movement. 
  230. Amreg(1)=_TOPSPEED : Amreg(2)=LOWEST_POSSIBLE_STEPCOUNT
  231.  
  232.    'if ball hits the wall, main program will set R4=1, so 
  233.    'that the Move command will be initiliazed.
  234. A$="AUtotest (If R4=1 Jump Wall "
  235.    'if ball must be stopped, R3 will be set to 1, and 
  236.    'to continue the movement R3->2  
  237. A$=A$+"If R3=1 Jump Hold ;If R3=2 Jump Go on "
  238.    'R2 will be decreased every time the autotest is run, and
  239.    'if it's <1, ball will be stopped. 
  240.    'R2 is also used to count in how many steps will the movement be done. 
  241. A$=A$+"If R2<1 Direct Owait else Let R2=R2-1 eXit "
  242. A$=A$+"Wall:Let R4=0 Direct Begin "
  243. A$=A$+"Hold:Direct Sleep; Go on:Let R3=0 Direct Begin)"
  244.    'Here is the Move command
  245. A$=A$+"Begin:If R2<1 Jump Owait; Move R0,R1,RC*RB/R2; Jump Begin "
  246. A$=A$+"Sleep:Wait ;Owait: If R2>0 J Begin Pause J Owait "
  247.  
  248. 'let's make an boject to move
  249. Circle 100,100,7 : Paint 100,100 : Get Bob 0,1,90,90 To 111,111 : Cls 1
  250.  
  251. 'init each ball
  252. For L=0 To BALL-1
  253.    Channel L To Bob L
  254.    Bob L,80+L*15,80+L*15,1
  255.    Amal L,A$
  256.    Amreg(L,4)=1
  257. Next L
  258. 'try different values for speed,range & angle
  259. RSPEED=5000
  260. RANGE=50
  261. ANGLE#=3.3
  262. For L=0 To BALL-1
  263.    Amreg(L,0)=RANGE*Cos(ANGLE#-L*0.1) : Rem x-movemnt
  264.    Amreg(L,1)=RANGE*Sin(ANGLE#-L*0.1) : Rem y-movement 
  265.    Amreg(L,2)=RSPEED/RANGE+1 : Rem speed
  266.    Amreg(L,3)=0 : Rem just to make sure
  267.    Amreg(L,4)=1 : Rem to init movementsequence 
  268. Next L
  269.  
  270. Synchro Off : Amal On 
  271. Repeat 
  272.    For L=0 To BALL-1
  273.       'test for left screenborder
  274.       If X Bob(L)<1
  275.          Amreg(L,0)=-Amreg(L,0)
  276.          Amreg(L,4)=1
  277.          Bob L,0,,
  278.       End If 
  279.    Next L
  280.    'try without wait! 
  281.    Wait 2
  282.    Synchro 
  283. Until Amreg(0,2)<1
  284. End 
  285.  
  286.  
  287.  
  288.   The AMOS Procedure Library is a library of procedures for use in AMOS
  289. programs.  (Surprise, surprise... :-) )  The procedures were submitted to me
  290. by various people on the AMOS list.  They can be easily merged into your
  291. AMOS programs to save you the time of writing them yourself.  The latest
  292. version of the Procedure Library can be found on AmiNet as
  293. dev/amos/ProcLib20.lha .
  294.  
  295.   I accept any kind of procedure, large or small.  However, Paul Hickman
  296. came up with the concept of Screen Eaters at one point - routines which
  297. clear the screen in interesting ways.  I was hoping to see some more of
  298. those (hint, hint), and possibly their counterparts, Screen Vomiters.
  299.  
  300. Date: 1 Oct 93 12:06:00 EST
  301. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  302. Subject: Procedure Library v1.0
  303. To: "amos-list" <amos-list@ccess.digex.net>
  304.  
  305.   I am in the process of uploading the initial release of the AMOS Procedure
  306. Library to AMINET.  I've run into some problems, but I expect the library to
  307. be available in 2-3 days.  The file is:
  308.  
  309. /pub/AMINET/dev/amos/ProcLib.lha
  310.  
  311.   Below is the list of procedures in the library. (ver 1.0)
  312.   A recent list should be sent to THE AMOS EMAIL LIST as soon as it is ready.
  313.  
  314.   --Andy Church
  315. ----------------------------
  316. _DOSERROR[ERR]
  317.   Returns the AmigaDOS error message for the given error code.
  318. _FAST_ELLIPSE[XC,YC,RX,RY,_FILLED]
  319.   Draws an ellipse using integer math.
  320. _FAST_LINE[X1,Y1,X2,Y2]
  321.   Draws a line using integer math.
  322. _MAKEMASK[_SCREEN,_COLOUR,TEMP1,TEMP2,X1,Y1,X2,Y2,_ICON]
  323.   Makes a mask for an icon with a given transparent colour.
  324. OPENFONT[NAME$,SIZE,_REM]
  325.   Opens or closes a font.
  326. _PALETTE_TO_ANTIQUE[_SCREEN]
  327.   Converts palette to "antique photograph" colours.
  328. _PALETTE_TO_BW[_SCREEN]
  329.   Converts palette to black and white.
  330. _PALETTE_TO_NEGATIVE[_SCREEN]
  331.   Converts palette to negative colours.
  332. _SEPARATE_RGB[_SCREEN,X]
  333.   Filters colours in picture.
  334. _SHADOW_TXT[X,Y,_FG,_BG,_TXT$]
  335.   Writes shadowed text to the screen.
  336. _TO_NTSC
  337.   Switches display to NTSC mode.
  338. _TO_PAL
  339.   Switches display to PAL mode.
  340.  
  341.  
  342. Date: 21 Sep 93 17:40:00 EST
  343. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  344. Subject: Procedure library (again)
  345. To: "amos-list" <amos-list@ccess.digex.net>
  346.  
  347.   When you send me a procedure for inclusion in the library, please also
  348. include a short "readme" file (like those on AMINET) that describes what the
  349. procedure's function is.  If possible, I'd also like an example program that
  350. I can use to test the procedure, just to make sure it works.
  351.  
  352.   I'd prefer that you use the following format for your readme file:
  353.  
  354. [Required items]
  355. NAME_OF_PROCEDURE
  356.   Description   : A short description of the procedure's function.  1 or 2
  357.                       sentences should be enough in most cases.
  358.   Calling format: How to call the procedure, and what its parameters are.  E.g.
  359.                   MYPROC[num1,num2,sumadr]
  360.                       num1,num2 - numbers to work with
  361.                       sumadr    - ADDRESS of sum (use Varptr())
  362.   Return value  : What your procedure returns.  If none, write "None".
  363.   Author        : Your name, and your e-mail address.
  364. [Optional item]
  365.   Special notes : If your procedure only works with AMOS Pro, or if it requires
  366.                       a special library, or another procedure, say so here.  If
  367.                       there's anything else you think I should know, put that
  368.                       here too.
  369.  
  370.   --Andy Church
  371.  
  372.  
  373. team@lick.clare.tased.edu.au
  374.  
  375. Date: 22 Sep 1993 17:36:23 -0500 (EST)
  376. From: Tom Plackowski <tom@lms.concept.com.au>
  377. Subject: Re: SoundFX
  378.  
  379. >Hello, I need some SFX (fairley small if possible) for my game.
  380. >Some good explosions, missile and changun sounds, and the sound of
  381. >a helicopters rotor.
  382.  
  383. >Does anyone have or know where I can get sounds like these?
  384.  
  385. Have a poke around at:
  386.  
  387.       SOUNDS.SDSU.EDU
  388.  
  389. This is their readme:
  390.  
  391. This is the brand new (well, almost...) machine which will provide access
  392. to the sun sounds archive.
  393.  
  394. All sounds are in /sounds.
  395.  
  396. ATTENTION FRIENDLY HELPFUL ARCHIVE USERS:
  397. I am in need of some help.  As you will notice, each directory now contains
  398. a file called 'INDEX' which is a list of the sounds in that directory
  399. with an optional description.  This discription is to be gotten from the
  400. header of the sound file.  My request is: Most sounds do not have an sort
  401. of info with them.  Could you be so kind to send me some descriptions of
  402. sounds so that I can add them to the headers?  This would really help out
  403. me and other people as well.
  404. The INDEX files are generated nightly by a program I wrote called soundinfo
  405. This program is also available for anonymous ftp in /pub/soundinfo.shar
  406. It also allows one to change the header info string of a sound.
  407.  
  408. If you have a request for a certain song, please don't mail the request to
  409. me since I am not very likely to have the song on CD.  However, you put
  410. requests in the /sound_requests directory.  If everyone with record
  411. abilities will look in that directory every once in a while and record
  412. some of the requested sounds, it would make a lot of people a lot happier.
  413. (If you do upload a sound that was requested, please remove the original
  414. request, so multiple people do not upload the same sound...)
  415.  
  416. If you want to know how to play these sounds, how to convert them, or
  417. how to annoy other people with them, please read the README.sounds
  418. file in this directory.
  419.  
  420. As always keep those sounds coming!
  421. Always upload new sounds in /incoming, please.
  422. I would very much like to expand the database of sound effects, cartoon
  423. sounds and things like that, so if you have some, upload them!
  424.  
  425. If you have questions/comments/money, send mail to turtle@ciences.sdsu.edu
  426.  
  427. --Andrew
  428. ____________________________________________________________________________
  429. Andrew "Race Turtle" Scherpbier, SysMgr
  430. College of Sciences
  431. San Diego State University
  432. turtle@ciences.sdsu.edu
  433. Voice: (619) 594-5026
  434. Fax:   (619) 594-6381
  435.  
  436.  
  437. // Tom
  438.  
  439. From: sfmcnally@IX.com
  440. Subject: Bitplanes
  441. To: amos-list@ccess.digex.net
  442.  
  443. Well, bitplanes are how all graphics on the Amiga are stored.
  444. (If you understand Binary numbers it's quite simple)
  445.  
  446. Every image is made up of a number of bitplanes according to how many
  447. colors it uses, 1 bitplane for 2 colors, 2 planes for 4 colors,
  448. 3 planes for 8 colors, and 5 and 6 planes for 32 and 64 colors.
  449. (You can allso go to 7 and 8 planes for 128 and 256 colors on AGA
  450. machines)
  451.  
  452. In every bitplane, one bit represents one pixel, so a byte (8 bits)
  453. of a bitplane would be 8 pixels across.
  454. At it's simplest, with one bit plane wherever there's a set bit 
  455. in the bitplane that pixel will be in color 1, a binary 0 in
  456. one of the bits means color 0 at that pixel.
  457.  
  458. To get more colors the system adds up the bits of all the planes
  459. at a certian pixel and that makes the color number.
  460. Say at pixel A plane 1 is set to 0, plane 2 is set to 1, and plane
  461. 3 is set to 1, combining those will make the binary number %011
  462. which is 6 in normal numbers, so at that pixel there would be
  463. color 6.
  464.  
  465. Now to change the colors of bobs you can tell the blitter NOT
  466. to draw certian planes, so if in the above example you told the
  467. blitter NOT to draw plane 2 the color would be %001, or 4.
  468.  
  469. Now for a turtle on a 16 color screen, you should draw the turtle
  470. images in color 15, 15 is %1111 in binary, so then you can change
  471. the turtle to ANY color JUST by not drawing certian combinations
  472. of planes on the screen!   :)
  473.  
  474. Lets see...  ::going for manual::
  475.  
  476. Ok, if you have a bob drawn in color 15, on a 16 color screen,
  477. this bit of code will draw the bob in color "COLOR":
  478.  
  479. Set Bob 1,,COLOR,
  480. Bob 1,X,Y,TURTLE_IMAGE
  481.  
  482.  
  483. Where turtle_image is the image number for the turtle.
  484.  
  485. :)
  486.  
  487. Seumas
  488.                     ------------------------
  489.  
  490. Date: 27 Sep 93 21:23:00 EST
  491. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  492. Subject: Re: Bitplanes
  493. To: "amos-list" <amos-list@ccess.digex.net>
  494.  
  495.   A little clarification here...
  496.  
  497. >In every bitplane, one bit represents one pixel, so a byte (8 bits)
  498. >of a bitplane would be 8 pixels across.
  499. >At it's simplest, with one bit plane wherever there's a set bit 
  500. >in the bitplane that pixel will be in color 1, a binary 0 in
  501. >one of the bits means color 0 at that pixel.
  502.  
  503.   This is right.  However...
  504.  
  505. >To get more colors the system adds up the bits of all the planes
  506. >at a certian pixel and that makes the color number.
  507. >Say at pixel A plane 1 is set to 0, plane 2 is set to 1, and plane
  508. >3 is set to 1, combining those will make the binary number %011
  509. >which is 6 in normal numbers, so at that pixel there would be
  510. >color 6.
  511.  
  512.   This is wrong -- you're numbering the planes backwards.  What you should
  513. have said is this:
  514.  
  515. Say at pixel A plane *2* is set to 0, plane *1* is set to 1, and plane
  516. *0* is set to 1, combining those...
  517.  
  518.   The plane number is the same as the bit number in the colour.  So plane 0
  519. corresponds to bit 0 (the least significant bit), plane 1 corresponds to bit
  520. 1, etc.
  521.  
  522.   You also don't know as much about binary as you seem to think you know.  The
  523. binary number 011 is equal to 3 in decimal (0*2^2 + 1*2^1 + 1*2^0 = 0+2+1 = 3).
  524.  
  525. >Now to change the colors of bobs you can tell the blitter NOT
  526. >to draw certian planes, so if in the above example you told the
  527. >blitter NOT to draw plane 2 the color would be %001, or 4.
  528.                                                       ^^^^ NO!!! 1, not 4!!!
  529.  
  530.   You'd tell it not to draw plane 1 in order to get %001 from the above case.
  531. That is, you'd use "Set Bob N,,%11111101," where N is your bob number.
  532.  
  533.   --Andy Church
  534.  
  535.  
  536. Date: 27 Sep 93 21:34:00 EST
  537. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  538. Subject: Re: Use of Varptr
  539. To: "amos-list" <amos-list@ccess.digex.net>
  540.  
  541. >  Last night I was stuffing around with passing Varptr's as parameters to
  542. >procedures, trying to pass the address of an array of floating point numbers.
  543. >The problem is that I couldn't just Poke(Varptr(ARRAY)+OFFSET) to get to
  544. >ARRAY(OFFSET).  I noticed that each successive Varptr was 4 units apart, and
  545. >this morning I realized why the values I Poked weren't what was stored.
  546. >  So could someone tell me 
  547.  
  548. >* How to use Varptr, Poke and Peek to store (properly) and read from an array
  549. >  of integers?
  550.  
  551.   Writing: Loke Varptr(ARRAY(0))+ELEMENT*4,_VALUE
  552.   Reading: _VALUE=Leek(Varptr(ARRAY(0))+ELEMENT*4)
  553.  
  554. where ELEMENT is the element number you're using, just like ARRAY(ELEMENT).
  555.  
  556.   Of course, this is only useful if you've passed the array address, as in
  557.  
  558. _PROCEDURE[Varptr(ARRAY(0))]
  559.  
  560. since otherwise you can just use _VALUE=ARRAY(ELEMENT).
  561.  
  562. >* How to use Varptr, Poke and Peek to store (properly) and read from an array
  563. >  of floats? (Ie, the set up of the float, such as the mantissa length...that
  564. >  sort of garbage, and where they are stored wrt the array's adress).
  565.  
  566.   They're also stored as 4-byte values, so use the same scheme I described
  567. above to access them.
  568.  
  569.   The format depends on whether you're using Creator or Pro.  Creator uses FFP:
  570.  
  571.   31                     876     0
  572.   | - - - mantissa - - - |S| exp |
  573.  
  574. where m is the mantissa (with an assumed binary point after the first digit),
  575. S is the sign bit and exp is the bias-64 exponent.  In other words,
  576.     exp = exponent+64
  577.  
  578.   Pro, on the other hand, uses IEEE single-precision.  I'm not entirely sure
  579. about the format for IEEE floats.  If you use Set Double Precision, that
  580. switches Pro to 8-byte double-precision floats, which is something completely
  581. different.
  582.  
  583.   --Andy Church
  584.  
  585.  
  586. Subject: Menus & multitasking
  587. To: amos-list@ccess.digex.net
  588. Date: Tue, 5 Oct 1993 10:44:22 +0200 (EET)
  589.  
  590. I think I found bug in AMOS menus.
  591. If I try something like this:
  592.  
  593. Screen Close 0
  594. BEGIN:
  595. Screen Open 0,320,200,16,Lowres
  596. Menu$(1)="First menu"
  597. Menu On 
  598. Wait Key 
  599. Menu Off 
  600. Screen Close 0
  601. Screen Open 1,320,200,16,Lowres
  602. Print "This is screen 1"
  603. Wait Key 
  604. Screen Close 1
  605. Goto BEGIN
  606.  
  607. ...and while the program is running, go to WB, and close a window or
  608. screen, the AMOS program will give "Screen not opened"-error.
  609. Is this a bug, or is there something I should know about using menus
  610. with temporary screens ?
  611.  
  612. Mikko
  613.  
  614.  
  615. Aminet is a huge colection of amiga pd stuff, it is mirrowed to a lot 
  616. places here is a list:
  617.  
  618. Country           Site                                        Directory
  619. SCANDINAVIA       ftp.luth.se                                 pub/aminet/
  620. SWITZERLAND       amiga.physik.unizh.ch                       pub/aminet/
  621. SWITZERLAND       litamiga.epfl.ch                            pub/aminet/
  622. GERMANY           ftp.uni-kl.de                               pub/aminet/
  623. GERMANY           ftp.cs.tu-berlin.de                         pub/aminet/
  624. GERMANY           ftp.th-darmstadt.de                         pub/aminet/
  625. USA               ftp.etsu.edu                                pub/aminet/
  626. USA               ftp.wustl.edu                               pub/aminet/
  627. USA               oes.orst.edu                                pub/aminet/
  628. Display