English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 23 October 2004, 23:34   #1
andyr
Registered User
 
Join Date: Feb 2003
Location: Manchester, UK
Posts: 97
Calling another program from a compiled Amos program...?

I've discovered some old stuff I was working on with AMOS years ago and have now updated it - you honestly can't tell it's an Amos program!

Anyways, the whole things consists of 4 different programs which are loaded when required...

Intro
Main Menu
Highscore display
The main game

Each one runs great through amos and on their own when compiled - except I can't call one compiled program from another compiled one which, as you can probably guess, is a bit of a pain. I also can't call an amos program from a compiled program. I include all the amos libraries in the compilation.

I can't hold all 4 programs in memory and I can't merge them into one because it simply becomes too big (and I'm loading graphics and sound as and when needed - they are not stored with the programs)

Does anyone know a way around this? I've been told it's a good game and I plan to stick it on the internet for all to download but I don't want to end up cutting out effects, options, graphics and audio (in effect a crippled program) just so the whole will fit into memory and around the limitations of AMOS.

Hope all that made sense!!!
andyr is offline  
Old 24 October 2004, 09:25   #2
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
do you need to copy data from one program to the other ???, ie say you set options in the "main menu". And you need these options in the "main game", i'm guessing you do?

If you do, you could try saving the data in a file in Ram:, and then reading the file in the next program.

But if you need to just execute the program, in dos.library I think there is _LVOExecute, and it executes the program.

But I guess this could be a problem as the origional may still be open and running when you execute the new program.

If this is the case, the new program could therefore send a port back to the first program that is running and it will then close.

I think UFO enemy unknown, works the way you want your program does. I hope some of this info maybe useful. I've never touched AMOS, just Assembler, and a bit of C, dropped E/Blitz Basic
redblade is offline  
Old 24 October 2004, 22:00   #3
andyr
Registered User
 
Join Date: Feb 2003
Location: Manchester, UK
Posts: 97
Thanks for your reply.

I've now got the intro, the main menu and highscore display programs merged but there's no way I can merge this program and the main game program - it's much to big!

All communication between the menu and the game is done by saving an small options file (.inf) on the disk and a which game to load file (I've used a slots system so this file is only 1 digit in length and is saved as an indicator in ram. If the file doesn't exist or equals 0 then a new game is required). Also, the high scores are saved as a simple text file on the disk.

Now, all I need to do is boot with the intro/menu program (which it does with no problems) and this program has to call the main game (which I can't get it to do at all!). When the game is finished it needs to call the intro/menu program.

I've done this before but then I used the RAMOS system. This was basically a disk that contained all the amos libraries but no editor. When booted it automatically loads and runs a program, interpreting it on the fly. You take quite a speed hit in doing this though and this program I'm working on now needs all the speed I can get! Also a RAMOS disk uses amos 1.3 and I'm using specific 2.x procedures.

Re: AMOS - I got into amos quite by accident. I'd only dabbled a little before with Amstrad CPC basic. Then Amos 1.3 came free with Amiga Format and I thought I'd give it a try. It was very similar in the way it worked to the Amstrad and I just simply became hooked. It's quite surprising what you can do with it with a bit of ingenuity and it's actually a real challenge. Also, a compiled Amos program runs rather fast!

I even wrote a windowing system that works great and more importantly damn fast! It was just a proof of concept because I was bet it couldn't be done! Here's a couple of screen shots of it...

http://www.andysplace.fsnet.co.uk/Wa...here/index.htm

I learnt a lot from this program about things like stacks, timers, interrupts and priorities. I've implemented the windows system in a new program I've started...

Why waste time doing this though? Well, for me it's a great way to while away a couple of hours making Amos do things it isn't supposed to be able to do!
andyr is offline  
Old 24 October 2004, 23:47   #4
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
you windows os looks quite nice =].

hmm are you sure you want to put the two games in a AmigaDOS script.

and then put a loop on them ? but if a file exists then break the loop and exit back to dos.

Sorry Can't really help to much.
redblade is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
External windows program communicating with program running inside WinUAE xxxxx support.WinUAE 10 19 February 2013 09:27
Paint program or program....... amigagenie request.Apps 2 29 January 2013 19:56
Which program is this? absence request.Apps 8 26 June 2012 11:31
For a beginner what Program and Program language would you recommend? amigang New to Emulation or Amiga scene 5 27 March 2012 13:06
Need this program! Tbird request.Apps 15 22 January 2003 10:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:03.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.20057 seconds with 13 queries