home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 2 / FreeSoftwareCollection2pd199x-jp.img / ms_dos / ish / ish200s / masm.h < prev    next >
Text File  |  1990-06-14  |  2KB  |  132 lines

  1. ;
  2. ;        ish file converter for MS-DOS  Ver 2.00 (90/3/27)
  3. ;
  4. ;
  5. ;        Copyright (c) 1986, 1987, 1989, 1990  by  M. ishizuka
  6. ;        All rights reserved.
  7. ;
  8.  
  9.  
  10.  
  11. ;-----------------------------------------------;
  12. ;                        ;
  13. ;    macro  masm.h                ;
  14. ;                        ;
  15. ;    macro for using MASM instead of OPTASM    ;
  16. ;                        ;
  17. ;-----------------------------------------------;
  18.  
  19. ifdef    @Version
  20.  
  21. if1
  22. masmjmp1    macro    para1, para2, para3, para4
  23.         ifnb    <para2>
  24. para2        macro    label1, label2, label3
  25.         local    skip, flag
  26.         ifnb    <label3>
  27.             .err
  28.         endif
  29.         ifnb    <label2>
  30.             ifdifi    <label1>, <short>
  31.                 .err
  32.             endif
  33.             para2    label2
  34.             exitm
  35.         elseif1
  36.             ifdef label1
  37.                 if (((offset label1 - $ - 2) lt 80h) and \
  38.                    ((offset label1 - $ - 2) ge -80h))
  39.                     flag = 1
  40.                     dw    ?
  41.                     exitm
  42.                 endif
  43.             endif
  44.             flag = 0
  45.             dw    ?
  46.             jmp    label1
  47. skip:
  48.         elseif2
  49.             if flag
  50.                 db    para1
  51.                 db    offset label1 - $ - 1
  52.             else
  53.                 db    para1 xor 1
  54.                 db    offset skip - $ - 1
  55.                 jmp    label1
  56. skip:
  57.             endif
  58.         endif
  59.         endm
  60.         masmjmp1    para1, para3,para4
  61.         endif
  62.         endm
  63.  
  64.         masmjmp1    70h, jo
  65.         masmjmp1    71h, jno
  66.         masmjmp1    72h, jb,   jnae, jc
  67.         masmjmp1    73h, jnb,  jae,  jnc
  68.         masmjmp1    74h, jz,   je
  69.         masmjmp1    75h, jnz,  jne
  70.         masmjmp1    76h, jbe,  jna
  71.         masmjmp1    77h, jnbe, ja
  72.         masmjmp1    78h, js
  73.         masmjmp1    79h, jns
  74.         masmjmp1    7ah, jp,   jpe
  75.         masmjmp1    7bh, jnp,  jpo
  76.         masmjmp1    7ch, jl,   jnge
  77.         masmjmp1    7dh, jnl,  jge
  78.         masmjmp1    7eh, jle,  jng
  79.         masmjmp1    7fh, jnle, jg
  80.  
  81.  
  82. masmjmp2    macro    para1, para2, para3, para4
  83.         ifnb    <para2>
  84. para2        macro    label1, label2, label3
  85.         local    skip, flag
  86.         ifnb    <label3>
  87.             .err
  88.         endif
  89.         ifnb    <label2>
  90.             ifdifi    <label1>, <short>
  91.                 .err
  92.             endif
  93.             para2    label2
  94.             exitm
  95.         elseif1
  96.             ifdef label1
  97.                 if (((offset label1 - $ - 2) lt 80h) and \
  98.                    ((offset label1 - $ - 2) ge -80h))
  99.                     flag = 1
  100.                     dw    ?
  101.                     exitm
  102.                 endif
  103.             endif
  104.             flag = 0
  105.             dw    ?, ?
  106.             jmp    label1
  107. skip:
  108.         elseif2
  109.             if flag
  110.                 db    para1
  111.                 db    offset label1 - $ - 1
  112.             else
  113.                 db    para1
  114.                 db    2
  115.                 jmp    short skip
  116.                 jmp    label1
  117. skip:
  118.             endif
  119.         endif
  120.         endm
  121.         masmjmp2    para1, para3,para4
  122.         endif
  123.         endm
  124.  
  125.         masmjmp2    0e0h,    loopnz, loopne
  126.         masmjmp2    0e1h,    loopz,    loope
  127.         masmjmp2    0e2h,    loop
  128.         masmjmp2    0e3h,    jcxz
  129. endif
  130.  
  131. endif
  132.