You are browsing as a guest. Sign up (or log in) to start making projects!

1h 45m 17s logged

Yet Another Obsidian Devlog

going to keep this one short and sweet because I honestly didn’t add much, butt his is what I added:

print "lambda functions and function calls now work!"

func test() -> int {2 + 2};

return test(); 

Lambda Functions & Function Calls

  • Lambda Functions fully working for addition and subtraction, still can’t put in multiple inputs, but you know what that’s fine.
  • You can now officially use function calls they work and it’s great, took a lot of coding / logic but it works!

Assembly Code For Example:

global obsidian_program

extern GetStdHandle
extern WriteConsoleA
extern ExitProcess

section .text

test:
    mov eax, 2
    mov ebx, 2
    add eax, ebx
    ret

obsidian_program:
    sub rsp, 40
    mov ecx, -11
    call GetStdHandle
    mov rcx, rax
    lea rdx, [rel str0]
    mov r8d, 47
    lea r9, [rel written]
    mov qword [rsp+32], 0
    call WriteConsoleA
    add rsp, 40

    call test
    mov ecx, eax


    sub rsp, 40
    call ExitProcess

section .bss
    written resd 1

section .data
    str0 db "lambda functions and function calls now work!", 13, 10
0
3

Comments 0

No comments yet. Be the first!