diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-09-19 19:56:44 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-09-19 19:56:54 -0700 |
commit | 72e8240a23da7b82893d6b4e7ed3337ca0827049 (patch) | |
tree | c65f5cc3d1b570d850af0bdb80ea148ba0ac1027 /apps/tile/word.mu | |
parent | ecb9ac7bd82e6a1c77ef8cf7700fd0722870bea6 (diff) | |
download | mu-72e8240a23da7b82893d6b4e7ed3337ca0827049.tar.gz |
6806 - tile: place-holder for bottom of stack
Diffstat (limited to 'apps/tile/word.mu')
-rw-r--r-- | apps/tile/word.mu | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/tile/word.mu b/apps/tile/word.mu index 72a55733..e1c5e22d 100644 --- a/apps/tile/word.mu +++ b/apps/tile/word.mu @@ -56,6 +56,12 @@ fn word-equal? _self: (addr word), s: (addr array byte) -> result/eax: boolean { result <- gap-buffer-equal? data, s } +fn word-length _self: (addr word) -> result/eax: int { + var self/esi: (addr word) <- copy _self + var data/eax: (addr gap-buffer) <- get self, data + result <- gap-buffer-length data +} + fn first-word _self: (addr word) -> result/eax: (addr word) { var self/esi: (addr word) <- copy _self var out/edi: (addr word) <- copy self |