diff options
Diffstat (limited to 'shell/global.mu')
-rw-r--r-- | shell/global.mu | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/shell/global.mu b/shell/global.mu index 6f6f1cb5..de9a27cc 100644 --- a/shell/global.mu +++ b/shell/global.mu @@ -502,3 +502,13 @@ fn move-gap-buffer-to-global _globals: (addr global-table), _definition-ah: (add var dest-ah/eax: (addr handle gap-buffer) <- get dest-global, input copy-object gap, dest-ah } + +fn set-global-cursor-index _globals: (addr global-table), name-gap: (addr gap-buffer) { + var globals/esi: (addr global-table) <- copy _globals + var name-storage: (stream byte 0x40) + var name/ecx: (addr stream byte) <- address name-storage + emit-gap-buffer name-gap, name + var index/ecx: int <- find-symbol-in-globals globals, name + var dest/edi: (addr int) <- get globals, cursor-index + copy-to *dest, index +} |