Target resident compiler hiccup

From: David Graham <dgraham_at_GrahamAutomationInc.com>
Date: Fri, 24 Aug 2001 14:05:32 -0700

I have made some progress with the target resident compiler, but I am seeing
odd behavior that I hope you can shed light on. I set up the dumb terminal
in Debug.f, and from the XTL I execute QUIT. I then switch the XTL serial
cable to a DOS computer running a dumb terminal program (Procomm).
Everything seems to work fine for the first command that I type, but from
then on I get a "Throw Code 243" message. For example, if I press Enter, I
get an echoed OK as expected, but each subsequent enter returns the error
message. I don't have much confidence in what I am doing, so it is likely I
have missed something obvious.

Following is the relevent code:

In my compiled application:

: (PC-KEY?) ( -- f )
  SC0SR1 C@ %00100000 AND ;

: (PC-KEY) ( -- char)
  BEGIN
    SC0SR1 C@ %00100000 AND
  UNTIL
  SC0DRL C@
;

: PC-TERMINAL ( -- )
   -RIE DUMB
   ['] (PC-KEY) 'KEY ! ['] (PC-KEY?) 'KEY? !
   ['] (ACCEPT) 'ACCEPT !
   ['] (X-EMIT) 'EMIT ! ['] (X-TYPE) 'TYPE !
   ['] (X-PAGE) 'PAGE ! ['] (X-ATXY) 'ATXY !
   ;

And in Debug.f:

2400 TERMINAL PET
PET CONSTRUCT
: LISTEN PET ACTIVATE PC-TERMINAL QUIT ;

David Graham
Graham Automation, Inc
PO Box 623
McMinnville, OR 97128
Phone 503 434-8636
Fax 503 212-0181
www.GrahamAutomationInc.com

----------------------------------------------------------------------
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!
Received on Fri Aug 24 2001 - 14:06:55 PDT


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.