Skip to content

Instantly share code, notes, and snippets.

@TG9541
Created June 18, 2018 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TG9541/e8b5abf014b37132471e4e42aace56c0 to your computer and use it in GitHub Desktop.
Save TG9541/e8b5abf014b37132471e4e42aace56c0 to your computer and use it in GitHub Desktop.
get free memory in the RAM dictionary, and in the variable area
#require PAD
: SP@ ( -- a ) \ push current stack pointer
[ $9093 , \ LDW Y,X
$5A C, \ DECW X
$5A C, \ DECW X
$FF C, ] \ LDW (X),Y
;
: dict.free SP@ PAD - . ;
: var.free $70 @ $72 @ - . ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment