Skip to content

Commit a846f52

Browse files
committed
Implement unused
1 parent 8141ae1 commit a846f52

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Implemented words:
167167
2>R
168168
2R>
169169
2R@
170+
unused
170171
Extra:
171172
words
172173
dump-row-size

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,11 @@ const STATIC_DICTIONARY: &[StaticDictionaryEntry] = &[
10931093
let number = env.data_stack.pop().unwrap() as usize;
10941094
print!("{} ", env.format_number(number, alignment));
10951095
}),
1096+
declare_primitive!("unused", env, {
1097+
env.data_stack
1098+
.push(env.data_space_manager.unused_area.len() as Cell)
1099+
.unwrap();
1100+
}),
10961101
];
10971102

10981103
const FORTH_RUNTIME_INIT: &str = include_str!(concat!(env!("OUT_DIR"), "/runtime.fth"));

0 commit comments

Comments
 (0)