Skip to content

Commit

Permalink
added r@ to ext #9 (arm)
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Magyar committed Jan 29, 2017
1 parent fdc69d7 commit 0fd5ac5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/ext.S
Expand Up @@ -87,3 +87,8 @@ defprimitive "over",4,over,REGULAR
defprimitive "time",4,time,REGULAR /* ( -- unixtime ) */
push {r0}
NEXT

defprimitive "r@",2,rfetch,REGULAR
ldr r0, [r6]
push {r0}
NEXT
4 changes: 4 additions & 0 deletions generic/forth/test.forth
Expand Up @@ -391,6 +391,10 @@ marker: -test-mark
-test-mark
dp dp-before-mark @ =assert ;

: test:r@
123 >r r@ 123 =assert r> drop
-34 >r r@ -34 =assert r> drop ;

depth 0= assert
test
depth 0= assert
Expand Down

0 comments on commit 0fd5ac5

Please sign in to comment.