<!DOCTYPE html>
<!--
Copyright 2021 Bradley D. Nelson

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<head>
  {{HEAD}}
  <title>µEforth for Windows</title>
</head>

<body>
<h1>µEforth for Windows</h1>
{{MENU}}
<div class="wrapper">

<h2>Download</h2>

<h3>STABLE RELEASE</h3>
<p>
<a href="https://eforth.storage.googleapis.com/releases/uEf32-{{STABLE_VERSION}}.exe">uEf32-{{STABLE_VERSION}}.exe</a>
   - Window 32-bit EXE µEforth<br/>
<a href="https://eforth.storage.googleapis.com/releases/uEf64-{{STABLE_VERSION}}.exe">uEf64-{{STABLE_VERSION}}.exe</a>
   - Window 64-bit EXE µEforth<br/>
   <i>Version: {{STABLE_VERSION}} (Stable)</i>
</p>

<h3>LONG TERM STABLE RELEASE</h3>
<p>
<a href="https://eforth.storage.googleapis.com/releases/uEf32-{{OLD_STABLE_VERSION}}.exe">uEf32-{{OLD_STABLE_VERSION}}.exe</a>
   - Window 32-bit EXE µEforth<br/>
<a href="https://eforth.storage.googleapis.com/releases/uEf64-{{OLD_STABLE_VERSION}}.exe">uEf64-{{OLD_STABLE_VERSION}}.exe</a>
   - Window 64-bit EXE µEforth<br/>
   <i>Version: {{OLD_STABLE_VERSION}} (Long-term Stable)</i>
</p>

<h3>Beta Release</h3>
<p>
<a href="https://eforth.storage.googleapis.com/releases/uEf32-{{VERSION}}.exe">uEf32-{{VERSION}}.exe</a>
   - Window 32-bit EXE µEforth<br/>
<a href="https://eforth.storage.googleapis.com/releases/uEf64-{{VERSION}}.exe">uEf64-{{VERSION}}.exe</a>
   - Window 64-bit EXE µEforth<br/>
   <i>Version: {{VERSION}} (Beta)</i>
</p>

<hr/>

<p>
<a href="https://eforth.storage.googleapis.com/releases/archive.html" target="_blank">Release Archive</a>
  - Prior Releases
</p>
<p>
<a href="https://github.com/flagxor/ueforth" target="_blank">http://github.com/flagxor/ueforth</a>
  - Complete Unprocessed Source Code
</p>

<h2>µEforth</h2>

<h3>µEforth Specific Words</h3>

{{COMMON}}

<h3>Windows</h3>

<h4>Windows Opcodes</h4>

<p>
The wealth of Windows .DLL and system functionality can be
accessed via the dynamic loading interface.
A handle to a library is obtained with <code>LOADLIBRARYA</code>,
and then individual symbols are accessed with <code>GETPROCADDRESS</code>.
</p>

<pre>
LOADLIBRARYA ( dllname-z -- module )
GETPROCADDRESS ( module name-z -- fn )
</pre>

<p>
And assembly version of <code>*/MOD</code> is provided to allow the EXE to build without
including MSVCRT.
</p>

<p>
See <a href="https://github.com/flagxor/ueforth/blob/main/windows/windows_main.c">windows_main.c</a>.
</p>

<p>
Native functions all called with CALL(n) (see Windows &amp; Linux Calling below).
</p>

<h4>Windows Imports</h4>

<p>
Various Win32 calls are imported in
<a href="https://github.com/flagxor/ueforth/blob/main/windows/windows.fs">windows.fs</a>.
In addition, a terminal that responds to ANSI escape codes is created and connected to
<code>TYPE</code> and <code>KEY</code>.
</p>

{{DESKTOP_COMMON}}
