Ultimate Amiga

Network Boards => AMOS Programming Environment => AMOS Factory => AMOS BASIC => Topic started by: Shahoff on September 23, 2017, 06:46:12 PM

Title: Newbie - where to start.
Post by: Shahoff on September 23, 2017, 06:46:12 PM
Trying to get AMOS ( I hope it's free now , as per BSD ). Download ISO  here on Ultimate , but cannot find where to start. Where is editor or anything similar?
DO anyone have step by step guide how to code "The world is HELL ;-) " for very first time , keeping in mind that I only have A1200 and WinUAE. Will grateful for any help as Blitz is to heavy and based on description I like AMOS better.
Title: Re: Newbie - where to start.
Post by: Sidewinder on September 24, 2017, 03:57:06 PM
Hello Shahoff!

You can find the AMOS Professional archives (v1.0, v1.12 update, and v2.0 update) in the AMOS Factory / Development section of this web site.  These arechives contain .adf files that  you can use to install AMOS in an emulator or you can use the adf2disk tool from Aminet to write the disk files to real floppy disks for installation on a real Amiga.  Start with v1.0, install it, then install the 1.12 update followed by the 2.0 update.

There is a link to the AMOS Pro manual on the front page of the AMOS Factory.  It also has installation instructions and details of all the commands in AMOS.

But once you have AMOS installed, just start the program by clicking on the icon and the editor will start.  Type in "Print "The world is HELL :-)" and then click on the play button at the top of the editor screen.  If everything went correctly you should see the message printed in white on an orange background.
Title: Re: Newbie - where to start.
Post by: Shahoff on September 27, 2017, 12:39:02 AM
Thank you very much. I found Manual , I just did not realise that floppies are in use for install :)
Title: Re: Newbie - where to start.
Post by: Sidewinder on September 27, 2017, 05:10:52 AM
Ha!  Yes, we are pretty old school around here with the floppies and such!

I assume you got it installed and working?  Did your first program work ok?
Title: Re: Newbie - where to start.
Post by: Shahoff on September 27, 2017, 04:31:21 PM
Yes, thank you. Flying through the samples.   Need to find how to make and then control with AMOS I2C ports :)
Title: Re: Newbie - where to start.
Post by: Shahoff on September 27, 2017, 04:34:00 PM
Another option is to use RS232 and something like http://www.velleman.eu/products/view/?id=351282
But this is to simple ::)
Title: Re: Newbie - where to start.
Post by: Shahoff on September 27, 2017, 05:06:38 PM
Already found bug in my opinion - "Print Len(Str$(5))"  = 2
So Str$ function return SPACE affront of any string :( Or this is as per design ?

This what I am getting if saving results to file "20 35 0D 0A"
Title: Re: Newbie - where to start.
Post by: Sidewinder on September 27, 2017, 10:09:29 PM
To my knowledge AMOS doesn't have I2C support directly.  It predates the I2C standard.  If you have an Amiga with an I2C port you'll need to figure out how to program it using the device driver or library that drives it.  AMOS can do this, but it's not so simple.

RS232 serial is supported.  See the serial commands in chapter 10 of the AMOS Pro manual.

The print and str$ are a little strange that way.  The extra space is for the sign but since the number you gave was positive, the sign is replaced with a space.  You can use the "Using" command to tell AMOS to print the + sign for positive numbers, but I'm not sure if that works with Str$() or only with Print command.

What do you mean by "saving results to file"?
Title: Re: Newbie - where to start.
Post by: Shahoff on September 28, 2017, 06:05:33 PM
N$=Str$("5")
Open Out 1 ,"test.txt"
Print #1,N$
Close 1


Hex 20 35 are the first symbols in file, so that how I know that Str$("5") returning [space][5]
Title: Re: Newbie - where to start.
Post by: Sidewinder on September 28, 2017, 07:47:12 PM
N$=Str$("5")
Open Out 1 ,"test.txt"
Print #1,N$
Close 1


Hex 20 35 are the first symbols in file, so that how I know that Str$("5") returning [space][5]

Ah!  I see what you mean now.  Right, Str$() inserts the space in place of the + sign.  You could try

Code: [Select]
N$=Str$(5)-" "

to remove the space if the Using command doesn't work with Str$().
Title: Re: Newbie - where to start.
Post by: Shahoff on September 28, 2017, 09:39:47 PM
Found this archive with books for system programming for Amiga :)

http://www.retro-commodore.eu/amiga-development/
Title: Re: Newbie - where to start.
Post by: Shahoff on September 28, 2017, 10:37:59 PM
never had this issue with Str$ before, but did test AmigaBasic from WB1.1 and yes , the same behaviour.
Title: Re: Newbie - where to start.
Post by: Sidewinder on September 29, 2017, 10:04:56 PM
That's quite a nice book archive!  I have a few of those books in my library.  They are worth their weight in gold!

I find it interesting that both AMOS and AmigaBASIC have the same behavior with Str$().  Maybe there is something about BASIC that requires or suggests that this be the standard behavior?
Title: Re: Newbie - where to start.
Post by: SamuraiCrow on September 30, 2017, 10:37:27 AM
BASIC on the C64 did the same thing with Str$.

Sent from my Prism II using Tapatalk

Title: Re: Newbie - where to start.
Post by: Shahoff on October 08, 2017, 07:09:44 PM
Ok, STR$ sorted , but is it possible to change resolution of the editor ?
Title: Re: Newbie - where to start.
Post by: Volvo_0ne on October 10, 2017, 08:28:01 PM
if you KNOW it's a positive number then.....

Str$((xx)-" ") will do it quickly :)
Title: Re: Newbie - where to start.
Post by: Volvo_0ne on October 10, 2017, 08:29:27 PM
if you KNOW it's a positive number then.....

Str$((xx)-" ") will do it quickly :)

Which is very very useful in (graphic) Text to screen situations too!
Title: Re: Newbie - where to start.
Post by: SamuraiCrow on October 11, 2017, 10:21:04 AM
Ok, STR$ sorted , but is it possible to change resolution of the editor ?
Not that I'm aware of.  Why would you want to?  Is it an emulator problem?

Sent from my ODROID-XU3 using Tapatalk