Ax51汇编命令指令

Ax51 User's Guide

http://www.keil.com/support/man/docs/a51/a51_ap_directives.htm

Directives

The Ax51 Assembler provides a number of directives you may use to control source file assembly. Directives are composed of one or more letters or digits and, unless otherwise specified, may be specified after the filename on the command line or within the source file when preceded by a dollar sign ('$'). For example:

A51 SAMPLE.A51 SYMBOLS DEBUG

or

$SYMBOLS DEBUG

or

$SYMBOLS
$DEBUG

The source file to assemble is SAMPLE.A51 and SYMBOLS and DEBUG are the directives.

Assembler directives may be divided into two groups:

  • Primary directives are specified on the assembler command line or in first few lines of the assembly source file. These directives control how the assembler behaves for the entire module. If conflicting primary directives are specified on the command line and in the source file, the command line directive takes precedence.
  • General directives may be specified on the command line or anywhere in the source file. These directives control the immediate behaviour of the assembler and may be changed during assembly.

 Note

  • Syntax is the same for directives specified on the command line and those specified in the source file.
  • Some directives may not be specified on the command line. If one of these directives is specified on the command line, the assembler generates a fatal error and aborts.

The following table is an alphabetical list of the control directives available in the Ax51 Assembler.

 

 

 

Directive

 
 
 

Group

 
 
 

Description

 
 
 

CASE

 
 
 

Primary

 
 
 

Enables case-sensitive  symbol names.

 
 
 

COND

 
 
 

General

 
 
 

Includes (in the listing  file) conditional source lines skipped by the preprocessor.

 
 
 

DATE

 
 
 

Primary

 
 
 

Specifies the date to  use in the listing file header.

 
 
 

DEBUG

 
 
 

Primary

 
 
 

Includes debugging  information in the object file.

 
 
 

DEFINE

 
 
 

Primary

 
 
 

Defines C preprocessor  symbols on the command line.

 
 
 

ECRM

 
 
 

Primary

 
 
 

Allow expansion of  generic CALL instruction to ECALL for the NXP 80C51MX devices.

 
 
 

EJECT1

 
 
 

General

 
 
 

Inserts a form feed  character into the listing file.

 
 
 

ELSE

 
 
 

General

 
 
 

Assemble block if the  condition of a previous IF  is false.

 
 
 

ELSEIF

 
 
 

General

 
 
 

Assemble block if  condition is true and a previous IF  or ELSEIF  is false.

 
 
 

ENDIF

 
 
 

General

 
 
 

Ends an IF block.

 
 
 

ERRORPRINT

 
 
 

Primary

 
 
 

Specifies the file name  for error messages.

 
 
 

GEN

 
 
 

General

 
 
 

Includes all macro  expansions in the listing file.

 
 
 

IF

 
 
 

General

 
 
 

Assemble block if  condition is true.

 
 
 

INCDIR

 
 
 

Primary

 
 
 

Sets additional include  file paths.

 
 
 

INCLUDE2

 
 
 

General

 
 
 

Includes the contents  of another file.

 
 
 

LIST

 
 
 

General

 
 
 

Includes the assembly  source text in the listing file.

 
 
 

MACRO

 
 
 

Primary

 
 
 

Enables preprocessor  expansion of standard macros.

 
 
 

MOD_CONT

 
 
 

Primary

 
 
 

Enables 24-bit  contiguous addressing for Dallas Semiconductor devices.

 
 
 

MOD_MX51

 
 
 

Primary

 
 
 

Enables instruction set  extensions for the NXP 80C51MX architecture.

 
 
 

MOD51

 
 
 

Primary

 
 
 

Enables code generation  and defines SFRs for classic 8051 devices.

 
 
 

MPL

 
 
 

Primary

 
 
 

Enables preprocessor  expansion of MPL macros.

 
 
 

NOAMAKE

 
 
 

Primary

 
 
 

Excludes build  information from the object file.

 
 
 

NOCASE

 
 
 

Primary

 
 
 

Disables case-sensitive  symbol names. All symbols are converted to uppercase.

 
 
 

NOCOND

 
 
 

Primary

 
 
 

Excludes (from the  listing file) conditional source lines skipped by the preprocessor.

 
 
 

NODEBUG

 
 
 

Primary

 
 
 

Excludes debugging  information from the object file.

 
 
 

NOERRORPRINT

 
 
 

Primary

 
 
 

Disables error messages  output to the screen.

 
 
 

NOGEN

 
 
 

General

 
 
 

Excludes macro  expansions from the listing file.

 
 
 

NOLINES

 
 
 

Primary

 
 
 

Excludes line number  information from the generated object module.

 
 
 

NOLIST

 
 
 

General

 
 
 

Excludes the assembly  source text from the listing file.

 
 
 

NOMACRO

 
 
 

Primary

 
 
 

Disables preprocessor  expansion of standard and MPL macros.

 
 
 

NOMOD51

 
 
 

Primary

 
 
 

Suppresses SFRs  definitions for classic 8051 devices

 
 
 

NOMPL

 
 
 

Primary

 
 
 

Disables preprocessor  expansion of MPL macros.

 
 
 

NOOBJECT

 
 
 

Primary

 
 
 

Disables object file  generation.

 
 
 

NOPRINT

 
 
 

Primary

 
 
 

Disables listing file  generation.

 
 
 

NOREGISTERBANK

 
 
 

Primary

 
 
 

Disables memory space  reservation for register banks.

 
 
 

NOSYMBOLS

 
 
 

Primary

 
 
 

Excludes the symbol  table from the listing file.

 
 
 

NOSYMLIST

 
 
 

General

 
 
 

Excludes subsequently  defined symbols from the symbol table.

 
 
 

NOXREF

 
 
 

Primary

 
 
 

Excludes the  cross-reference table from the listing file.

 
 
 

OBJECT

 
 
 

Primary

 
 
 

Specifies the name for  the object file.

 
 
 

PAGELENGTH

 
 
 

Primary

 
 
 

Specifies the number of  lines on a page in the listing file.

 
 
 

PAGEWIDTH

 
 
 

Primary

 
 
 

Specifies the number of  characters on a line in the listing file.

 
 
 

PRINT

 
 
 

Primary

 
 
 

Specifies the name for  the listing file.

 
 
 

REGISTERBANK

 
 
 

Primary

 
 
 

Reserves memory space for  register banks.

 
 
 

REGUSE

 
 
 

General

 
 
 

Specifies registers  modified by the specified function.

 
 
 

RESET

 
 
 

General

 
 
 

Sets symbols, which may  be tested by IF  or ELSEIF,  to false.

 
 
 

RESTORE1

 
 
 

General

 
 
 

Restores settings for  the LIST  andGEN  directives.

 
 
 

SAVE1

 
 
 

General

 
 
 

Saves settings for the LIST  andGEN  directives.

 
 
 

SET

 
 
 

General

 
 
 

Sets symbols, which may  be tested by IF  or ELSEIF,  to true or a specified value.

 
 
 

SYMBOLS

 
 
 

Primary

 
 
 

Includes the symbol  table in the listing file.

 
 
 

SYMLIST

 
 
 

General

 
 
 

Includes subsequently  defined symbols in the symbol table.

 
 
 

TITLE

 
 
 

Primary

 
 
 

Specifies the page  header title in the listing file.

 
 
 

XREF

 
 
 

Primary

 
 
 

Includes the  cross-reference table in the listing file.

 

 

 Note

  1. These directives may not be specified on the command line. They may only be specified in the source file.
  2. Primary directives may not be specified after an INCLUDE directive.

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值