adjustments

This commit is contained in:
2026-02-20 21:03:37 -05:00
parent 3c99f3f950
commit e630590065
3 changed files with 51 additions and 19 deletions

View File

@@ -71,15 +71,15 @@ global U4 log_count = 0;
global S4 scroll_y_offset = 0;
void ms_builtin_print(U8 val) {
if (log_count < 16) {
log_buffer[log_count++] = val;
}
if (log_count < 16) {
log_buffer[log_count++] = val;
}
}
// Dictionary
typedef struct {
U4 val;
U4 offset;
U4 val;
U4 offset;
} DictEntry;
global DictEntry dict[256];
global U8 dict_count = 0;
@@ -216,11 +216,11 @@ IA_ void compile_and_run_tape(void)
in_def = false;
}
}
else if (tag == tmpl(STag, Data)) {
else if (tag == STag_Data) {
emit8(0x48); emit8(0x89); emit8(0xC2); // mov rdx, rax
emit8(0x48); emit8(0xC7); emit8(0xC0); emit32(val); // mov rax, imm32
}
else if (tag == tmpl(STag, Imm))
else if (tag == STag_Imm)
{
if (in_def) {
// If we execute something, we jump out of def block first
@@ -253,17 +253,6 @@ IA_ void compile_and_run_tape(void)
vm_rdx = vm_globals[15];
}
#define MS_WM_CHAR 0x0102
#define MS_VK_RETURN 0x0D
#define MS_VK_BACK 0x08
#define MS_VK_TAB 0x09
#define MS_VK_SPACE 0x20
#define MS_VK_F5 0x74
#define MS_VK_PRIOR 0x21
#define MS_VK_NEXT 0x22
#define MS_VK_SHIFT 0x10
// --- Window Procedure ---
S8 win_proc(void* hwnd, U4 msg, U8 wparam, S8 lparam)
{