please dont rip this site

Cybiko Bytecode Interpreter

Assembler Directives

Note: forward references (i.e. references to labels which have not been defined yet) are OK. Moreover, the assembler operates so that even resolving backward references is always postponed until the second pass.

.ln <line_number>

Associates all the following instructions (until next .ln directive) with a particular line number within source code in a higher-level language (say, C, C++, BASIC, Pascal, etc.) Compilers should use this directive extensively while emitting code so that the assembler can report errors and other problems in association with the source line that caused them.

.label <global_label>

Introduces a global label. Label name is a number in range [99, 32768]. It does not matter (at all) what that label denotes — program code or data, or even something else (like control information); the label is just assigned the current value of the Program Counter (PC). Two, or more, labels on sequential lines are OK; these labels will be identical.

.disp <global_label> <displacement>

Allocates 2 bytes and then stores there the unsigned distance from the current position of the Program Counter forward to the label <global_label> + <displacement>. I.e. the following sequence

      .disp 555 0 
      .label 555 

stores 0, not 2; while the following sequence stores 7:

      .disp 333 0 
      .skip 7 
      .label 333 

Currently, this directive is used in conjunction with the switch opcode only.

.ldisp <global_label> <displacement>

Allocates 4 bytes and then stores there the distance from the current position of the Program Counter to the label <global_label> + <displacement>.

.offset <global_label>

Allocates 2 bytes and stores an absolute offset to the label <global_label>. This opcode is currently used for building export tables only.

.even

If current value of Program Counter is an odd number, then this directive emits zero bytes. Please note that there is no need to align code, so this directive is only useful for data elements bigger then one byte.

.skip <number_of_bytes>

Advances Program Counter by specified <number_of_bytes> (i.e. allocates<number_of_bytes> zero bytes).

.byte <number>

Emits byte <number>. Preferred way to initialize static data.

.word <number>

Emits word <number>.

.string <text_in_double_quotes>

Emits string literal with the value <text_in_double_quotes>, plus terminating 0. Unfortunately, there is currently no way to escape any symbols, notably newline and quotable quotation marks. As a workaround, the .byte directive could be used to emit any bytes, but please be warned that, in the future, characters may no longer be single bytes.

.bss

Starts the 'bss' (Blank Storage Segment) segment. Preferred place for uninitialized global variable.

.text

Starts segment of code.

.data

Starts segment of data.

.rodata

Starts segment of data. Duplicate segments of this type will be merged by vlink.

.public <label> "<name>"

Declares public symbol for using in other modules.

.extern <label> "<name>"

Declares extern symbol used in module.

.end

Specifies logical end of the source file. Source files that do not use this directive may not compile with future versions of the assembler.


file: /Techref/cybiko/bc/directives.htm, 3KB, , updated: 2008/6/12 20:37, local time: 2024/3/28 23:02,
TOP NEW HELP FIND: 
3.214.184.69: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://www.piclist.com/techref/cybiko/bc/directives.htm"> Cybiko Bytecode Interpreter: Directives</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?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .