⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wasm.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 3 页
字号:
.chap *refid=wasm The &asmname.
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.np
.ix 'assembler'
This chapter describes the &asmname..
It takes as input an assembler source file (a file with extension
"&axt") and produces, as output, an object file.
.np
The &asmname command line syntax is the following.
.ix '&asmcmdup' 'command line format'
.ix 'command line format' '&asmcmdup'
.if '&target' eq 'QNX' .do begin
.mbigbox
&asmcmdup [options] asm_file [options] [@env_var]
.embigbox
.np
The square brackets [ ] denote items which are optional.
.begnote
.mnote &asmcmd
is the name of the &asmname..
.mnote asm_file
is the filename specification of the assembler source file to be
assembled.
A default filename extension of ".a" is assumed when no extension is
specified.
A filename extension consists of that portion of a filename containing
the last "." and any characters which follow it.
.exam begin
File Specification              Extension
/home/john.doe/foo              (none)
/home/john.doe/foo.             .
/home/john.doe/foo.bar          .bar
/home/john.doe/foo.goo.bar      .bar
.exam end
.mnote options
is a list of valid &asmname options, each preceded by a dash
("&minus.").
Options may be specified in any order.
.endnote
.do end
.el .do begin
.mbigbox
&asmcmdup [options] [d:][path]filename[.ext] [options] [@env_var]
.embigbox
.np
The square brackets [ ] denote items which are optional.
.begnote
.mnote &asmcmdup
is the name of the &asmname..
.mnote d:
is an optional drive specification such as "A:", "B:", etc.
If not specified, the default drive is assumed.
.mnote path
is an optional path specification such as "\PROGRAMS\ASM\".
If not specified, the current directory is assumed.
.mnote filename
is the file name of the assembler source file to be assembled.
.mnote ext
is the file extension of the assembler source file to be assembled.
If omitted, a file extension of "&axt" is assumed.
If the period "." is specified but not the extension, the file is
assumed to have no file extension.
.mnote options
is a list of valid options, each preceded by a slash
("/") or a dash ("&minus.").
Options may be specified in any order.
.endnote
.do end
.np
The options supported by the &asmname. are:
.begnote $compact
.note {0,1,2,3,4,5,6}{p}{r,s}
.begnote $compact
.note 0
same as ".8086"
.note 1
same as ".186"
.note 2{p}
same as ".286" or ".286p"
.note 3{p}
same as ".386" or ".386p"
(also defines "__386__" and changes the default USE attribute of
segments from "USE16" to "USE32")
.note 4{p}
same as ".486" or ".486p"
(also defines "__386__" and changes the default USE attribute of
segments from "USE16" to "USE32")
.note 5{p}
same as ".586" or ".586p"
(also defines "__386__" and changes the default USE attribute of
segments from "USE16" to "USE32")
.note 6{p}
same as ".686" or ".686p"
(also defines "__386__" and changes the default USE attribute of
segments from "USE16" to "USE32")
.note p
protect mode
.note add r
defines "__REGISTER__"
.note add s
defines "__STACK__"
.endnote
.exam begin
-2      -3p     -4pr    -5p
.exam end
.note bt=<os>
defines "__<os>__" and checks the "<os>_INCLUDE" environment variable
for include files
.note c
do not output OMF COMENT records that allow WDISASM to figure out when
data bytes have been placed in a code segment
.note d<name>[=text]
define text macro
.note d1
line number debugging support
.note e
stop reading assembler source file at END directive.
Normally, anything following the END directive will cause an error.
.note e<number>
set error limit number
.note fe=<file_name>
set error file name
.note fo=<file_name>
set object file name
.note fi=<file_name>
force <file_name> to be included
.note fpc
same as ".no87"
.note fpi
inline 80x87 instructions with emulation
.note fpi87
inline 80x87 instructions
.note fp0
same as ".8087"
.note fp2
same as ".287" or ".287p"
.note fp3
same as ".387" or ".387p"
.note fp5
same as ".587" or ".587p"
.note fp6
same as ".687" or ".687p"
.note i=<directory>
add directory to list of include directories
.note j or s
force signed types to be used for signed values
.note m{t,s,m,c,l,h,f}
memory model: (Tiny, Small, Medium, Compact, Large, Huge, Flat)
.begnote $compact
.note -mt
Same as ".model tiny"
.note -ms
Same as ".model small"
.note -mm
Same as ".model medium"
.note -mc
Same as ".model compact"
.note -ml
Same as ".model large"
.note -mh
Same as ".model huge"
.note -mf
Same as ".model flat"
.endnote
.np
Each of the model directives also defines "__<model>__"
(e.g., ".model small" defines "__SMALL__").
They also affect whether something like "foo proc" is considered a
"far" or "near" procedure.
.note nd=<name>
set data segment name
.note nm=<name>
set module name
.note nt=<name>
set name of text segment
.note o
allow C form of octal constants
.note zcm
set C name mangler to MASM compatible mode
.note zld
remove file dependency information
.note zq or q
operate quietly
.note zz
remove "@size" from STDCALL function names
.note zzo
don't mangle STDCALL symbols (WASM backward compatible)
.note ?  or h
print this message
.note w<number>
set warning level number
.note we
treat all warnings as errors
.note wx
set warning level to maximum setting
.endnote
.*
.section Assembly Directives and Opcodes
.*
.np
It is not the intention of this chapter to describe assembly-language
programming in any detail.
You should consult a book that deals with this topic.
However, we present an alphabetically ordered list of the directives,
opcodes and register names that are recognized by the assembler.
.ix '.186'
.ix '.286'
.ix '.286c'
.ix '.286p'
.ix '.287'
.ix '.386'
.ix '.386p'
.ix '.387'
.ix '.486'
.ix '.486p'
.ix '.586'
.ix '.586p'
.ix '.686'
.ix '.686p'
.ix '.8086'
.ix '.8087'
:cmt. .ix 'aaa'
:cmt. .ix 'aad'
:cmt. .ix 'aam'
:cmt. .ix 'aas'
:cmt. .ix 'abs'
:cmt. .ix 'adc'
:cmt. .ix 'add'
:cmt. .ix 'addr'
:cmt. .ix 'ah'
:cmt. .ix 'al'
:cmt. .ix 'alias'
:cmt. .ix 'align'
.ix '.alpha'
:cmt. .ix 'and'
:cmt. .ix 'arpl'
:cmt. .ix 'assume'
:cmt. .ix 'at'
:cmt. .ix 'ax'
:cmt. .ix 'basic'
:cmt. .ix 'bh'
:cmt. .ix 'bl'
:cmt. .ix 'bound'
:cmt. .ix 'bp'
.ix '.break'
:cmt. .ix 'bsf'
:cmt. .ix 'bsr'
:cmt. .ix 'bswap'
:cmt. .ix 'bt'
:cmt. .ix 'btc'
:cmt. .ix 'btr'
:cmt. .ix 'bts'
:cmt. .ix 'bx'
:cmt. .ix 'byte'
:cmt. .ix 'c'
:cmt. .ix 'call'
:cmt. .ix 'callf'
:cmt. .ix 'casemap'
:cmt. .ix 'catstr'
:cmt. .ix 'cbw'
:cmt. .ix 'cdq'
:cmt. .ix 'ch'
:cmt. .ix 'cl'
:cmt. .ix 'clc'
:cmt. .ix 'cld'
:cmt. .ix 'cli'
:cmt. .ix 'clts'
:cmt. .ix 'cmc'
:cmt. .ix 'cmp'
:cmt. .ix 'cmps'
:cmt. .ix 'cmpsb'
:cmt. .ix 'cmpsd'
:cmt. .ix 'cmpsw'
:cmt. .ix 'cmpxchg'
:cmt. .ix 'cmpxchg8b'
.ix '.code'
:cmt. .ix 'comm'
:cmt. .ix 'comment'
:cmt. .ix 'common'
:cmt. .ix 'compact'
.ix '.const'
.ix '.continue'
:cmt. .ix 'cpuid'
:cmt. .ix 'cr0'
:cmt. .ix 'cr2'
:cmt. .ix 'cr3'
:cmt. .ix 'cr4'
.ix '.cref'
:cmt. .ix 'cs'
:cmt. .ix 'cwd'
:cmt. .ix 'cwde'
:cmt. .ix 'cx'
:cmt. .ix 'daa'
:cmt. .ix 'das'
.ix '.data'
.ix '.data?'
:cmt. .ix 'db'
:cmt. .ix 'dd'
:cmt. .ix 'dec'
:cmt. .ix 'df'
:cmt. .ix 'dh'
:cmt. .ix 'di'
:cmt. .ix 'div'
:cmt. .ix 'dl'
.ix '.dosseg'
:cmt. .ix 'dosseg'
:cmt. .ix 'dp'
:cmt. .ix 'dq'
:cmt. .ix 'dr0'
:cmt. .ix 'dr1'
:cmt. .ix 'dr2'
:cmt. .ix 'dr3'
:cmt. .ix 'dr6'
:cmt. .ix 'dr7'
:cmt. .ix 'ds'
:cmt. .ix 'dt'
:cmt. .ix 'dup'
:cmt. .ix 'dw'
:cmt. .ix 'dword'
:cmt. .ix 'dx'
:cmt. .ix 'eax'
:cmt. .ix 'ebp'
:cmt. .ix 'ebx'
:cmt. .ix 'echo'
:cmt. .ix 'ecx'
:cmt. .ix 'edi'
:cmt. .ix 'edx'
:cmt. .ix '.else'
:cmt. .ix 'else'
:cmt. .ix 'elseif'
:cmt. .ix 'end'
:cmt. .ix '.endif'
:cmt. .ix 'endif'
:cmt. .ix 'endp'
:cmt. .ix 'ends'
.ix '.endw'
:cmt. .ix 'enter'
:cmt. .ix 'eq'
:cmt. .ix 'equ'
:cmt. .ix 'equ2'
.ix '.err'
.ix '.errb'
.ix '.errdef'
.ix '.errdif'
.ix '.errdifi'
.ix '.erre'
.ix '.erridn'
.ix '.erridni'
.ix '.errnb'
.ix '.errndef'
.ix '.errnz'
:cmt. .ix 'error'
:cmt. .ix 'es'
:cmt. .ix 'esi'
:cmt. .ix 'esp'
:cmt. .ix 'even'
.ix '.exit'
:cmt. .ix 'export'
:cmt. .ix 'extern'
:cmt. .ix 'externdef'
:cmt. .ix 'extrn'
:cmt. .ix 'f2xm1'
:cmt. .ix 'fabs'
:cmt. .ix 'fadd'
:cmt. .ix 'faddp'
:cmt. .ix 'far'
.ix '.fardata'
.ix '.fardata?'
:cmt. .ix 'farstack'
:cmt. .ix 'fbld'
:cmt. .ix 'fbstp'
:cmt. .ix 'fchs'
:cmt. .ix 'fclex'
:cmt. .ix 'fcom'
:cmt. .ix 'fcomp'
:cmt. .ix 'fcompp'
:cmt. .ix 'fcos'
:cmt. .ix 'fdecstp'
:cmt. .ix 'fdisi'
:cmt. .ix 'fdiv'
:cmt. .ix 'fdivp'
:cmt. .ix 'fdivr'
:cmt. .ix 'fdivrp'
:cmt. .ix 'feni'
:cmt. .ix 'ffree'
:cmt. .ix 'fiadd'
:cmt. .ix 'ficom'
:cmt. .ix 'ficomp'
:cmt. .ix 'fidiv'
:cmt. .ix 'fidivr'
:cmt. .ix 'fild'
:cmt. .ix 'fimul'
:cmt. .ix 'fincstp'
:cmt. .ix 'finit'
:cmt. .ix 'fist'
:cmt. .ix 'fistp'
:cmt. .ix 'fisub'
:cmt. .ix 'fisubr'
:cmt. .ix 'flat'
:cmt. .ix 'fld'
:cmt. .ix 'fld1'
:cmt. .ix 'fldcw'
:cmt. .ix 'fldenv'
:cmt. .ix 'fldenvd'
:cmt. .ix 'fldenvw'
:cmt. .ix 'fldl2e'
:cmt. .ix 'fldl2t'
:cmt. .ix 'fldlg2'
:cmt. .ix 'fldln2'
:cmt. .ix 'fldpi'
:cmt. .ix 'fldz'
:cmt. .ix 'fmul'
:cmt. .ix 'fmulp'
:cmt. .ix 'fnclex'
:cmt. .ix 'fndisi'
:cmt. .ix 'fneni'
:cmt. .ix 'fninit'
:cmt. .ix 'fnop'
:cmt. .ix 'fnrstor'
:cmt. .ix 'fnrstord'
:cmt. .ix 'fnrstorw'
:cmt. .ix 'fnsave'
:cmt. .ix 'fnsaved'
:cmt. .ix 'fnsavew'
:cmt. .ix 'fnstcw'
:cmt. .ix 'fnstenv'
:cmt. .ix 'fnstenvd'
:cmt. .ix 'fnstenvw'
:cmt. .ix 'fnstsw'
:cmt. .ix 'for'
:cmt. .ix 'forc'

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -