"R F2*"
"1.234e FX* R"
Hello,
I am starting FORTH for a small non commercial project and perhaps somebody here could support a bit?
For multiplication by 2 of a variable R, I made
R F@
2.0e
F*
R F!
Is there any method to not make moving the stack?
For multiplication by 2 of a variable R, I made
R F@
2.0e
F*
R F!
Is there any method to not make moving the stack?
Hello,
I am starting FORTH for a small non commercial project and perhaps somebody here could support a bit?
For multiplication by 2 of a variable R, I made
R F@
2.0e
F*
R F!
Is there any method to not make moving the stack?
Word "F2*" would multiplicate the value of R by 2 direct in address..
"R F2*"
Or Word "FX*" would multiplicate the value of R by X direct in address.. (in this case the stack would move only by 1 level which would be ok for me)
"1.234e FX* R"
Any advice / hint how to design the words F2* or FX* is welcome.
pascal dagornet schrieb am Dienstag, 23. Mai 2023 um 09:46:49 UTC+2:
Hello,
I am starting FORTH for a small non commercial project and perhaps somebody here could support a bit?
For multiplication by 2 of a variable R, I made
R F@
2.0e
F*
R F!
Is there any method to not make moving the stack?
Word "F2*" would multiplicate the value of R by 2 direct in address..
"R F2*"
Or Word "FX*" would multiplicate the value of R by X direct in address.. (in this case the stack would move only by 1 level which would be ok for me)
"1.234e FX* R"
Any advice / hint how to design the words F2* or FX* is welcome.
Why is it necessary to not move the stack?
On 24/05/2023 7:26 am, minforth wrote:
pascal dagornet schrieb am Dienstag, 23. Mai 2023 um 09:46:49 UTC+2:
Hello,
I am starting FORTH for a small non commercial project and perhaps somebody here could support a bit?
For multiplication by 2 of a variable R, I made
R F@
2.0e
F*
R F!
Is there any method to not make moving the stack?
Word "F2*" would multiplicate the value of R by 2 direct in address..
"R F2*"
Or Word "FX*" would multiplicate the value of R by X direct in address.. (in this case the stack would move only by 1 level which would be ok for me)
"1.234e FX* R"
Any advice / hint how to design the words F2* or FX* is welcome.
Why is it necessary to not move the stack?If eliminating stack juggling was good, it follows eliminating the stack
is better. Locals users should understand this better than anyone.
"Why is it necessary to not move the stack?"
- for programming FORTH for HP71B ( https://en.wikipedia.org/wiki/HP-71B ) under a gforth environment in emacs on a PC
- since the FORTH for the HP71B has a fixed stack of 4, then programming on the PC should reflects this (I know, thats weird)
pascal dagornet schrieb am Dienstag, 23. Mai 2023 um 09:46:49 UTC+2:My setup is:
Hello,
I am starting FORTH for a small non commercial project and perhaps somebody here could support a bit?
For multiplication by 2 of a variable R, I made
R F@
2.0e
F*
R F!
Is there any method to not make moving the stack?
Word "F2*" would multiplicate the value of R by 2 direct in address..
"R F2*"
Or Word "FX*" would multiplicate the value of R by X direct in address.. (in this case the stack would move only by 1 level which would be ok for me)
"1.234e FX* R"
Any advice / hint how to design the words F2* or FX* is welcome.
Why is it necessary to not move the stack?
Somewhat simpler: make F an FVALUE instead of an FVARIABLE, then do
F +TO F
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 19:14:26 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,093 |