Skip to content

Commit

Permalink
Merge pull request #20 from mlg556/main
Browse files Browse the repository at this point in the history
Made compatible with RV32I core.
  • Loading branch information
theandrew168 authored Feb 9, 2024
2 parents 4542c4c + 9b15775 commit 7a50fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DerzForth
Bare-metal Forth implementation for RISC-V
Bare-metal Forth implementation for RISC-V RV32I core.

## About
Forth was initially designed and created by [Charles Moore](https://en.wikipedia.org/wiki/Charles_H._Moore).
Expand Down
4 changes: 2 additions & 2 deletions derzforth.asm
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ lookup_not_found:
# Ret: a0 = hash value
djb2_hash:
li t0, 5381 # t0 = hash value
li t1, 33 # t1 = multiplier
djb2_hash_loop:
beqz a1, djb2_hash_done
lbu t2, 0(a0) # c <- [addr]
mul t0, t0, t1 # h = h * 33
slli t1, t0, 5 # t1 = h * 32
add t0, t1, t0 # h = t1 + h, so h = h * 33
add t0, t0, t2 # h = h + c
addi a0, a0, 1 # addr += 1
addi a1, a1, -1 # size -= 1
Expand Down

0 comments on commit 7a50fdf

Please sign in to comment.