Re: Building .exe file for program



George,
I added the line you suggested - "CONDC PutHandle: >scr and was able to
produce a working .exe file. Then I put the change into the whole
program and the "Save Forth System" didn't work. When I went back to
the simplified program, I could not get it to produce a working exe
file even though I believe the source code had not changed. I have
shut down the computer and brought it up again, This is the entire
program:

( Minimum program to illustrate problems )

anew wandb

( ******* Connect the Forth Word >scr to the Windows Display Console
******* )

WinDC >scr \ Changed theDC in example to
\ >scr as being more descriptive

CONDC PutHandle: >scr \ Initialize >scr to Windows Console - CONDC
\ Following an example in WIN32FOR's Help

( ******** SET UP CONSTANTS AND VARIABLES for Plot Area
********************* )

300 constant xmin \ Defines the position of the Box
1200 constant xmax \ xmin is position of left side of box
\ xmax is position of right side of
box

150 constant ymin \ ymin is position of top of box
800 constant ymax \ ymax is position of bottom of box


( **************************Do
It******************************************** )
( Typing "doit" should draw a box and then display 0 , 1, 2 at 1
second intervals. )
( It should then clear the screen and display "End of Test program"
)

: doit ( -- )

CONDC PutHandle: >scr \ Initialize >scr to Windows Console - CONDC

cls
cr cr cr
3 0 do
cr cr

BLUE LineColor: >scr
xmin 0 0 0 0 WHITE FillArea: >scr \ Blank out
screen
ymin MoveTo: >scr \ draw box
xmin ymax LineTo: >scr
xmax ymax LineTo: >scr
xmax ymin LineTo: >scr
xmin ymin LineTo: >scr
5 spaces i .
1000 ms
loop
cls ." End of Test Program " ;


( End of Test Program )

I then execute the program (or not) and then attempt Saving the Forth
System. When I do, I get this
error message:

End of Test Program ok

Entry point at 2A84h (402A84h)
Segment Origin Size Alloc
------- --------- ------ -------
CODE 401000h 12120 40960
APP 40B000h 189892 1024000
SYSTEM 505000h 272328 512000
------- --------- ------ -------
Total 474340

Building image C:\win32for\6.08.00.rc2\CB Source\doit2.exe
Built length 476672 (74600h) bytes


EXCEPTION 0xC00000FD
Version: 6.10.03 Build: 3
Registers:
Eax: 00401474
Ebx: TOS 00032FFC top of stack
Ecx: 00000000
Edx: USER 00127FB0 user area
Edi: 00000000
Esi: IP 00438DCC Forth ip
Esp: SP@ 00126F84 stack ptr
Ebp: RP@ 0012FC5C rstack ptr
Eip: PC 00401478 machine ip
Backtracking: 547678 547678 SETDISPLAYDEPTH:+172 [UNKNOWN]+-745468
Data stack: 0 0 0 0
Primitive @ loaded from: SRC\KERNEL\FKERNEL.F at line: 521
Invoking word LOADUSERCONFIG loaded from: C:\PROGRAM
FILES\WIN32FORTH\SRC\EXTEND.F
at line: 161
fails at word SETDISPLAYDEPTH: loaded from: C:\PROGRAM
FILES\WIN32FORTH\SRC\CONSOLE\CON
SOLESTATBAR.F at line: 48

Press any key to exit...
^
Error(9998): Windows exception trapped

I don't understand why it should work once and then refuse to work
again with the same source code. If something has changed in the
Windows program I would expect shutting the computer off and then
turning it on again would have rebuilt Windows. Is this feature of
Win32for stable for most people?

Sorry to have to come to the well so often on this problem but haveing
a stand alone program would be very helpful for this application.
Thanks for any suggestions.

Carl

.



Relevant Pages

  • Re: XP isnt recognizing .exe
    ... Doug, as I mentioned in my original post, I've already done the .exe file ... MS-MVP Windows Media Center\Windows Powered Smart ... I went to upgrade my Adobe Reader 6 to Reader 7 on my Dell laptop and ... "Open" from the pop up window, then, Windows Explorer opens fine. ...
    (microsoft.public.windowsxp.general)
  • Re: File Association Problem
    ... Command.com or cmd.exe are the proper XP ... program is a registered security risk and should be removed immediately. ... EXE File Association Fix ... MS-MVP Windows Shell/User ...
    (microsoft.public.windowsxp.general)
  • Re: Saving files to CD
    ... Gordon MVP" wrote: ... It's simply how Windows users create ... Even StuffIt for Mac can create Windows ... > If there is a document lurking inside the .exe file Stuffit Expander ...
    (microsoft.public.mac.office)
  • Re: File Association Problem
    ... Command.com or cmd.exe are the proper XP ... program is a registered security risk and should be removed immediately. ... EXE File Association Fix ... MS-MVP Windows Shell/User ...
    (microsoft.public.windowsxp.security_admin)
  • ADO: Error: System resource exceeded.
    ... I wrote a test program to insert records in a loop. ... [Microsoft OLE DB Provider for ODBC Drivers] ... The same program works well in Windows 2000. ... Block Causes AV (Access Violation) ...
    (microsoft.public.vb.database.ado)