Welcome, Guest. Please login or register.

Author Topic: Amiga Basic  (Read 14612 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Amiga Basic
« Reply #59 from previous page: January 10, 2009, 09:48:10 PM »
Quote

amiga_3k wrote:
@bloodline:

I think portability is a good thing. Especially with niches like the AmigaOS.

Don't expect top of the line action games. I'll first have a go at porting my JavaScript versions of Mastermind and 'HotNumber DeLuxe', both being rather old-school 2D games. Don't expect results very soon as I'm about to change homes (and computers, once again, next system probably an EeeBox).



Well, JavaScript is so close to C syntax it really shouldn't take long to get into... You are seriosuly going to love SDL, anyone who has spent much time blitting gfx around on the Amiga, will have no problems with SDL!

Offline amigaksi

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 827
    • Show only replies by amigaksi
    • http://www.krishnasoft.com
Re: Amiga Basic
« Reply #60 on: January 10, 2009, 11:29:46 PM »
>by motorollin on 2009/1/10 15:55:46

>I really have no idea what any of that means... I'll just stick to basic  I like programming because I enjoy thinking about the procedure and logic of how the application should work. What I don't like is the intricacies of the language getting in the way.

>--
>moto

BASIC is supposed to be simpler than other languages so if simplicity is what you want, I would vote for BASIC.  There's always the CALL statement to call ASM procedures from AmigaBASIC...  Now if AmigaBASIC was in ROM (at least most of it), that would be even better as you could boot up directly into it in a second (like on C64/Atari/old PCs).  Then you could easily write some easy program for testing ports/doing math/testing some feature/etc.

--------
Use PC peripherals with your amiga: http://www.mpdos.com
 

Offline zylesea

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 638
    • Show only replies by zylesea
    • http://www.via-altera.de
Re: Amiga Basic
« Reply #61 on: January 11, 2009, 12:53:43 AM »
@ bloodline

As an occasional programmer I again and again get into messes and troubles (at least when a ointer refers to a pointer and such complicated things) with pointers and references. I guess I know the logic behind it, but w/o regular practise it is often hard. But still from those three languages (C++, Matlab and Holywood) I seriously looked into I like it somehow most.

Anyway, I wanted to take the opportunity to advertise for Hollywood: Simple, but also powerful and write once, compile for MorphOS, AOS3.x, AOS4.x, Windows, OS X.

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2281
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Amiga Basic
« Reply #62 on: January 11, 2009, 02:15:00 AM »
Quote

bloodline wrote:

Actually... AmigaE always looked more like a dialect BASIC, than anything else to my eyes... :-D


PortablE would probably be the best Amiga-related language available today.  It uses C++ as a backend on the high-end systems, and traditional AmigaE as a backend on the classics.
 

Offline stefcep2

  • Hero Member
  • *****
  • Join Date: Sep 2007
  • Posts: 1467
    • Show only replies by stefcep2
Re: Amiga Basic
« Reply #63 on: January 11, 2009, 03:43:48 AM »
what about pascal?  what do people think of it?  

And as regards to AmigaBasic by MS:  Is there anything worth running on the Amiga that has been written using it?
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Amiga Basic
« Reply #64 on: January 11, 2009, 09:28:16 AM »
I used to use Pascal in Delphi 7 and I liked it. It's very readable and has nice functions for variable manipulation. There is a Pascal compiler in Aminet but I have never used it.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Amiga Basic
« Reply #65 on: January 11, 2009, 01:39:47 PM »
Quote

zylesea wrote:
@ bloodline

As an occasional programmer I again and again get into messes and troubles (at least when a ointer refers to a pointer and such complicated things) with pointers and references. I guess I know the logic behind it, but w/o regular practise it is often hard. But still from those three languages (C++, Matlab and Holywood) I seriously looked into I like it somehow most.

Anyway, I wanted to take the opportunity to advertise for Hollywood: Simple, but also powerful and write once, compile for MorphOS, AOS3.x, AOS4.x, Windows, OS X.


Honestly Pointers aren't really as bad as people make out... just think of a variable as a variable, just the same as in BASIC... then a pointer is the actual memory address of that variable and its datatype.

With a variable in any programming language, it has three properties... Its location in the computer (the address), its size (the datatype) and it's value (the data stored there).

A pointer is the first two properties, a variable is the second two properties.

when you define:
Code: [Select]


int A=5;



You know two things about it, the datatype (size), which is an integer (on Amiga that is 32bits) and you know its value (5).

To get the address you need to put an "&" in front of the variable... now you need to store that address, this is where the pointer comes in... since your variable is an interger, your pointer needs to know the size that it's pointing to thus:

Code: [Select]


int* B = A;



Has now stored the address and size of variable A into B.

Remember:
int is an integer variable.
int* is a pointer to an integer variable (it doesn't actually have to point to a variable, but that is another topic :-) ).

Now we can do thing a bit clever using the "*" operator... if you put the * in front of a pointer then all operations happen to the location pointed to by the pointer, thus:

Code: [Select]


 *B=6;
  A=6;



both of the above assignments do the same thing. Both assign the value 6 to the variable A. But really you can ignore pointers to begin with... they are only really needed for doing advanced stuff that you can't do with BASIC.


The big advantage of pointers is that they allow a function to act on the original variable rather than on of copy of the variable... thus the function doesn't need to return any value, and no data needs to be copied, making the whole process much faster. I have no idea how I could survive without pointers now :-D (I'm not looking forward to trying C#)...
But if you come from BASIC, function/procedure support is often very limited and you can just write your C code all inline (ie in the main function).

Offline gertsy

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 2318
  • Country: au
  • Thanked: 1 times
    • Show only replies by gertsy
    • http://www.members.optusnet.com.au/~gbakker64/
Re: Amiga Basic
« Reply #66 on: January 11, 2009, 02:46:50 PM »
.
Quote

aristarkos wrote:
Thanks for all the ideas.
...
I found Liberty Basic. Heard of that?
...


Have used liberty basic a bit. Used it to re-write a home management system that used to be in GWbasic. It did the job and was cheap to register. Fast as well. Got to add voice samples instead of a set of different chimes.
Probably a good choice if you know basic want to stay away from separate compilers and newer languages
 

Offline zylesea

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 638
    • Show only replies by zylesea
    • http://www.via-altera.de
Re: Amiga Basic
« Reply #67 on: January 11, 2009, 07:09:43 PM »
@ Bloodline

Thanks for your attempt to explain pointers to me. While this thank holds no irony (I always welcome occasions to think again about C++ stuff), you may have read that I alrady wrote that I have understood pointers and references is general. But when not programming too often, you soon end up in some mess.

And your suggestion to avoid pointers - well my own classes and so aree doing as much as possible. But when using the MS MFC or low level driver stuff or e.g. just want to open an Amiga window by using intuition.library you just cannot avoid heavy use of pointers.

Look, code like this is not easy to maintain if you are an occasional coder. Well, thing is it works, but if I try to reread my own code like e.g. this:

void DAQ::AOfillBuf(void* pwBuf, DWORD dwAoBufferSize,      
                       DWORD dwClk, DWORD dwChListChan, DWORD dwMode)      // fill buffer operations
{                           
   DWORD* pdwBuffer = NULL;
        WORD* pwBuffer = NULL;               
   
   pdwBuffer = (DWORD*)pwBuf;
   DWORD *myLpvResult;
   myLpvResult= reinterpret_cast(lpvResult);
   
...
}

I think it is not too intuitive (part of the mess I guess comes from MS and their many datatypes).
As said this is no rant against C++, but it is difficult when you use it only occasionally. And that is a thing many routined programmers often forget.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Amiga Basic
« Reply #68 on: January 11, 2009, 07:21:25 PM »
@zylesea

The explanation wasn't just for you :-)

If you find a nasty function that is complex yo use... just wrap it up in a nice friendly class, and document it well :-D

Offline zylesea

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 638
    • Show only replies by zylesea
    • http://www.via-altera.de
Re: Amiga Basic
« Reply #69 on: January 11, 2009, 07:30:18 PM »
Quote

bloodline wrote:
@zylesea

If you find a nasty function that is complex yo use... just wrap it up in a nice friendly class, and document it well :-D

Well, that's what I do - at least the first part of your suggestion. Documentation - hmpf (singing: la la la) ;-)!

Offline asymetrix

  • Full Member
  • ***
  • Join Date: May 2007
  • Posts: 118
    • Show only replies by asymetrix
Re: Amiga Basic
« Reply #70 on: January 11, 2009, 07:38:19 PM »
PureBasic may not be officially supported, but it does work.

The v4 core is good enough so that the GUI editor can work with it.

Purebasic also creates the asm code for the commands :).

What we need is a community driven basic language.

I like E optimizing, effeciency.

If we had an Amos -> AmigaE/PortableE translator, then use the E compiler we can have a greate portable,easy to use programming suite :).

 

Offline aristarkosTopic starter

  • Newbie
  • *
  • Join Date: Jan 2009
  • Posts: 3
    • Show only replies by aristarkos
Re: Amiga Basic
« Reply #71 on: January 12, 2009, 08:10:37 AM »
The graphics and sounds in my program were minimal. It's basically a text-based mind-teaser game. I was able to get it running in Liberty Basic and now I'm looking into Run Basic ... because I'd like to get on the web and play it with my cell phone. Unfortunately, I put goto statements all over the place so as far as coverting this particular program to JavaScript ... I think I'll pass.

"Run BASIC is a programmable web application server. You can use it to create your own custom web applications with the easy to use BASIC programming language."
 

Offline merlin3d

  • Jr. Member
  • **
  • Join Date: Mar 2007
  • Posts: 71
    • Show only replies by merlin3d
    • http://nivardo@gmail.com
Re: Amiga Basic
« Reply #72 on: January 26, 2010, 11:01:07 PM »
Quote from: bloodline;436600
No... Please no... AmigaBasic has no right to live...



Comment ridiculous.
(01) Amiga 1200 Blizzard 1230 IV 68030 50MHZ+ 68882 50MHZ - 32Mb + 128Mb w/ SCSI Kit. Amiga OS 3.9.
(02) Amiga A600 - 1Mb/2Mb, HD 4Gb.
Amiga 3000 68030 - 25Mhz 8Mb RAM
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2281
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Amiga Basic
« Reply #73 on: January 26, 2010, 11:36:20 PM »
This is a year-old thread.

Quote from: asymetrix;437150
What we need is a community driven basic language.

I like E optimizing, effeciency.

If we had an Amos -> AmigaE/PortableE translator, then use the E compiler we can have a greate portable,easy to use programming suite :).

Mattathias is making an Amos to LLVM translator.  Early versions were going to use C as a backend but some command structures in Amos are not supported under C.  (That includes the On N Gosub command and even the gosub command in general.)
 

Offline huronking

  • Sr. Member
  • ****
  • Join Date: Jul 2002
  • Posts: 301
    • Show only replies by huronking
Re: Amiga Basic
« Reply #74 on: January 27, 2010, 01:40:36 AM »
Quote from: persia;436969
just program in malbolge or lolcode...

Hello world

malbolge


lolcode


++++++++++[>++++++++>++++++++++>+++>+<<<<-]>.>+++++.++++++++++..>++.<<-.>-------------..>+.>.

:) :) :)