Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port missing words to new HMSL #79

Open
philburk opened this issue Mar 4, 2016 · 6 comments
Open

Port missing words to new HMSL #79

philburk opened this issue Mar 4, 2016 · 6 comments
Assignees
Labels

Comments

@philburk
Copy link
Owner

philburk commented Mar 4, 2016

Add words or files here that need to be ported. From Robert:
Logto
Textfiles, FSEEK, etc
Floating Point
Debugger, debug{

@philburk philburk self-assigned this Mar 4, 2016
@philburk
Copy link
Owner Author

I ported FEMIT and LOGTO. LOGTO used to redirect TYPE but now it redirects EMIT.
But there is still one main problem. Many parts of the pForth kernel, including ioType(), just call ioEmit() directly. They do not go through the deferred EMIT word. TYPE needs to push the chars on the stack and call pfCatch(ID_EMIT).

@rsnewcomb
Copy link

I make extensive use of DUMP.SOURCE to save dynamically built shapes and other objects to text files. It is not clear to me what the ported status is of any of the text file I/O functions or of Log functions, which I believe includes DUMP.SOURCE. HMSL finds that word, but executing it from within my code requires a bracketed use of $LOGTO and LOGEND.

@philburk
Copy link
Owner Author

philburk commented Apr 2, 2016

I have most of the Forth code ported. I am now working on the pForth kernel I/O, which needs to use a vectored version of EMIT

@rsnewcomb
Copy link

For porting Floating Point code from HMSL/H4th to PHMSL/P4th, is there documentation somewhere for mapping specific words/methods/functions from one platform to the other? I was able to include pforth-xcode/fth/floats.fth but my old HMSL code like this fails:

: int_1000 ( -f- -- decimal , convert float value to decimal * 1000 )
\ ( caller puts float on fp stack )
1000 float f_ int
;

(and)

base-wt float matches float total-matches float f/ class-wt float f* f+ f>i -> loc

(and)

cnt float num-cases float f/ 1000 float f* f>i -> weight ( fp has 3 places )

@philburk
Copy link
Owner Author

HMSL float words defined here:
http://www.softsynth.com/hmsl/docs/original/h4th/07-Floating-Point.pdf

ANSI words defined here:
http://www.forth.org/svfig/Win32Forth/DPANS94.txt
search for: 12.6.1.0558

Some of the HMSL float words missing from PForth are:
FPINIT , use noop
FPTERM
FMOD
F=
F>
F>I , use F>S
FIX , FROUND not implemented in pForth!
FLOAT , use S>F
I>F , use S>F
INT

@philburk
Copy link
Owner Author

Also missing F>TEXT F.R PLACES FNUMBER?

@philburk philburk added the forth label Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants