Hi Michael,
interesting, can you explain in detail? It is understood the icall
is a indirect call addressed by Z. So how to use it actually?
e.g. my_routine (written in .asm)
my_routine:
...
...
ret

So in the amforth I will call it like:

: my_test my_routine icall ;   ?????

P.




----- PŮVODNÍ ZPRÁVA -----
Od: "Kalus Michael" <[email protected]>
Komu: "amforth mailing list list mailing"
<[email protected]>
Předmět: [Amforth-devel] icall
Datum: 13.4.2011 - 10:58:45

> Hi.
> Recently someone asked how otherwise imported
> subroutines (c-code)  
> can be used by amforth.
> You may use icall of AVR instruction set to do so.
> Include icall.asm example in your application to
> test it.
> Add more stack to register moves if necessary for
> a given subroutine.
> 
> Michael
> 
> 
> 
> ; ( adr -- )
> ; R( -- )
> ; use icall to execute a code subroutine
> ; operation: PC <-- Z  and push PC+1 to
> returnstack.
> VE_ICALL:
> .dw $ff05
> .db "icall",0
> .dw VE_HEAD
> .set VE_HEAD = VE_ICALL
> XT_ICALL:
> .dw PFA_ICALL
> PFA_ICALL:
> movw zl,tosl
> loadtos
> icall
> jmp DO_NEXT
> 
> ; to test icall make a subroutine:
> subdup:
> savetos
> ret
> subdrop:
> loadtos
> ret
> 
> 
> ------------------------------------------------------------------------------
> > Forrester Wave Report - Recovery time is now
> measured in hours and minutes
> not days. Key insights are discussed in the 2010
> Forrester Wave Report as
> part of an in-depth evaluation of disaster
> recovery service providers.
> Forrester found the best-in-class provider in
> terms of services and vision.
> Read this report now! 
> http://p.sf.net/sfu/ibm-webcastpromo
> _______________________________________________
> Amforth-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Amforth-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to