Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ifndef ??version
- ?debug macro
- endm
- endif
- ?debug S "test.c"
- _TEXT segment byte public 'CODE'
- DGROUP group _DATA,_BSS
- assume cs:_TEXT,ds:DGROUP,ss:DGROUP
- _TEXT ends
- _DATA segment word public 'DATA'
- d@ label byte
- d@w label word
- _DATA ends
- _BSS segment word public 'BSS'
- b@ label byte
- b@w label word
- ?debug C E903A3684B06746573742E63
- _BSS ends
- _DATA segment word public 'DATA'
- dw 0
- dw 1
- dw 2
- dw 3
- dw 4
- dw 5
- dw 6
- dw 7
- dw 8
- dw 9
- dw 0
- db 18 dup (0)
- _DATA ends
- _TEXT segment byte public 'CODE'
- ; ?debug L 1
- _main proc near
- push bp
- mov bp,sp
- sub sp,46
- push si
- push di
- push ss
- lea ax,word ptr [bp-42]
- push ax
- push ds
- mov ax,offset DGROUP:d@
- push ax
- mov cx,20
- call far ptr SCOPY@
- ; ?debug L 3
- mov word ptr [bp-22],10
- push ss
- lea ax,word ptr [bp-20]
- push ax
- push ds
- mov ax,offset DGROUP:d@+20
- push ax
- mov cx,20
- call far ptr SCOPY@
- ; ?debug L 5
- xor si,si
- jmp @5
- @4:
- ; ?debug L 7
- mov di,si
- add di,-4
- ; ?debug L 8
- mov ax,si
- add ax,5
- mov word ptr [bp-46],ax
- ; ?debug L 9
- mov word ptr [bp-44],di
- ; ?debug L 10
- or di,di
- jge @6
- xor di,di
- jmp short @7
- @6:
- ; ?debug L 11
- mov ax,word ptr [bp-22]
- dec ax
- cmp ax,di
- jge @8
- mov di,word ptr [bp-22]
- add di,-2
- @8:
- @7:
- ; ?debug L 12
- mov ax,word ptr [bp-22]
- dec ax
- cmp ax,word ptr [bp-46]
- jge @9
- mov ax,word ptr [bp-22]
- dec ax
- mov word ptr [bp-46],ax
- @9:
- jmp short @13
- @12:
- ; ?debug L 14
- mov bx,word ptr [bp-44]
- shl bx,1
- lea ax,word ptr [bp-42]
- add bx,ax
- mov ax,word ptr [bx]
- mov bx,si
- shl bx,1
- lea dx,word ptr [bp-20]
- add bx,dx
- add word ptr [bx],ax
- @11:
- ; ?debug L 13
- inc word ptr [bp-44]
- @13:
- mov ax,word ptr [bp-44]
- cmp ax,word ptr [bp-46]
- jle @12
- @10:
- ; ?debug L 16
- mov bx,si
- shl bx,1
- lea ax,word ptr [bp-20]
- add bx,ax
- mov ax,word ptr [bx]
- mov bx,word ptr [bp-46]
- sub bx,di
- inc bx
- cwd
- idiv bx
- mov bx,si
- shl bx,1
- lea dx,word ptr [bp-20]
- add bx,dx
- mov word ptr [bx],ax
- @3:
- ; ?debug L 6
- inc si
- @5:
- cmp si,word ptr [bp-22]
- jge @14
- jmp @4
- @14:
- @2:
- ; ?debug L 18
- xor ax,ax
- jmp short @1
- @1:
- ; ?debug L 19
- pop di
- pop si
- mov sp,bp
- pop bp
- ret
- _main endp
- _TEXT ends
- ?debug C E9
- _DATA segment word public 'DATA'
- s@ label byte
- _DATA ends
- extrn SCOPY@:far
- _TEXT segment byte public 'CODE'
- _TEXT ends
- public _main
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement