Pito,

> Hi, I started with LP asm (amforth 4.0):
> \ ----- Test AvrAsm -----
> : loadtos, 16 Y+ ld, 17 Y+ ld, ; \ define macro
> : savetos, -Y 17 st, -Y 16 st, ; \ tosl=r22, tosh=r23

The assembler may use any register. But one has to be
careful when changing registers used by amforth itself.
The actual register allocation is in the macros.inc file.


Its safe to use the registers labeled as temp, all others
should not be changed at all. Some are seldom used, others
only if special words are used (such as the extended vm
registers from reg-a.asm).

There is no way to use forth words from within the
assembler code. For that you need to initialize
a forth vm and call it. The only "guide" for that
is the startup code itself (amforth.asm).

Matthias



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Amforth-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to