User Tools

Site Tools


en:projects:gforth-android:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:projects:gforth-android:start [2015-06-12 03:19] – [Examples] bernden:projects:gforth-android:start [2018-07-01 20:03] (current) bernd
Line 4: Line 4:
 ===== Project Status ===== ===== Project Status =====
  
-  * There is [[https://play.google.com/store/apps/details?id=gnu.gforth&|Gforth in Play Store]], installable on Android 2.3 or later (native activity) +  * There is [[https://play.google.com/store/apps/details?id=gnu.gforth&|Gforth in Play Store]], installable on Android 4.0 (Android 2.3 support dropped on 2018-03-31) or later (native activity) 
-  * This has a OpenGL terminal emulation and allows remote telnet on port 4444 (depending on what you call in ''/sdcard/gforth/site-forth/starta.fs'')+  * This has a OpenGL terminal emulation and allows remote telnet on port 4444 after you type in ''t'' and return.
   * It recognizes touches, and the menu button/softkey toggles the software keyboard   * It recognizes touches, and the menu button/softkey toggles the software keyboard
 +  * If the font is too small/large, use ''gl-fscale'' ( r -- ) with a float number as scale factor (<1 makes the font smaller, >1 bigger).  Example: ''3e gl-fscale'' makes the font three times larger, ''0.5e gl-fscale'' smaller by a factor of two.
  
 Starting the app first time unpacks the Gforth sources to the SD card.  That's a few megabytes, and therefore it takes its time.  Gforth shows a spinning wheel while it's doing so, but can't respond to any input events.  If the spinner shows you "Done; restart Gforth" for a while, you should kill and restart Gforth - it got stuck.  If you still have problems, there's a gfortherr.log and a gforthout.log in /sdcard, which might provide more diagnosis. Starting the app first time unpacks the Gforth sources to the SD card.  That's a few megabytes, and therefore it takes its time.  Gforth shows a spinning wheel while it's doing so, but can't respond to any input events.  If the spinner shows you "Done; restart Gforth" for a while, you should kill and restart Gforth - it got stuck.  If you still have problems, there's a gfortherr.log and a gforthout.log in /sdcard, which might provide more diagnosis.
Line 17: Line 18:
   * [[https://play.google.com/store/apps/details?id=de.ubuntix.android.mygermankeyboard|Deutsche Tastatur]]   * [[https://play.google.com/store/apps/details?id=de.ubuntix.android.mygermankeyboard|Deutsche Tastatur]]
   * [[https://play.google.com/store/apps/details?id=com.jb.gokeyboard|Go Keyboard]]   * [[https://play.google.com/store/apps/details?id=com.jb.gokeyboard|Go Keyboard]]
 +
 +Since Android apps can't be started from the command line, you can enter options for starting Gforth in the file ''/sdcard/gforth/home/.options'' One line per option.  ''-d64k'' e.g. sets the stack to 64kB, ''-m16M'' the dictionary to 16MB, see [[http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Invoking-Gforth.html]]
 ===== Examples ===== ===== Examples =====
  
Line 33: Line 36:
   * ''>o'' ( addr o:old -- o:addr r:old ) makes addr the current object, and pushes the previous current object onto the return stack.   * ''>o'' ( addr o:old -- o:addr r:old ) makes addr the current object, and pushes the previous current object onto the return stack.
   * ''o>'' ( o:addr r:old -- o:old ) pops the previous object from the return stack.   * ''o>'' ( o:addr r:old -- o:old ) pops the previous object from the return stack.
-  * ''ref>'' ( o:addr r:old -- o:old ) same as o>, but includes releasing a local reference.  Unlike Java's heap and stack, JNI memory is not part of the garbage collector, and therefore uses reference counting.  If you get an object from a Java call, you should use ''ref>'' to pop it after use, this allows the garbage collector to release this object.  There is only a limited space for references, so release them soon. +  * ''xref>'' ( o:addr r:old -- o:old ) same as o>, but includes releasing a local reference.  Unlike Java's heap and stack, JNI memory is not part of the garbage collector, and therefore uses reference counting.  If you get an object from a Java call, you should use ''xref>'' to pop it after use, this allows the garbage collector to release this object.  There is only a limited space for references, so release them soon.  ''xref>'' determines, which sort of reference that is, and correctly handles global and temporary references.
-  ''gref>'' ( o:addr r:old -- o:old ) global references passed from one thread to another require a global release This applies to objects passed as part of messages+
  
 To define a method or a field, you use the following words: To define a method or a field, you use the following words:
Line 60: Line 62:
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-Gforth logs info into the files ''/sdcard/gfortherr.log'' and ''/sdcard/gforthout.log''  If something goes wrong, look here if you find an error message.  If a source file is missing or defect, you can remove ''/sdcard/gforth/''; it is sufficient if you delete the file ''sha256sum'' in the subfolder with the current release name.+Gforth logs info into the files ''/sdcard/gfortherr.log'' and ''/sdcard/gforthout.log''  If something goes wrong, look here if you find an error message.  If a source file is missing or defect, you can remove ''/sdcard/gforth/''; it is sufficient if you delete the file ''sha256sum'' in the subfolder with the current release name.  Sometimes, files move after an update, in that case, you might better remove the entire ''/sdcard/gforth/''.
 ===== Documentation ===== ===== Documentation =====
  
 Gforth has a [[http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/|big manual]], which is also available as {{:projects:gforth-android:gforth.pdf|eBook PDF}} (some non-breakable texts are cut off in this small size). Gforth has a [[http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/|big manual]], which is also available as {{:projects:gforth-android:gforth.pdf|eBook PDF}} (some non-breakable texts are cut off in this small size).
en/projects/gforth-android/start.1434071955.txt.gz · Last modified: 2015-06-12 03:19 by bernd