0 votes
by Andrew Read (210 points)
```
 : start \ hmodule 0 commandline show-- res
  4drop    WalkColdChain
   0
 ;
 ' start is EntryPoint

 SaveConsole hello

```

This creates an executable ```hello.exe``` but that executable doesn't work.  The observed behaviour running it from Windows Terminal in Windows 10 is that after a pause, nothing happens:

```
PS C:\Users\andre> hello
PS C:\Users\andre>
```

1 Answer

0 votes
by Andrew Read (210 points)
edited by Andrew Read
This version does create a valid VFX console executable and provides a clue as to why the example does not work.  See comment

```
: start \ hmodule 0 commandline show-- res
 [ action-of EntryPoint ] literal execute
 0
 ;

' start is EntryPoint
SaveConsole hello
by Andrew Read (210 points)
action-of entrypoint (whereis) . . type -1 594 %VFXPATH%\VFXBase\win32\newide.fth ok

which is the function
: WinMain    \ hinst hpinst lpcommand nshow -- res

seems that WinMain cannot be displaced... but user code cannot run after it since WinMain ends its duties with an ABORT.  WalkColdChain is never called by it
...