Міністерство освіти і науки України
Національний університет "Львівська політехніка"
Кафедра "Інформаційні системи та мережі"
Звіт до лабораторної роботи № 4
з предмету:
Сиcтемне програмування та операційні системи
на тему №7:
Команди циклів та програмування ітераційних процесів
ЛЬВІВ-2008
Текст програми:
.8086
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup
.model small
.stack 100h
.data
.code
.startup
mov ax, 22d ; Sum accumulation
mov bx, 22d ; Curent val
mov cx, 98d ; Control val
loopstart:
add bx, 2d ; Increment curent val on 2
add ax, bx ; Add Curent val to Sum
cmp bx, cx ; while Curent val != Control val
jne loopstart ; repeate loop
.exit 0 ; ax containes the result
end @startup