From 0b88254955d9c62658132718f765fc82309af035 Mon Sep 17 00:00:00 2001
From: Brad Nelson
Date: Sat, 23 Jan 2021 09:50:18 -0800
Subject: [PATCH] Fixing web
---
ueforth/site/index.html | 19 +++++++++++++++----
ueforth/windows/windows_main.c | 8 ++++++--
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/ueforth/site/index.html b/ueforth/site/index.html
index 9198c10..bfa920d 100644
--- a/ueforth/site/index.html
+++ b/ueforth/site/index.html
@@ -48,7 +48,7 @@ A reduced cross-platform EForth version
- ueforth-arduino-esp32.zip
- - Arduino ESP32 Source Code ← SVFIG & Forth2020 folks start here!
+ - ESP32 Arduino Source Code ← SVFIG & Forth2020 folks start here!
- uEf32.exe - Window 32-bit EXE µEforth
- uEf64.exe - Window 64-bit EXE µEforth
- ueforth.linux - Linux 64-bit Executable µEforth
@@ -140,9 +140,9 @@ their use is supported in Forth by way of
Z", Z>S, and S>Z.
-Arduino
+ESP32 Arduino
-Arduino Opcodes
+ESP32 Arduino Opcodes
Because Arduino builds a statically linked image for flashing into ESP32 devices,
@@ -325,7 +325,7 @@ SD_MMC.totalBytes ( -- n )
SD_MMC.usedBytes ( -- n )
-
Arduino ESP32 WebUI
+ESP32 WebUI
A terminal over the web can be activated.
@@ -340,6 +340,17 @@ webui ( network-z password-z -- )
See arduino_server.fs.
+Autoexec.fs
+
+
+The system will automatically attempt to mount SPIFFS filesystem at /spiffs.
+It will then at start attempt to load /spiffs/autoexec.fs
+
+
+
+See autoboot.fs.
+
+
Windows
Windows Opcodes
diff --git a/ueforth/windows/windows_main.c b/ueforth/windows/windows_main.c
index 201b0ce..5293455 100644
--- a/ueforth/windows/windows_main.c
+++ b/ueforth/windows/windows_main.c
@@ -4,9 +4,13 @@
#define CALLTYPE WINAPI
#if defined(_M_X64)
-# define SSMOD_FUNC --sp; cell_t b, a = _mul128(*sp, sp[1], &b); tos = _div128(b, a, tos, sp)
+# define SSMOD_FUNC \
+ --sp; cell_t b, a = _mul128(*sp, sp[1], &b); b = _div128(b, a, tos, sp); \
+ if (*sp < 0) { *sp += tos; tos = b - 1; } else { tos = b; }
#elif defined(_M_IX86)
-# define SSMOD_FUNC --sp; __int64 a = (__int64) *sp * (__int64) sp[1]; tos = _div64(a, tos, sp)
+# define SSMOD_FUNC \
+ --sp; __int64 a = (__int64) *sp * (__int64) sp[1]; cell_t b = _div64(a, tos, sp); \
+ if (*sp < 0) { *sp += tos; tos = b - 1; } else { tos = b; }
#endif
#include "common/opcodes.h"