home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
asm_programming
/
all.lst
< prev
next >
Wrap
File List
|
1988-04-05
|
16KB
|
516 lines
The Microsoft MACRO Assembler , Version 1.27 Page 1-1
04-05-88
;
; all - use all the op codes
;
0000 code2seg segment
0000 farroutine proc far
0000 B8 4C00 mov ax,4c00H
0003 CD 21 int 21H ; if this file
is executed, just terminate
0005 farroutine endp
;
0005 code2seg ends
;
0000 dataseg segment
0000 0000 alpha dw 0
0002 01E6 R nearindirect dw beta
0004 0000 ---- R farindirect dd farroutine
0008 dataseg ends
;
0000 codeseg segment
;
assume ds:dataseg
assume es:nothing
assume ss:nothing
assume cs:codeseg
;
; ensure disassembler synchronization
;
0000 90 nop
0001 90 nop
0002 90 nop
0003 90 nop
0004 90 nop
0005 90 nop
;
; 20 examples of addressing modes
;
0006 10 00 db 10h,00h
0008 10 08 db 10h,08h
000A 10 10 db 10h,10h
000C 10 18 db 10h,18h
000E 10 20 db 10h,20h
0010 10 28 db 10h,28h
0012 10 30 db 10h,30h
0014 10 38 db 10h,38h
0016 10 00 db 10h,00h
0018 10 01 db 10h,01h
001A 10 02 db 10h,02h
001C 10 03 db 10h,03h
001E 10 04 db 10h,04h
0020 10 05 db 10h,05h
0022 10 06 64 63 db 10h,06h,64h,63h
0026 10 07 db 10h,07h
0028 10 00 db 10h,00h
The Microsoft MACRO Assembler , Version 1.27 Page 1-2
04-05-88
002A 10 40 78 db 10h,40h,78h
002D 10 80 78 79 db 10h,80h,78h,79h
0031 10 C0 db 10h,0c0h
;
; another 32 examples of addressing modes
;
0033 8F 00 pop [bx+si]
0035 8F 01 pop [bx+di]
0037 8F 02 pop ss:[bp+si]
0039 8F 03 pop ss:[bp+di]
003B 8F 04 pop [si]
003D 8F 05 pop [di]
003F 05 0006 add ax, [0006] ; illustrate immed
iate addressing with add
; instruction, sin
ce there's no immediate pop
0042 8F 07 pop [bx]
0044 8F 40 08 pop [08+bx+si]
0047 8F 41 09 pop [09+bx+di]
004A 8F 42 0A pop ss:[0aH+bp+si]
004D 8F 43 0B pop ss:[0bH+bp+di]
0050 8F 44 0C pop [0cH+si]
0053 8F 45 0D pop [0dH+di]
0056 8F 46 0E pop ss:[0eH+bp]
0059 8F 47 0F pop [0fH+bx]
005C 8F 80 1010 pop [1010H+bx+si]
0060 8F 81 1011 pop [1011H+bx+di]
0064 8F 82 1012 pop ss:[1012H+bp+si]
0068 8F 83 1013 pop ss:[1013H+bp+di]
006C 8F 84 1014 pop [1014H+si]
0070 8F 85 1015 pop [1015H+di]
0074 8F 86 1016 pop ss:[1016H+bp]
0078 8F 87 1017 pop [1017H+bx]
007C 58 pop ax
007D 59 pop cx
007E 5A pop dx
007F 5B pop bx
0080 5C pop sp
0081 5D pop bp
0082 5E pop si
0083 5F pop di
;
; illustrate segment register usage
;
0084 8F 07 pop [bx] ; default is ds
:
0086 2E: 8F 07 pop cs:[bx]
0089 36: 8F 07 pop ss:[bx]
008C 8F 07 pop ds:[bx]
008E 26: 8F 07 pop es:[bx]
0091 8F 46 00 pop [bp] ; default is ss
:
0094 2E: 8F 46 00 pop cs:[bp]
The Microsoft MACRO Assembler , Version 1.27 Page 1-3
04-05-88
0098 8F 46 00 pop ss:[bp]
009B 3E: 8F 46 00 pop ds:[bp]
009F 26: 8F 46 00 pop es:[bp]
;
00A3 nearroutine proc near
00A3 nearroutine endp
;
; 8088 instructions in alphabetical order
; (as in Intel's "iAPX 88 Book")
;
00A3 37 aaa
00A4 D5 0A aad
00A6 D4 0A aam
00A8 3F aas
00A9 13 0F adc cx,[bx]
00AB 13 0E 0000 R adc cx,alpha
00AF 83 D1 0D adc cx,13
00B2 15 000D adc ax,13
00B5 03 0F add cx,[bx]
00B7 23 0F and cx,[bx]
00B9 E8 00A3 R call nearroutine
00BC 9A 0000 ---- R call farroutine
00C1 FF 16 0002 R call nearindirect
00C5 FF 1E 0004 R call farindirect
00C9 98 cbw
00CA F8 clc
00CB FC cld
00CC FA cli
00CD F5 cmc
00CE 3B 0F cmp cx,[bx]
00D0 A6 cmpsb
00D1 A7 cmpsw
00D2 99 cwd
00D3 27 daa
00D4 2F das
00D5 48 dec ax
00D6 FE C8 dec al
00D8 FE 0F dec byte ptr [bx]
00DA F7 F1 div cx
;
; esc floating point
operations
;
00DC 9B D9 D0 fnop
00DF 9B D9 E0 fchs
00E2 9B D9 E1 fabs
00E5 9B D9 E4 ftst
00E8 9B D9 E5 fxam
00EB 9B D9 E8 fld1
00EE 9B D9 EA fldl2e
00F1 9B D9 EB fldpi
00F4 9B D9 EC fldlg2
00F7 9B D9 ED fldln2
The Microsoft MACRO Assembler , Version 1.27 Page 1-4
04-05-88
00FA 9B D9 F6 fdecstp
00FD 9B D9 F7 fincstp
0100 9B D9 EE fldz
0103 9B D9 F0 f2xm1
0106 9B D9 F1 fyl2x
0109 9B D9 F2 fptan
010C 9B D9 F3 fpatan
010F 9B D9 F4 fxtract
0112 9B D9 F8 fprem
0115 9B D9 F9 fyl2xp1
0118 9B D9 FA fsqrt
011B 9B D9 FC frndint
011E 9B D9 FD fscale
0121 9B DB E0 feni
0124 9B DB E1 fdisi
0127 9B DB E2 fclex
012A 9B DB E3 finit
012D 9B DE D9 fcompp
;
0130 F4 hlt
0131 F7 FA idiv dx
0133 F7 EB imul bx
0135 E5 43 in ax,67
0137 ED in ax,dx
0138 FE C2 inc dl
013A 42 inc dx
013B CC int 3
013C CD 21 int 33
013E CE into
013F CF iret
0140 77 1F ja $+33
0142 77 1F jnbe $+33
0144 73 20 jae $+34
0146 73 20 jnb $+34
0148 72 21 jb $+35
014A 72 21 jnae $+35
014C 76 22 jbe $+36
014E 76 22 jna $+36
0150 72 23 jc $+37
0152 E3 24 jcxz $+38
0154 74 25 je $+39
0156 74 25 jz $+39
0158 7F 26 jg $+40
015A 7F 26 jnle $+40
015C 7D 27 jge $+41
015E 7D 27 jnl $+41
0160 7C 28 jl $+42
0162 7C 28 jnge $+42
0164 7E 29 jle $+43
0166 7E 29 jng $+43
0168 E9 00A3 R jmp nearroutine
016B EA 0000 ---- R jmp farroutine
0170 73 2A jnc $+44
The Microsoft MACRO Assembler , Version 1.27 Page 1-5
04-05-88
0172 75 2B jne $+45
0174 75 2B jnz $+45
0176 71 2C jno $+46
0178 79 2D jns $+47
017A 7B 2E jnp $+48
017C 7B 2E jpo $+48
017E 70 2F jo $+49
0180 7A 30 jp $+50
0182 7A 30 jpe $+50
0184 78 31 js $+51
0186 9F lahf
0187 C5 0F lds cx,[bx]
0189 8D 0F lea cx,[bx]
018B C4 0F les cx,[bx]
018D F0/ 05 0001 lock add ax,1
0191 AD lodsw
0192 AC lodsb
0193 E2 1F loop $+33
0195 E1 20 loope $+34
0197 E1 20 loopz $+34
0199 E0 21 loopnz $+35
019B E0 21 loopne $+35
019D 8B C3 mov ax,bx
019F C6 07 23 mov byte ptr [bx],35
01A2 BB 0022 mov bx,34
01A5 B8 0023 mov ax,35
01A8 89 87 0159 mov [bx+345],ax
01AC A3 0000 R mov alpha,ax
01AF B8 0159 mov ax,[345]
01B2 8E D8 mov ds,ax
01B4 8C 9F 015A mov [bx+346],ds
01B8 A4 movsb
01B9 A5 movsw
01BA F7 E3 mul bx
01BC F6 1F neg byte ptr [bx]
01BE 90 nop
01BF F6 17 not byte ptr [bx]
01C1 09 4F 22 or [bx+34],cx
01C4 80 4F 23 4E or byte ptr [bx+35],78
01C8 0D 0043 or ax,67
01CB E7 58 out 88,ax
01CD EE out dx,al
01CE 8F 87 037A pop [bx+890]
01D2 58 pop ax
01D3 1F pop ds
01D4 9D popf
01D5 FF B7 036F push [bx+879]
01D9 53 push bx
01DA 1E push ds
01DB 9C pushf
01DC D0 17 rcl byte ptr [bx],1
01DE D2 1F rcr byte ptr [bx],cl
01E0 F3/ AA rep stosb
The Microsoft MACRO Assembler , Version 1.27 Page 1-6
04-05-88
01E2 F3/ AA repe stosb
01E4 F2/ AA repne stosb
01E6 beta proc near
01E6 C3 ret
01E7 C2 0003 ret 3
01EA beta endp
01EA delta proc far
01EA CB ret
01EB CA 0003 ret 3
01EE delta endp
01EE D1 C2 rol dx,1
01F0 D3 C2 rol dx,cl
01F2 D1 CA ror dx,1
01F4 D2 4F 03 ror byte ptr [bx+3],cl
01F7 9E sahf
01F8 D1 E1 sal cx,1
01FA D3 E2 sal dx,cl
01FC D1 FA sar dx,1
01FE D3 FA sar dx,cl
0200 D1 FA sar dx,1
0202 D3 FA sar dx,cl
0204 1B D1 sbb dx,cx
0206 83 DA 01 sbb dx,1
0209 1C 03 sbb al,3
020B AF scasw
020C AE scasb
020D D1 E8 shr ax,1
020F D3 E8 shr ax,cl
0211 F9 stc
0212 FD std
0213 FB sti
0214 AA stosb
0215 2B D1 sub dx,cx
0217 83 EA 03 sub dx,3
021A 2D 0003 sub ax,3
021D 85 D1 test dx,cx
021F 9B wait
0220 87 4F 2D xchg [bx+45],cx
0223 91 xchg ax,cx
0224 D7 xlat
0225 81 F1 004E xor cx,78
;
; 80186 & V20 instructions
;
0229 62 00 db 62h,0 ;bound
022B C8 21 2C 05 db 0c8h,33,44,5 ;enter procedur
e
022F 69 00 21 2C db 69h,0,33,44 ;imul immediate
0233 69 C0 21 2C db 69h,0c0h,33,44 ;imul immediate
0237 6B 00 21 db 6bh,0,33 ;imul immediate
023A 6B C0 21 db 6bh,0c0h,33 ;imul immediate
023D 6C db 6ch ;ins dx
023E F2 6C db 0f2h,6ch ;ins dx repeate
The Microsoft MACRO Assembler , Version 1.27 Page 1-7
04-05-88
d by count in cx
0240 C9 db 0c9h ;leave procedur
e
0241 6E db 6eh ;outs dx
0242 F2 6E db 0f2h,6eh ;outs dx repeat
ed by count in cx
0244 61 db 61h ;popa
0245 68 21 2C db 68h,33,44 ;push immediate
0248 6A 21 db 6ah,33 ;push immediate
024A 60 db 60h ;pusha
024B C0 00 03 db 0c0h,00h,3 ;ROL memory by
count
024E C0 08 03 db 0c0h,08h,3 ;ROR memory by
count
0251 C0 10 03 db 0c0h,10h,3 ;RCL memory by
count
0254 C0 18 03 db 0c0h,18h,3 ;RCR memory by
count
0257 C0 20 03 db 0c0h,20h,3 ;SHL/SAL memory
by count
025A C0 28 03 db 0c0h,28h,3 ;SHR memory by
count
025D C0 38 03 db 0c0h,38h,3 ;SAR memory by
count
;
; V20 unique instructions
;
0260 0F 20 db 0fh,20h ;add4s
0262 0F 12 C0 db 0fh,12h,0c0h ;clr1 reg8,cl
0265 0F 12 00 db 0fh,12h,000h ;clr1 mem8,cl
0268 0F 13 C0 db 0fh,13h,0c0h ;clr1 reg16,cl
026B 0F 13 00 db 0fh,13h,000h ;clr1 mem16,cl
026E 0F 1A C0 03 db 0fh,1ah,0c0h,3 ;clr1 reg8,imm3
0272 0F 1A 00 03 db 0fh,1ah,000h,3 ;clr1 mem8,imm3
0276 0F 1B C0 03 db 0fh,1bh,0c0h,3 ;clr1 reg16,imm
4
027A 0F 1B 00 03 db 0fh,1bh,000h,3 ;clr1 mem16,imm
4
027E 0F 26 db 0fh,26h ;cmp4s
0280 0F 33 C0 db 0fh,33h,0c0h ;ext bit field
0283 0F 3B C0 03 db 0fh,3bh,0c0h,3 ;ext bit field
immediate
0287 66 C0 db 66h,0c0h ;fp02
0289 66 00 db 66h,000h ;fp02
028B 0F 31 C0 db 0fh,31h,0c0h ;insert bit fie
ld
028E 0F 39 C0 03 db 0fh,39h,0c0h,3 ;insert bit fie
ld immediate
0292 0F 16 C0 db 0fh,16h,0c0h ;not1 reg8,cl
0295 0F 16 00 db 0fh,16h,000h ;not1 mem8,cl
0298 0F 17 C0 db 0fh,17h,0c0h ;not1 reg16,cl
029B 0F 17 00 db 0fh,17h,000h ;not1 mem16,cl
029E 0F 1E C0 03 db 0fh,1eh,0c0h,3 ;not1 reg8,imm3
The Microsoft MACRO Assembler , Version 1.27 Page 1-8
04-05-88
02A2 0F 1E 00 03 db 0fh,1eh,000h,3 ;not1 mem8,imm3
02A6 0F 1F C0 03 db 0fh,1fh,0c0h,3 ;not1 reg16,imm
4
02AA 0F 1F 00 03 db 0fh,1fh,000h,3 ;not1 mem16,imm
4
02AE 65 db 65h ;repc
02AF 64 db 64h ;repnc
02B0 0F 28 C0 db 0fh,28h,0c0h ;rol4
02B3 0F 28 00 db 0fh,28h,000h ;rol4
02B6 0F 2A C0 db 0fh,2ah,0c0h ;ror4
02B9 0F 2A 00 db 0fh,2ah,000h ;ror4
02BC 0F 14 C0 db 0fh,14h,0c0h ;set1 reg8,cl
02BF 0F 14 00 db 0fh,14h,000h ;set1 mem8,cl
02C2 0F 15 C0 db 0fh,15h,0c0h ;set1 reg16,cl
02C5 0F 15 00 db 0fh,15h,000h ;set1 mem16,cl
02C8 0F 1C C0 03 db 0fh,1ch,0c0h,3 ;set1 reg8,imm3
02CC 0F 1C 00 03 db 0fh,1ch,000h,3 ;set1 mem8,imm3
02D0 0F 1D C0 03 db 0fh,1dh,0c0h,3 ;set1 reg16,imm
4
02D4 0F 1D 00 03 db 0fh,1dh,000h,3 ;set1 mem16,imm
4
02D8 0F 22 db 0fh,22h ;sub4s
02DA 0F 10 C0 db 0fh,10h,0c0h ;test1 reg8,cl
02DD 0F 10 00 db 0fh,10h,000h ;test1 mem8,cl
02E0 0F 11 C0 db 0fh,11h,0c0h ;test1 reg16,cl
02E3 0F 11 00 db 0fh,11h,000h ;test1 mem16,cl
02E6 0F 18 C0 03 db 0fh,18h,0c0h,3 ;test1 reg8,imm
3
02EA 0F 18 00 03 db 0fh,18h,000h,3 ;test1 mem8,imm
3
02EE 0F 19 C0 03 db 0fh,19h,0c0h,3 ;test1 reg16,im
m4
02F2 0F 19 00 03 db 0fh,19h,000h,3 ;test1 mem16,im
m4
;
; '386 unique instructions
;
02F6 64 db 64h ;fs:
02F7 C6 07 23 mov byte ptr [bx],35
02FA 65 db 65h ;gs:
02FB C6 07 23 mov byte ptr [bx],35
02FE 66 db 66h ;32 bit operand
02FF 81 D1 0514 adc cx,1300
0303 0090 0090 dw 90h,90h
0307 66 db 66h ;32 bit operand
0308 15 0514 adc ax,1300
030B 0090 0090 dw 90h,90h
030F 67 db 67h ;32 bit address
0310 77 1F ja $+33
0312 0090 0090 dw 90h,90h
;
; s-i-b byte instructions
;
The Microsoft MACRO Assembler , Version 1.27 Page 1-9
04-05-88
0316 00 0C C0 db 0,0ch,0c0h
; add [eax+8*eax],cl
0319 00 4C C0 33 db 0,4ch,0c0h,33h
; add [eax+8*eax+33],cl
031D 00 8C C0 11 22 33 db 0,8ch,0c0h,11h,22h,33h,44h
; add [eax+8*eax+44332211],cl
44
0324 00 8C 80 11 22 33 db 0,8ch,80h,11h,22h,33h,44h
; add [eax+4*eax+44332211],cl
44
032B 00 8C 40 11 22 33 db 0,8ch,40h,11h,22h,33h,44h
; add [eax+2*eax+44332211],cl
44
0332 00 8C 44 11 22 33 db 0,8ch,44h,11h,22h,33h,44h
; add ss:[eax+2*eax+44332211],cl
44
0339 26 00 8C 44 11 22 db 26h,0,8ch,44h,11h,22h,33h,44h
; add es:[eax+2*eax+44332211],cl
33 44
;
0341 codeseg ends
;
end
The Microsoft MACRO Assembler , Version 1.27 Page Symbols
-1
04-05-88
Segments and groups:
N a m e Size align combine class
CODE2SEG . . . . . . . . . . . . 0005 PARA NONE
CODESEG. . . . . . . . . . . . . 0341 PARA NONE
DATASEG. . . . . . . . . . . . . 0008 PARA NONE
Symbols:
N a m e Type Value Attr
ALPHA. . . . . . . . . . . . . . L WORD 0000 DATASEG
BETA . . . . . . . . . . . . . . N PROC 01E6 CODESEG Length =0004
DELTA. . . . . . . . . . . . . . F PROC 01EA CODESEG Length =0004
FARINDIRECT. . . . . . . . . . . L DWORD 0004 DATASEG
FARROUTINE . . . . . . . . . . . F PROC 0000 CODE2SEG Length
=0005
NEARINDIRECT . . . . . . . . . . L WORD 0002 DATASEG
NEARROUTINE. . . . . . . . . . . N PROC 00A3 CODESEG Length =0000
Warning Severe
Errors Errors
0 0