Display posts from previous

Sort by

And I was feeling crazy for posting the suggestion to write your own JIT compiler last devlog! I've always loved making code from as scratch as possible, and it's something I definitely want to do someday, but I've just never gotten around to it.

It is very interesting to hear about your progress, benchmarking and your endeavour into various programminng languages, compilers etc. but i'm just curious if you tried everything when it comes to algorithms, data structures, parallelizing, instancing etc. Moving more stuff to the graphics API ( Vulkan ? ). Or if its not possible to scale down certain aspects of LT, before spending time on extreme performance optimizations as you seem to be doing now?

* i have not been following the threads lately, so i'm sorry in advance if this has already been discussed

Hahaha somebody got it woohoo!!! Great first post, welcome to the forums ruok

(More responses on the way, but for now, this ^ . I just woke up. Yayy Monday )

Josh seems to be taking his time, so I'll post my best guess.

I immediately recognized it as disassembled x84 assembly, which I have little to no experience with I first tried using a table to lookup each instruction's assembly representations, but after translating the first one, got really impatient and just ran it through a disassembler instead, lol:

55 89 e5
push ebp
mov ebp,esp

b8 39 05 00 00 5d c3
mov eax,0x539
pop ebp
ret

Which I'm pretty sure are basic instructions at the beginning and end of every function to push memory onto the stack to make room for the function, and then de-allocate that space and return once the function is done.

So that's just his super nerdy way of saying "begin post" and "end post".

"You’ve got to work on something dangerous. You have to work on something that makes you uncertain. Something that makes you doubt yourself... because it stimulates you to do things you haven’t done before. The whole thing is if you know where you’re going, you’ve gone, as the poet says. And that’s death."
- Stephen Sondheim

AlexWasLike wrote:
....
Josh seems to be taking his time, so I'll post my best guess.

I immediately recognized it as disassembled x84 assembly, which I have little to no experience with I first tried using a table to lookup each instruction's assembly representations, but after translating the first one, got really impatient and just ran it through a disassembler instead, lol:

55 89 e5
push ebp
mov ebp,esp

b8 39 05 00 00 5d c3
mov eax,0x539
pop ebp
ret

Which I'm pretty sure are basic instructions at the beginning and end of every function to push memory onto the stack to make room for the function, and then de-allocate that space and return once the function is done.

So that's just his super nerdy way of saying "begin post" and "end post".

1337 indeed.

Nice one, tried the same and gave up.
Looking at the code it actually sets up a standard stack frame for the function's local variables, then at the end loads 0x539 into eax, which represents the return value of the function.

Now, 0x539 is 1337 decimal.

1337 confirmed

PS: really psyched for Josh's next post on what happened last week. I really like the new techie posts, been hacking around with LEXX/BISON and YACC in the old days to implement a script language.
Josh, if you are going for performance, that is the way to go, you can generate really fast, low-down c parser code from a nice grammar file. Leastways that's what was the way to go about 20 years ago , no idea what hot and cooking today.

Plofre wrote:
Nice one, tried the same and gave up.
Looking at the code it actually sets up a standard stack frame for the function's local variables, then at the end loads 0x539 into eax, which represents the return value of the function.
Fly safe, commanders

"You’ve got to work on something dangerous. You have to work on something that makes you uncertain. Something that makes you doubt yourself... because it stimulates you to do things you haven’t done before. The whole thing is if you know where you’re going, you’ve gone, as the poet says. And that’s death."
- Stephen Sondheim

I included the prototypical x86-32 prologue and epilogue anyway as hints to those who might google the hex strings. Those hex sequences are so common in 32-bit disassemblies that googling them would actually clue you in to what it all means

Also

AlexWasLike wrote:... got really impatient and just ran it through a disassembler instead ...

It's the same online assembler/disassembler that I use to check the correctness of my emitted machine code. This site is awesome, bookmark it if you work with reversing or are just interested in asm

Maybe more asm / machine code puzzles in future logs...

“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford