From af17f954429bbc1a725c851180063bb87832b923 Mon Sep 17 00:00:00 2001 From: Blake Felt Date: Fri, 24 Jan 2025 19:42:19 -0700 Subject: [PATCH] Change internal uses of STRING" to C" --- README.md | 4 ++-- pkg/forth/esp32/10_clock.f | 10 +++++----- util/pulse_test.f | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 489fc1e..2eb3b76 100644 --- a/README.md +++ b/README.md @@ -166,9 +166,9 @@ Words built with ASSEMBLY should not access the return stack. Example: ```forth -STRING" move r0, " +c" move r0, " 0x10 -STRING" \njump next" +c" \njump next" 3 \ we want to compile the 3 items on the stack ASSEMBLY MY-EXAMPLE ``` diff --git a/pkg/forth/esp32/10_clock.f b/pkg/forth/esp32/10_clock.f index d411827..b840bcd 100644 --- a/pkg/forth/esp32/10_clock.f +++ b/pkg/forth/esp32/10_clock.f @@ -7,23 +7,23 @@ \ tell rtc timer to update RTC_CNTL_TIME_UPDATE_REG RTC_CNTL_TIME_UPDATE_S 1 1 WRITE_RTC_REG.BUILDER >C -STRING" sub r3, r3, 2\n" -STRING" __RTC_CLOCK.0:\n" +C" sub r3, r3, 2\n" +C" __RTC_CLOCK.0:\n" \ read to see if updated RTC_CNTL_TIME_UPDATE_REG RTC_CNTL_TIME_VALID_S 1 READ_RTC_REG.BUILDER >C \ loop if not - STRING" jumpr __RTC_CLOCK.0, 1, lt\n" + C" jumpr __RTC_CLOCK.0, 1, lt\n" \ read 0..15 RTC_CNTL_TIME0_REG 0 16 READ_RTC_REG.BUILDER >C \ store result -STRING" st r0, r3, 1\n" +C" st r0, r3, 1\n" \ read 16..31 RTC_CNTL_TIME0_REG 16 16 READ_RTC_REG.BUILDER >C \ store result and exit -STRING" st r0, r3, 0" +C" st r0, r3, 0" 5 C> C> C> C> + + + + \ add up the strings and the built instructions ASSEMBLY RTC_CLOCK \ create RTC_CLOCK TOKEN_NEXT_SKIP_LOAD LAST SET-ULP-ASM-NEXT diff --git a/util/pulse_test.f b/util/pulse_test.f index ede7609..e666fae 100644 --- a/util/pulse_test.f +++ b/util/pulse_test.f @@ -16,11 +16,11 @@ ; \ create the assembly to toggle a pin as fast as possible -string" reg_wr 257, 28, 28, 1\nreg_wr 258, 28, 28, 1\n" -string" __safe_jump:\n" +c" reg_wr 257, 28, 28, 1\nreg_wr 258, 28, 28, 1\n" +c" __safe_jump:\n" 2 \ number of assembly objects to compile -string" reg_wr 257, 28, 28, 1\nreg_wr 258, 28, 28, 1\n" -string" __safe_jump:\n" +c" reg_wr 257, 28, 28, 1\nreg_wr 258, 28, 28, 1\n" +c" __safe_jump:\n" 2 \ number of assembly objects to compile assembly-both asm-pulse token_next_skip_load last set-ulp-asm-next