Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup. >Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup. Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
In article <a...glegroups.com>,
Antoni Gual Via <antoni...il.com> wrote:
HelloI consider WIN32FORTH dead anyway because before long you can no longer run 32 bits programs in MS-Windows. They have done a great job in sorting out
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
the zillions of symbolic constants in MS-Windows.
wina wina64 can call any dll function. Contrary to win32 graphics is not done through a resource stuff.
What remains is to sort out the function calls to open a graphics window
and use it.
Documentation for Windows is hard to come by and not precise, because everybody is forced to work with resource managers.
An example:
/ ----------------------------
\ A vd Horst, vrij naar FASM
\ Beer - example of tiny (one section) Win32 program
HEX
20 CONSTANT MB_ICONQUESTION
4 CONSTANT MB_YESNO
6 CONSTANT IDYES
WANT K32
"USER32.DLL" DLL-IMPORT user32
'user32 "MessageBoxA" PROC-IMPORT MessageBoxA
"WINMM.DLL" DLL-IMPORT winmm
'winmm "mciSendStringA" PROC-IMPORT mciSendStringA
"open cdaudio" Z CONSTANT _cmd_open
"set cdaudio door open" Z CONSTANT _cmd_eject
"close cdaudio" Z CONSTANT _cmd_close
"Do you need additional place to put the beer?" Z CONSTANT _message
"Desktop configuration" Z CONSTANT _caption
: handle-error DUP IF ." HET IS HELEMAAL FOUT " . CR ELSE DROP THEN ;
: handle-error DUP ?ERROR ;
: MAKE-PLACE-FOR-BEER
0 0 0 _cmd_open mciSendStringA .S CALL .S handle-error .S
0 0 0 _cmd_eject mciSendStringA CALL .S handle-error .S
0 0 0 _cmd_close mciSendStringA CALL .S handle-error .S
;
: beer \ HEX
MB_ICONQUESTION MB_YESNO OR
_caption
_message
0
MessageBoxA .S CALL
IDYES = IF
MAKE-PLACE-FOR-BEER
THEN
;
: beer \ HEX
CALL[
MB_ICONQUESTION MB_YESNO OR PAR4
_caption PAR3
_message PAR2
0 PAR1
MessageBoxA .S CALL]
IDYES = IF
MAKE-PLACE-FOR-BEER
THEN
;
/ ----------------------------
This is a bit more complicated than strictly necessary because
wina -c beer.frt
generates a beer.exe that can be run on a system that has no
wina running (winmm.dll and system32.dll must be available of course.) (During startup constant are looked up and patched.)
Note that wina has a 32 bit and 64 bit version.
PAR4 .. fills in the 4th parameter, and is portable across versions.
Don't be fooled by SYSTEM32.DLL. This is a 64 but library but
for "compatibility" it has not been renamed.
You can see that simple CALL can be used too. Positioned
CALL[ are more convenient because the params are not need in order.
For 64 bits CALL[ are advisable.
Note:
"USER32.DLL" is a file. "MessageBox" is a name of a procedure in that f
file, converted to an executable address.
"open cdaudio" Z CONSTANT _cmd_open
"open cdaudio" is part of the DLL specification of the MM (multi-media) library. It is passed to the cd player of Windows and interpreted.
Antoni
Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the hide of the bear until you shot it. Better one bird in the hand than ten in the air. First gain is a cat spinning. - the Wise from Antrim -
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup. Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Is there a Forth running in Windows able to open a graphics window and
plot pixels to it?
On Friday, October 6, 2023 at 1:02:34 PM UTC+2, Antoni Gual Via wrote:
Is there a Forth running in Windows able to open a graphics window and
plot pixels to it?
It is possible to run 16-bit applications on Windows 11 (numerous
references from Google/Youtube). Ergo, any old DOS Forth should
do. (Assuming it's ok that "graphics window" == application window).
-marcel
@marcel Yes, I sometimes run my old qbasic programs in a DosBox in Win10,
but all programs run slower than in a 20 years old PC.
@minforth I checked the logo forth but the download link does'nt seem to work
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
Antoni Gual Via schrieb am Freitag, 6. Oktober 2023 um 13:02:34 UTC+2:
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Not for scientific plotting, but still: https://mathscitech.org/articles/turtle-logo-forth
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup. Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
You might want to check out eForth for Windows. It is quite nice. https://eforth.appspot.com/windows.html
On 10/6/23 4:02, Antoni Gual Via wrote:
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
: ud. <# #S #> type ;ok
-1 -1 ud.18446744073709551615 ok
On Friday, October 6, 2023 at 10:19:08 AM UTC-7, Jerry Petrey wrote:
You might want to check out eForth for Windows. It is quite nice. https://eforth.appspot.com/windows.htmluEforth v7.0.6.19 - rev 2f2c3cb9e1f6c128d428
On 10/6/23 4:02, Antoni Gual Via wrote:
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
Forth dictionary: 10187368 free + 101756 used = 10289124 total (99% free)
3 x Forth stacks: 65536 bytes each
ok
: ud. <# #S #> type ;ok
-1 -1 ud.18446744073709551615 ok
-1 -->
I was expecting 38 digits. Is the change to numeric output words common for 64-bit Forths? I was expecting #S and #> to handle doubles. This kind of breaks ANS code.
uEforth v7.0.6.19 - rev 2f2c3cb9e1f6c128d428
Forth dictionary: 10187368 free + 101756 used =3D 10289124 total (99% free)
3 x Forth stacks: 65536 bytes each
ok
: ud. <# #S #> type ;ok
-1 -1 ud.18446744073709551615 ok
-1 -->
I was expecting 38 digits. Is the change to numeric output words common for=
64-bit Forths?
On Sunday, 8 October 2023 at 22:59:32 UTC+1, Brad Eckert wrote:8 ok
On Friday, October 6, 2023 at 10:19:08 AM UTC-7, Jerry Petrey wrote:
You might want to check out eForth for Windows. It is quite nice.uEforth v7.0.6.19 - rev 2f2c3cb9e1f6c128d428
https://eforth.appspot.com/windows.html
On 10/6/23 4:02, Antoni Gual Via wrote:
Hello
Is there a Forth running in Windows able to open a graphics window and plot pixels to it? My idea is just to test some graphics programming.
I do not need access to the awful Win32 API and I would prefer an easy setup.
Does this beast exist? Or the transition from MS-DOS to Windows killed them all?
Antoni
Forth dictionary: 10187368 free + 101756 used = 10289124 total (99% free)
3 x Forth stacks: 65536 bytes each
ok
: ud. <# #S #> type ;ok
-1 -1 ud.18446744073709551615 ok
-1 -->
I was expecting 38 digits. Is the change to numeric output words common for 64-bit Forths? I was expecting #S and #> to handle doubles. This kind of breaks ANS code.
I cant see anything wrong so whats the size of a cell in bytes ?
1 cells .
On Friday, October 6, 2023 at 10:19:08 AM UTC-7, Jerry Petrey wrote:
You might want to check out eForth for Windows. It is quite nice.and plot pixels to it? My idea is just to test some graphics
https://eforth.appspot.com/windows.html
On 10/6/23 4:02, Antoni Gual Via wrote:
Hello
Is there a Forth running in Windows able to open a graphics window
programming.
easy setup.I do not need access to the awful Win32 API and I would prefer an
killed them all?Does this beast exist? Or the transition from MS-DOS to Windows
Antoni
uEforth v7.0.6.19 - rev 2f2c3cb9e1f6c128d428
Forth dictionary: 10187368 free + 101756 used = 10289124 total (99% free)
3 x Forth stacks: 65536 bytes each
ok
: ud. <# #S #> type ;ok
-1 -1 ud.18446744073709551615 ok
-1 -->
I was expecting 38 digits. Is the change to numeric output words common
for 64-bit Forths? I was expecting #S and #> to handle doubles. This
kind of breaks ANS code.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 50:46:55 |
Calls: | 6,712 |
Calls today: | 5 |
Files: | 12,243 |
Messages: | 5,354,932 |
Posted today: | 1 |