embedded systems developers tools, cross compilers
  Home  |   SwiftX Archive  |   SwiftForth Archive  |

Re: DOES> Register Stomping

From: Bulgrien, Dennis <Dennis.Bulgrien_at_TripointGlobal.com>
Date: Fri, 24 May 2002 20:10:11 -0500

Thanks for the Yes, for the 68K at least; if I had read the manual and
remembered, it is one of the scratch registers. But it the oddest of
scratches because Forth uses it for the pfa (but must be done with it by the
time user code runs). I want to call a CODE word from DOES> that does range
checking. I have some ;CODE words (that use that register to hold the pfa)
to do range checking in too and if I do it right I can use the range
checking word for both DOES> and ;CODE with just one extra instruction in
one or the other. Well, a lot of talk a too little programming, so off I
go.

Have a great holiday weekend Elizabeth, and all you other Forthers.

-----Original Message-----
From: Elizabeth D. Rather [mailto:erather_at_forth.com]
Sent: Friday, May 24, 2002 19:59
To: Bulgrien, Dennis; swiftx_at_forth.com
Subject: Re: [swiftx] DOES> Register Stomping

At 07:26 PM 5/24/02 -0500, Bulgrien, Dennis wrote:

>May DOES> code stomp on the address register used to put its pfa on the
>stack ( A0 on 68K )?
>
>INTERPRETER
>
>: DOES> POSTPONE {;CODE} {,CODE} !DEST
> [+ASSEMBLER] R )+ A0 MOV A0 ) S -) MOV [PREVIOUS]
> TARGET ] INTERPRETER ; IMMEDIATE

The question is a little confusing, since what follows DOES> is high-level
Forth, which one presumes will compile legal code. It will find the
address on the stack.

In any case, see the 68K CPU Supplement Section 2.2.1 on register
usage, especially the last sentence.

Cheers,
Elizabeth

==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Fri May 24 2002 - 18:10:00 PDT

This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 03:04:21 PST