gforth ./job.fs -e "bye "
Running Gforth 0.7.9_20200709 for Windows. Having problems with the script:
gforth ./job.fs -e "bye "
from: https://github.com/CharleyShattuck/myforth-arduino
dxforth <dxforth@gmail.com> writes:
Running Gforth 0.7.9_20200709 for Windows. Having problems with the script: >>
gforth ./job.fs -e "bye "
from: https://github.com/CharleyShattuck/myforth-arduino
There is no job.fs in the this directory and severl job.fs in its subdirectories.
On 15/04/2023 9:32 pm, Anton Ertl wrote:
dxforth <dxforth@gmail.com> writes:
Running Gforth 0.7.9_20200709 for Windows. Having problems with the script:
gforth ./job.fs -e "bye "
from: https://github.com/CharleyShattuck/myforth-arduino
There is no job.fs in the this directory and severl job.fs in its
subdirectories.
Not sure what you mean. The script in question is here:
https://github.com/CharleyShattuck/myforth-arduino/blob/master/ATmega328p/c
Presumably it worked for the author. It fails for me as previously described. >AFAICS the only difference between us is Gforth.
dxforth <dxforth@gmail.com> writes:
On 15/04/2023 9:32 pm, Anton Ertl wrote:
dxforth <dxforth@gmail.com> writes:
Running Gforth 0.7.9_20200709 for Windows. Having problems with the script:
gforth ./job.fs -e "bye "
from: https://github.com/CharleyShattuck/myforth-arduino
There is no job.fs in the this directory and severl job.fs in its
subdirectories.
Not sure what you mean. The script in question is here:
https://github.com/CharleyShattuck/myforth-arduino/blob/master/ATmega328p/c
I tried to run job.fs from myforth-arduino/ATmega328p with Gforth
0.7.3 and 0.7.9_20230317.
It does not work with 0.7.3, because it does not find the word "c#",
which is not part of Gforth, but apparently also not defined by myforth-arduino.
It does not work with 0.7.9_20230317, because it wants to treat HEADER
as a deferred word (it isn't in that version).
Presumably it worked for the author. It fails for me as previously described.
AFAICS the only difference between us is Gforth.
It's not clear which Gforth version he used, and makes use of
knowledge of the internals of the Gforth version he used, so this
looks like uncharted territory, and you can enjoy the freedom of
exploring it.
On 16/04/2023 12:04 am, Anton Ertl wrote:
dxforth <dxforth@gmail.com> writes:
On 15/04/2023 9:32 pm, Anton Ertl wrote:I tried to run job.fs from myforth-arduino/ATmega328p with Gforth
dxforth <dxforth@gmail.com> writes:
Running Gforth 0.7.9_20200709 for Windows. Having problems with the script:
gforth ./job.fs -e "bye "
from: https://github.com/CharleyShattuck/myforth-arduino
There is no job.fs in the this directory and severl job.fs in its
subdirectories.
Not sure what you mean. The script in question is here:
https://github.com/CharleyShattuck/myforth-arduino/blob/master/ATmega328p/c >>
0.7.3 and 0.7.9_20230317.
It does not work with 0.7.3, because it does not find the word "c#",
which is not part of Gforth, but apparently also not defined by
myforth-arduino.
Appears unimportant so I commented out:
: words dictionary begin c@p while
drop ( c# @ 60 #- invert -if cr then drop ) .word repeat drop ;
It does not work with 0.7.9_20230317, because it wants to treat HEADER
as a deferred word (it isn't in that version).
Ditto:
\ include ../vtags.fs use-tags
...
With that change and the change above, and with gforth 0.7.9_20230317
I get:
[~/tmp/myforth-arduino/ATmega328p:138749] ~/gforth/gforth -p .:~/gforth ./job.fs -e "bye "
job.fs:64:13: warning: redefined n with N
locate1.fs:200:3: warning: original location
HERE=3535
Host stack= <0>
[~/tmp/myforth-arduino/ATmega328p:138750]
So either your problem has to do with you using Windows or with the
Gforth version you use. No probable cause comes to my mind.
On 17/04/2023 2:15 am, Anton Ertl wrote:
... With that change and the change above, and with gforth 0.7.9_20230317
I get:
[~/tmp/myforth-arduino/ATmega328p:138749] ~/gforth/gforth -p .:~/gforth ./job.fs -e "bye "
job.fs:64:13: warning: redefined n with N
locate1.fs:200:3: warning: original location
HERE=3535
Host stack= <0>
[~/tmp/myforth-arduino/ATmega328p:138750]
So either your problem has to do with you using Windows or with the
Gforth version you use. No probable cause comes to my mind.
Using Gforth 0.7.9_20200709 (AFAIK the last Windows version released).
I've traced the problem to the text coloring (ansi.fs) which myforth uses. Editing job.fs as follows results in script 'c' completing without issue.
0 [if]
red color >red
black color >black
blue color >blue
green color >green
cyan color >cyan
yellow color >yellow
[else]
: >red ;
: >black ;
: >blue ;
: >green ;
: >cyan ;
: >yellow ;
[then]
What was happening is that the last text
colour set was black.
dxforth <dxforth@gmail.com> writes:
What was happening is that the last text
colour set was black.
And you are using black background, right?
ISTM resetting text to black was asking for trouble.
dxforth <dxforth@gmail.com> writes:
ISTM resetting text to black was asking for trouble.
Gforth resets to the default foreground colour.
On 17/04/2023 7:30 pm, Anton Ertl wrote:
dxforth <dxforth@gmail.com> writes:
ISTM resetting text to black was asking for trouble.
Gforth resets to the default foreground colour.
On BYE - then how come it failed to do so for me?
dxforth <dxforth@gmail.com> writes:
On 17/04/2023 7:30 pm, Anton Ertl wrote:
dxforth <dxforth@gmail.com> writes:
ISTM resetting text to black was asking for trouble.
Gforth resets to the default foreground colour.
On BYE - then how come it failed to do so for me?
Not on BYE, but after outputting something with a specific colour
(e.g., an error message). So when you interpret BYE, the current
colour is the default colour. Of course, if you change the colour in
your application (as happens in myforth-arduino), it's your
responsibility to change it back.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 504 |
Nodes: | 16 (2 / 14) |
Uptime: | 244:59:50 |
Calls: | 9,891 |
Files: | 13,794 |
Messages: | 6,294,412 |