File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -830,13 +830,15 @@ level" because they interact directly
830830with the hardware. Use with care!
831831
832832
833- - ADR(_ arr_ ) :
833+ - ADR(_ arr_ ) / & _ arr _ :
834834 Returns the address of the first
835835 element of _ arr_ in memory.
836836 Following elements of the array
837837 occupy adjacent memory locations.
838+ Instead of ` ADR(X) ` you can simply
839+ type ` &X ` .
838840
839- - ADR(_ str_ ) :
841+ - ADR(_ str_ ) / & _ str _ :
840842 Returns the address of the _ string_
841843 in memory. The first memory location
842844 contains the length of the string,
Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ T_EXPR: integer constant, variable or function
224224 " Dpeek" T_EXPR emit TOK_DPEEK
225225 " USR(" EXPR emit TOK_USR_ADDR USR_EXPR_MORE " )" emit TOK_USR_CALL
226226 " ADR(" ADR_EXPR " )"
227+ " &" ADR_EXPR
227228 " Len" STR_PAR_EXPR emit TOK_PEEK # First byte of string is the length
228229 " Val" STR_PAR_EXPR emit TOK_VAL
229230 " ASc" STR_PAR_EXPR emit { TOK_PUSH_1, TOK_ADD, TOK_PEEK } # TODO: does not check for empty strings.
You can’t perform that action at this time.
0 commit comments