Описание программы.
1.
stacksg segment para stack 'stack'
dw 32 dup(?)
stacksg ends
datasg segment para
mess_z db 10,13,"zero = ",'$'
mess_p db 10,13,"plus = ",'$'
mess_m db 10,13,"minus = ",'$'
dim db 0,2,0fh,0f0h,0e0h,2,1,0
num_z db 1 dup(?)
num_p db 1 dup(?)
num_m db 1 dup(?)
datasg ends
codesg segment para
assume ss: stacksg,ds: datasg,cs: codesg
main proc far
push ds
sub ax,ax
push ax
mov ax,datasg
mov ds,ax
mov ax,0600h
mov bh,07
mov cx,0
mov dx,184fh
int 10h
mov ax,0200h
mov dx,0000h
mov bh,0
int 10h
;--------------------------------
mov cx,8
mov si,0
l1: mov ah,dim[si]
cmp ah,0
je lp_z
jg lp_p
jl lp_m
lp_z: inc num_z
jmp again
lp_p: inc num_p
jmp again
lp_m: inc num_m
jmp again
again: inc si
loop l1
;--------------------------------
lea dx,mess_z
mov ah,09
int 21h
mov ah,2
mov dl,num_z
add dl,30h
int 21h
;--------------------------------
lea dx,mess_p
mov ah,09
int 21h
mov ah,2
mov dl,num_p
add dl,30h
int 21h
;--------------------------------
lea dx,mess_m
mov ah,09
int 21h
mov ah,2
mov dl,num_m
add dl,30h
int 21h
ret
main endp
codesg ends
end main
2.
title LaborRabota1
sts SEGMENT PARA STACK 'Stack'
DW 32 DUP (?)
sts ENDS
data SEGMENT
mes1 db 'Enter',0Ah,0Dh,'$'
mes2 db '1st',0Ah,0Dh,'$'
mes3 db 10,13,'2nd',0Ah,0Dh,'$'
mes4 db 10,13,'Rezult ',0Ah,0Dh,'$'
famm db 21,?
fam dw 10 dup (?)
tabss db 21,?
tabs dw 10 dup (?)
dim dw 10 dup (?)
data ends
text SEGMENT
assume CS:text, DS:data, SS:sts
main proc far
;-----Block 1-----------
push DS
xor AX,AX
push ax
;-----Block 2-----------
mov ax,data
mov DS,AX
;-----Block 3-----------
lea DX,mes1
mov AH,09h
int 21h
;-----Block 4-----------
lea DX,mes2
mov AH,09h
int 21h
;-----Block 5-----------
lea DX,tabss
mov AH,0Ah
int 21h
;-----Block 6-----------
lea DX,mes3
mov AH,09h
int 21h
;-----Block 7-----------
lea DX,famm
mov AH,0Ah
int 21h
;-----Block 8-----------
mov SI,0
lea DI,dim
mov CX,10
;-----Block 9-----------
M1:
mov AX,tabs[SI]
mov bx,fam[SI]
cmp AX,BX
je Equal
mov AX,3030h
Equal:
mov [DI],AX
add SI,2
add DI,2
loop M1
;-----Block 10----------
mov CH,0
mov CL,0
mov DH,25
mov DL,80
mov BH,07
mov AH,06
mov AL,0
int 10h
;-----Block 11----------
mov AH,02
mov BH,0
mov DX,0
int 10h
;-----Block 12----------
lea DX,mes4
mov AH,09
int 21h
;-----Block 13----------
mov CX,5
mov SI,0
M2:
push CX
mov AX,dim[SI]
mov BL,04h
call print
mov AX,dim[SI+2]
mov BL,10h
call print
pop CX
add SI,4
loop M2
;-----------------------
ret
main endp
;=======================
print proc
;-----Block 14----------
push AX
;-----Block 15----------
mov AH,09
mov BH,0
mov CX,1
int 10h
;-----Block 16----------
mov AH,03
mov BH,0
int 10h
;-----Block 17----------
add DL,2 ;Было 1
mov AH,02
mov BH,0
int 10h
;-----Block 18----------
pop AX
xchg AH,AL
;-----Block 19----------
mov AH,09
mov CX,1
int 10h
;-----Block 20----------
mov AH,03
mov BH,0
int 10h
;-----Block 21----------
add DL,2
mov AH,02
mov BH,0
int 10h
;-----------------------
ret
print endp
text ends
end main
3.
title LaborRabota4
sts SEGMENT PARA STACK 'Stack'
dw 32 dup (?)
sts ENDS
data SEGMENT
mes db 'The Colors of Russia','$'
data ENDS
text SEGMENT
assume CS:text,DS:data,SS:sts
main:
push DS
xor AX,AX
push AX
mov AX,data
mov DS,AX
mov AH,06h
mov CX,0
mov DH,25
mov DL,80
mov BH,07
mov AL,0
int 10h
mov AH,02h
mov BH,0
mov DH,0
mov DL,30
int 10h
mov AH,09h
lea DX,mes
int 21h
mov AH,02h
mov BH,0
mov DH,1
mov DL,0
int 10h
mov AH,09h
mov AL,020h
mov BL,01110000b
mov BH,0
mov CX,640
int 10h
mov AH,02h
mov BH,0
mov DH,9
mov DL,0
int 10h
mov AH,09h
mov AL,020h
mov BL,00010000b
mov BH,0
mov CX,640
int 10h
mov AH,02h
mov BH,0
mov DH,17
mov DL,0
int 10h
mov AH,09h
mov AL,020h
mov BL,01000000b
mov BH,0
mov CX,640
int 10h
mov AH,02h
mov BH,0
mov DX,0
int 10h
mov AH,4ch
int 21h
text ends
end main
Заранее благодарен))
привет