Rick VanNorman wrote:
> Hi Guys,
>
> The real problem with clearing the stack is that if you are in the middle of
> a catch frame when you reset the stack, you can hose yourself.
>
> If you don't care, try this:
>
> : /STACK S0 @ SP! ;
>
> rick
>
And the error may not show up for *YEARS* !
In the last century I did maintenance programming on a product line
developed when 256/512 BYTE PROMS were expensive. At the time I was
involved we had advanced to 2k PROMs. I wrote some code that called a
subroutine. It was a trivial routine. The system crashed in a weird way.
The immediate cause was that 8085's did not understand English.
A RET instruction caused an address in middle of a text message to be
loaded into the PC.
Why you ask. Well back in 1st generation there was enough space at the
end of one PROM for a short routine. While executing that segment of
code an error condition could occur. There wasn't enough space for a
proper return. But in that case you would want to restart from a
specific place. so original coders loaded the stack pointer with address
"known" to be needed and did a RET or a RTS (forget which - whichever
had fewer bytes for instruction).
My mod had moved things in memory.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Mon Jan 12 2009 - 10:48:46 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.