View Single Post
Old 17 November 2011, 14:41   #201
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
gibs: I don't really know anything at all about AMOS so maybe this will work, more than likely it won't

I had a read though the AMOS Pro manual and it seemed to me that maybe you could output a character to the CLI like olesio wants by using the DOS libary functions.

First you need to get a pointer to the CLI window by calling the DOS library output function:

DOSCALL(-60)

As TinyLauncher was called from the CLI I think, after this call, the address of the CLI output window should be returned in d0

You should be able to access this value from AMOS using DREG(0)

You will need this returned value to then call the DOS library write function to write a character to the CLI

Load the registers like this:

DREG(1) = value that was returned to DREG(0) in the previous DOS library call
DREG(2) = memory address of the byte in memory that contains the ascii text byte you want to output to the CLI
DREG(3) = length of the string you want to output, which in this case would be 1 as you only want to output a 1 byte ASCII character

and then call the DOS library write function:

DOSCALL(-48)

The above equivalent works OK in assembly language - it's exactly what I used to output a character to the CLI for the joyread program I made for olesio previously so I'm guessing it might work under AMOS too...? Who knows? Might be worth a try though!

Hope that helps
pmc is offline  
 
Page generated in 0.13535 seconds with 11 queries