branch: elpa/forth-mode
commit 2869bc25e4de584b8c4916acf3d72cd0c76fe2d6
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Create a terminal personality for SwiftForth.
---
backend/swiftforth.el | 5 +++--
backend/swiftforth.fth | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/backend/swiftforth.el b/backend/swiftforth.el
index 4e4338fc87..b681165b31 100644
--- a/backend/swiftforth.el
+++ b/backend/swiftforth.el
@@ -1,4 +1,5 @@
-(forth-interaction-send ":noname 100 100 ; 'get-size !")
-(forth-interaction-send ":noname 0 0 ; 'get-xy !")
+(require 'forth-interaction-mode)
+
+(forth-interaction-send (concat "include " forth-backend-dir
"/swiftforth.fth"))
(provide 'swiftforth)
diff --git a/backend/swiftforth.fth b/backend/swiftforth.fth
new file mode 100644
index 0000000000..e93425de83
--- /dev/null
+++ b/backend/swiftforth.fth
@@ -0,0 +1,24 @@
+: 2null 0 0 ;
+: big-size 200 100 ;
+
+create winning-personality
+ 4 cells , 19 , 0 , 0 ,
+ ' noop , ' noop , ' noop ,
+ 'emit @ ,
+ 'type @ ,
+ '?type @ ,
+ 'cr @ ,
+ ' noop , \ page
+ ' drop , \ attribute
+ 'key @ ,
+ 'key? @ ,
+ 'ekey @ ,
+ 'ekey? @ ,
+ 'akey @ ,
+ 'pushtext @ ,
+ ' 2drop , \ at-xy
+ ' 2null , \ get-xy
+ ' big-size , \ get-size
+ 'accept @ ,
+
+winning-personality open-personality