Author Topic: Bytecode  (Read 7247 times)

0 Members and 1 Guest are viewing this topic.

Joe

  • Guest
Bytecode
« on: July 24, 2002, 02:22:22 PM »
Can anyone tell me the sites to go to to learn SCI bytecode?  I know about the FreeSCI, but are there any others?



Pikachu14

  • Guest
Re:Bytecode
« Reply #1 on: July 24, 2002, 02:54:45 PM »
Now why would you want to do that?

Joe

  • Guest
Re:Bytecode
« Reply #2 on: July 24, 2002, 03:14:16 PM »
To learn how Sierra does some of the things they do in their games...

Pikachu14

  • Guest
Re:Bytecode
« Reply #3 on: July 24, 2002, 03:18:58 PM »
Well, I guess you don't need bytecode for that. Besides, it's very hard (IMHO).

Also, medium-difficulty problems can be solved by asking (like customized windows and user-defined cusswords ;))

Quest for Glory-style character transferral sounds like a hard, "bytecode-worthy" problem, but it's easier than it seems. Just an example, though...

Joe

  • Guest
Re:Bytecode
« Reply #4 on: July 24, 2002, 03:24:25 PM »
So,

ldi 0 // $0 species
sat temp0
pTos state
ldi 1 // $1 superClass
and
bnt code_045F
pushi 34 // $22 type
pushi 0 // $0 species
lap param1
send 4

Isn't bytecode?  What is it called then?

Pikachu14

  • Guest
Re:Bytecode
« Reply #5 on: July 24, 2002, 03:25:56 PM »
It's bytecode, I don't understand it, and it might as well be Assembly.  :-X

Joe

  • Guest
Re:Bytecode
« Reply #6 on: July 24, 2002, 03:26:51 PM »
I'm up for a challenge.  It's not like I have anything better to do.

Pikachu14

  • Guest
Re:Bytecode
« Reply #7 on: July 24, 2002, 03:32:19 PM »
I'm not gonna stop you. Good luck finding those docs!

Joe

  • Guest
Re:Bytecode
« Reply #8 on: July 24, 2002, 03:39:54 PM »
Thanks.  I'll probably need it.

Offline Brian Provinciano

Re:Bytecode
« Reply #9 on: July 24, 2002, 03:44:29 PM »
If you know assembly lanuage, it won't be too hard to pick up. If you don't know assembly language, it will be very hard to pick up.

I've taught myself C, C++, Basic, Visual Basic, Delphi, Pascal, Java, and countless other lanuages, but assembly (machine code) was the only one I had to take a class to learn. It's so much more complicated than other languages.

The fact is though, that my template games are built from disassembling Sierra's and rescripting it in my SCI language. That being the case, what you see in my code is essentially what you'd see reading the bytecode. It operates almost identical.

Joe

  • Guest
Re:Bytecode
« Reply #10 on: July 24, 2002, 03:57:23 PM »
If that's the case, then I should be able to pick up some of the language by comparing the template to it's disassembled script files.

Offline Brian Provinciano

Re:Bytecode
« Reply #11 on: July 24, 2002, 04:09:28 PM »
You should also read up on the entire script file format. You'll need to know how everything works to understand the code.

Joe

  • Guest
Re:Bytecode
« Reply #12 on: July 24, 2002, 07:12:08 PM »
Thanks.  So far, all I know about the script format is that the interpreter reads it from the bottom up.

Offline Brian Provinciano

Re:Bytecode
« Reply #13 on: July 24, 2002, 08:05:25 PM »
It actually executes the scripts from top to bottom. You're probably confusing the stack.

The scripts are broken into chunks (segments). The first segment of most scripts, is the exports segment. The interpreter reads this, and in the case of rooms, executes the first public instance. From there, the instances can call other areas of the script or other publics of other scripts.

The scripts operate on the accumulator and the stack. Both are used for temporary data. The opcodes manipulate these and the program is produced.

Joe

  • Guest
Re:Bytecode
« Reply #14 on: July 24, 2002, 08:21:23 PM »
I guess I don't know as much about it as I thought. :)  Looks like I have a long, rewarding road ahead of me.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.038 seconds with 21 queries.