Skip to content

Commit

Permalink
Change internal uses of STRING" to C"
Browse files Browse the repository at this point in the history
  • Loading branch information
Molorius committed Jan 25, 2025
1 parent 0eefc73 commit af17f95
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
10 changes: 5 additions & 5 deletions pkg/forth/esp32/10_clock.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions util/pulse_test.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af17f95

Please sign in to comment.