please dont rip this site

Cybiko Bytecode Interpreter

Instruction Operands

All bytecodes have one explicit operand, at most. However, assembler instructions for some of them seem to allow for one extra argument (see below). Please note that this is only a notation device — a way to tell assembler to adjust target address after converting label number or base address into a final offset (stack-, object-, or buffer-relative).

Suppose the Cybiko C compiler sees something like this:

    int my_array[ 3 ]; 
    ... 
    my_array[ 2 ] = 1; 

Obviously, there is no need to load index, scale it (since array elements are word-sized), then load address of the array, then add it to scaled index, etc. Instead, our compiler will produce something like this:

    .label 777 ; my_array 
    .skip 6 
    ... 
    leag.u 777 4 ; my_array 
    move 
    load1 
    storeis 

Here, 777 is label number (ordinal), 6 is the size of my_array[], and 4 is extra displacement relative to the label 777. Note that assembler will turn 'leag.u 777 4' into a single opcode followed by the word-sized displacement (hence .s suffix).

Note that instruction suffixes designate optional data that may follow (and not the size of the operands):

.c char (that is, signed byte),

.b byte (unsigned byte),

.s short (16-bit signed word),

.u unsigned short (16-bit unsigned word),

.w word (16-bit unsigned word),

.l long word (32-bit signed double word).


file: /Techref/cybiko/bc/ops.htm, 1KB, , updated: 2008/6/12 19:33, local time: 2024/12/21 23:23,
TOP NEW HELP FIND: 
18.116.28.79:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/cybiko/bc/ops.htm"> Cybiko Bytecode Interpreter </A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .