Futurebasic/Language/Reference/beginassem

BeginAssem

edit

Statement

edit

✔ Appearance ✔ Standard ✔ Console

Syntax

edit
BeginAssem
 assembly_statements
EndAssem

Description

edit

Marks the beginning of a block of assembly-language statements. The block must be terminated with the EndAssem statement. The statements are assembled directly into the compiled program and executed when the program is run.

Each line in the assembly_statements block should be in this format:

[label] opCode [operands] [;remark]

Note that there should be at least one space character separating each of the four fields of this line. In particular, if label is omitted, you must include at least one leading space in front of opCode. But if label is included, then there should be no leading space to the left of label. To make a nicely formatted listing, use the TAB key to separate the fields.

You can also create assembly-language statements without using the BeginAssem and EndAssem statements, by preceding each assembly statement line with a “grave accent” character (that’s the character to the left of the “1” on the keyboard. It looks like a “backwards” apostrophe: `):

`[label] opCode [operands] [;remark]

This method has the disadvantage that you can’t specify a cpuType for each group of lines: assembly lines that begin with the “`” mark are always assembled according to the “preferred CPU,” using the rules given above. It’s important that you understand which CPU your assembly statements are being assembled for, and that your statements are appropriate for that CPU. You can use the compile long if cpuType statement to exclude your assembly statements from inappropriate compilations.

Notes

edit

BeginAssem is not supported in FBtoC.

See Also

edit

machlg; compile long if; #if

Language Reference