1. Pete's asm.ex
Pete
I've just found your asm converter on the Eu archive page. Excellent
work.
I'm having a problem though trying to convert a CALL instruction.
I have a subroutine labelled *match* and want to call it.
I tried
CALL match
and it skipped over during the conversion
I found in asm.txt thet you support CALL NEAR but how is it implemented?
so I tried
CALL NEAR match
and got the response
Invalid combination of operands: CALL NEAR match
confused and uncompiled
Terry
btw is there to be an updated version in the future?
2. Re: Pete's asm.ex
Terry
Petes latest version should be on his web page dated - 7/20/98
http://www.harborside.com/home/x/xseal/euphoria/
Take a look at fputest.ex in the zip file.
There is an example of calling in that file.
Bernie
3. Re: Pete's asm.ex
Hi, Terry. The debug version of Ensemble (was Euphoria Sound System) that I
sent to the list last week contains several examples of using call between
individually assembled routines. The basic idea is as follows (untested
code) :
--test variable
constant var = allocate(4)
--First routine--------------------------------------
constant code_to_be_called = get_asm(
"pushad " &
--do stuff
"mov ebx, var " &
"mov [ebx], 1 " & --move a 1 into var
"popad " &
"ret ")
resolve_param("var", var)
--Second routine-------------------------------------
constant calling_code = get_asm(
"pushad " &
--call the code to be called
"mov ebx, called_code " & --address of routine to call
"call near ebx " & --call it
"popad " &
"ret ")
resolve_param("called_code", code_to_be_called) --plug in address
--Run it------------------------------------
poke4(var, 0) --init var to 0
call(calling_code) --call it
?peek4u(var) --check var is 1
Terry wrote:
> Pete
>
> I've just found your asm converter on the Eu archive page. Excellent
> work.
> I'm having a problem though trying to convert a CALL instruction.
>
> I have a subroutine labelled *match* and want to call it.
> I tried
>
> CALL match
> and it skipped over during the conversion
>
> I found in asm.txt thet you support CALL NEAR but how is it implemented?
>
> so I tried
> CALL NEAR match
> and got the response
> Invalid combination of operands: CALL NEAR match
>
> confused and uncompiled
>
> Terry
>
> btw is there to be an updated version in the future?
--
Nick Metcalfe <metcalfn at alphalink.com.au>
http://www.alphalink.com.au/~metcalfn