Leon,
we've observed an interesting anomaly: when first time the float
library is uploaded to a fresh amforth install, the f/ is causing a
crash (e.g. when uploading floatconstants immediately after the
float lib - the first f/ causes a freeze). When the float library is
unmarked and uploaded again
Marcin,
> on stack (use it or restore it to zero at exit).
>
> (Matthias: I noticed that techdoc says R22:R23
> are TOS and R24:R25 are W, in my case on ATmega328P
> it's the other way around)
Fixed, thank you.
Matthias
-
Michael,
thanks! I will rather start step by step, so no forth words called
from within assembler now!
As I can see the tosl and tosh and register setup are changing. I
hope they are same for any processor type within a release. P.
> worked with amforth3.6
> still good with 4.1?
> Michael
> Please keep in mind that machine stack is not
> indefinite (64 bytes only). So if your routine
> is pushing something on stack and doing some
> calls it can get tight.
I've changed that to 256:
.set rstackstart = RAMEND ; start address of return stack,
grows downward
.set stackstart = RAME
On Sat, 11 Sep 2010, pito wrote:
> push R0 ; worst case - store everything
> push R1
> push R2
> .
> push R31
Please be careful NOT to restore r28, r29
(register Y - your data stack pointer)
and r24, r25 - top of your stack.
>
> ld R10, Y+
> ld R11, Y+ ; takes c from
Hi,
>
> > First, from what I understand - Matthias please
> > correct me if I am
> > wrong - the "code" word creates a new word for you
> > but
> > it does not switch FORTH into the compilation mode
> > (unlike ":"
> > or "]").
> >
> M?
"code" creates the full dictionary header and sets the
XT
Matthias, Marcin - here is the template for function fuX. Is the
construction ok? It will be assembled by normal asm. Pito.
; amforth 4.1
; ..core\words\fuX.asm
; ( a b c -- m l k ) Function fuX
; R( ? -- ? )
; calculates a special function fuX
; it uses ALL registers except Y
; it calls subrouti
Marcin, thanks!
> First, I am assuming that "Luboš assembler" is a
> set of words
> from the lib/assembler.frt file in the amforth
> distribution.
> Is this correct?
Yes
> (I don't understand this - what is your "header"
> etc.)
E.g.:
; ( n1 -- n2 ) Arithmetics
; R( -- )
; optimized increment
VE_1
Pito,
I'll start here, the upper "half" will take more time.
But make yourself clear, what do you want to achieve:
add an assembly word to the initial hex file or implement
it on a running system. The assemblers only look similiar,
they are not inter-changeable.
> Interrupts:
The interrupt suppo