home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / FFB.ZIP / FFHLP.ARC / PASM.HLP < prev    next >
Encoding:
Text File  |  1988-01-11  |  5.2 KB  |  118 lines

  1.                 Assembler documentation for PASM.SEQ
  2.  
  3.   Overview
  4.  
  5.           PASM.SEQ is an assembler which is based on an assembler
  6.         published in DDJ, February 1982 by Ray Duncan. That assembler
  7.         was subsequently modified by Robert L. Smith to repair bugs, and
  8.         support the Prefix assembler notation. I (Tom Zimmer) have made
  9.         additional modifications to allow switching syntaxes, and to
  10.         increase compatibility in POSTFIX mode with the F83 assembler.
  11.  
  12.  
  13.   PREFIX or POSTFIX ?
  14.  
  15.           PASM supports dual syntaxes. The words PREFIX and POSTFIX
  16.         switch between the two supported modes. The POSTFIX mode
  17.         is VERY similar to F83's CPU8086 assembler. PREFIX mode which is
  18.         the default mode, allows a syntax which is much closed to MASM.
  19.  
  20.  
  21.   Macros in PASM
  22.  
  23.           Another area of interest is macros, here is the definition of
  24.         the NEXT macro:
  25.  
  26.                 : NEXT  >PRE    JMP >NEXT A;    PRE> ;
  27.  
  28.           The macro itself is simply the sequence JMP >NEXT. The
  29.         surrounding words are used for support. Since PASM supports both
  30.         Sufix as well as Prefix notation, It is not know on entry to a
  31.         macro what mode is selected. The words >PRE and PRE> select
  32.         Prefix, and restore the previous mode so macros will always be
  33.         in Prefix notation. The A; after >NEXT, forces the assembly of
  34.         the JMP instruction before the mode switch.
  35.  
  36.  
  37.   Why Dual Syntax
  38.  
  39.           The assembler supports Prefix syntax, in an attempt to provide
  40.         a syntax which is more readable to programmers of other
  41.         languages. It supports Postfix syntax to prevent alienating the
  42.         established base of F83 users.
  43.  
  44.           The prefix notation is I think more readable, and certainly
  45.         will be more familiar to programmers of other languages. Please
  46.         consider writting any new assembly code you need in the Prefix
  47.         mode.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.   Syntax Comparison
  58.  
  59.  
  60.         PREFIX                  POSTFIX                 MASM
  61.  
  62.         AAA                     AAA                     AAA
  63.         ADC AX, SI              SI AX ADC               ADC AX,SI
  64.         ADC DX, 0 [SI]          0 [SI] DX ADC           ADC DX,0[SI]
  65.         ADC 2 [BX+SI], DI       DI 2 [BX+SI] ADC        ADC 2[BX][SI],DI
  66.         ADC MEM BX              BX MEM #) ADC           ADC MEM,BX
  67.         ADC AL, # 5             5 # AL ADC              ADC AL,5
  68.         AND AX, BX              BX AX AND               AND AX,BX
  69.         AND CX, MEM             CX MEM #) AND           AND CX,MEM
  70.         AND DL, # 3             3 # DL AND              AND DL,3
  71.         CALL NAME               NAME #) CALL            CALL NAME
  72.         CALL FAR [] NAME        FAR [] NAME #) CALL     ?????
  73.         CMP DX, BX              BX DX CMP               CMP DX,BX
  74.         CMP 2 [BP], SI          SI 2 [BP] CMP           CMP [BP+2],SI
  75.         DEC BP                  BP DEC                  DEC BP
  76.         DEC MEM                 MEM DEC                 DEC MEM
  77.         DEC 3 [SI]              3 [SI] DEC              DEC 3[SI]
  78.         DIV CL                  CL DIV                  DIV CL
  79.         DIV MEM                 MEM DIV                 DIV MEM
  80.         IN PORT# WORD           WORD PORT# IN           IN AX,PORT#
  81.         IN PORT#                PORT# IN                IN AL,PORT#
  82.         IN AX, DX               DX AX IN                IN AX,DX
  83.         INC MEM                 BYTE MEM INC            INC MEM BYTE
  84.         INC MEM WORD            MEM #) INC              INC MEM WORD
  85.         INT 16                  16 INT                  INT 16
  86.         JA NAME                 NAME JA                 JA NAME
  87.         JNBE NAME               NAME #) JNBE            JNBE NAME
  88.         JMP NAME                NAME #) JMP             JMP
  89.         LODSW                   AX LODS                 LODS WORD
  90.         LODSB                   AL LODS                 LODS BYTE
  91.         LOOP NAME               NAME #) LOOP            LOOP NAME
  92.         MOV AX, BX              BX AX MOV               MOV AX,BX
  93.         MOV AH, AL              AL AH MOV               MOV AH,AL
  94.         MOV BP, 0 [BX]          0 [BX] BP MOV           MOV BP,0[BX]
  95.         MOV ES: BP, SI          ES: BP SI MOV           MOV ES:BP,SI
  96.         MOVSW                   AX MOVS                 MOVS WORD
  97.         POP DX                  DX POP                  POP DX
  98.         POPF                    POPF                    POPF
  99.         PUSH SI                 SI PUSH                 PUSH SI
  100.         REP                     REP                     REP
  101.         RET                     RET                     RET
  102.         ROL AX, # 1             AX ROL                  ROL AX,1
  103.         ROL AX, CL              AX CL ROL               ROL AX,CL
  104.         SHL AX, # 1             AX SHL                  SHL AX,1
  105.         XCHG AX, BP             BP AX XCHG              XCHG AX,BP
  106.         XOR CX, DX              DX, CX XOR              XOR CX,DX
  107.  
  108.   Word Help documentation
  109.  
  110. CODE            ( | name --- )
  111.         Define "name" as a new code definition. Assembly language
  112.         follows, terminated by END-CODE.
  113.  
  114. END-CODE        ( --- )
  115.         Terminates CODE definitions.
  116.  
  117.  
  118.