Author Topic: Assembly code blocks  (Read 1728 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Assembly code blocks
« on: April 30, 2018, 10:47:48 AM »
Can someone help me make sense of them? Some of the scripts I decompile from Sierra games fall back to assembly for certain code blocks. I've tried taking the disassembly and comparing it to its successful decompile to try to see a similarity but I'm not getting it. I assume this can't be explained easily (because if it could SCI Companion would have decompiled correctly), but I'm wondering if I can rewrite blocks of code by hand if I understand enough of the language. Or can someone point me in the direction of something that would help more than a reply here would (if such is the case).
« Last Edit: April 30, 2018, 03:17:50 PM by MusicallyInspired »


Brass Lantern Prop Competition

Offline Kawa

Re: Assembly code blocks
« Reply #1 on: April 30, 2018, 12:06:36 PM »
You could rewrite it by hand considering that's what Brian originally did, yeah. The trick, no matter what machine code you're targeting, is mostly in recognizing patterns. Or at least that's what I know. Patterns that the decompiler can't work out.

Offline lskovlun

Re: Assembly code blocks
« Reply #2 on: April 30, 2018, 07:32:06 PM »
anything in particular you're struggling with?

Offline MusicallyInspired

Re: Assembly code blocks
« Reply #3 on: May 01, 2018, 11:21:33 AM »
I just don't know where to begin. I don't understand the language at all. I assume assembly code blocks are a syntax? Or is it more of a summary or something?
Brass Lantern Prop Competition

Offline OmerMor


Offline troflip

Re: Assembly code blocks
« Reply #5 on: May 01, 2018, 07:01:21 PM »
but I'm wondering if I can rewrite blocks of code by hand if I understand enough of the language.

Yes, you can. Omer's links are good, especially the first one, which explains all the SCI machine instructions in detail.

It's very similar to any other kind of assembly language (very low level, basically a 1-to-1 mapping of what the processor can do), but has a few fancy instructions like sends and such. So if you have a basic familiarity with any other assembly languages, and notions like registers and push/popping from a stack, it isn't too difficult to figure out (just extremely tedious).
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Assembly code blocks
« Reply #6 on: May 03, 2018, 03:03:43 PM »
Thanks, guys. Will definitely check out those links.
Brass Lantern Prop Competition


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.106 seconds with 22 queries.