Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Лабораторная работа №2

.686

.model flat, c

optioncasemap: none

include\masm32\include\windows.inc

include\masm32\include\kernel32.inc

includelib\masm32\lib\kernel32.lib

.data

add 76

b dd-8

ddd ?

.code

program:

push b

push a

call Procedure

add esp,8

movd,eax

push 0

Procedure proc

moveax,[esp+4]

movedx,[esp+8]

subeax,edx

ret

Procedureendp

endprogram

 

 

 

 

Задание 2

.486

.model flat, stdcall

optioncasemap:none

include/masm32/include/windows.inc

include/masm32/include/kernel32.inc

includelib/masm32/lib/kernel32.lib

.data

add 76

b dd-8

ddd ?

.code

program:

push offset d

push b

push a

call Procedure

addesp, 8

movd,eax

push 0

Procedure proc

moveax,[esp+4]

movedx,[esp+8]

subeax,edx

movedx,[esp+12]

mov [edx],eax

ret

Procedure endp

endprogram

 

 

 

 

 

Лабораторная работа №3

.486

.model flat, stdcall

optioncasemap:none

include/masm32/include/windows.inc

include/masm32/include/user32.inc

include/masm32/include/kernel32.inc

includelib/masm32/lib/user32.lib

includelib/masm32/lib/kernel32.lib

include/masm32/macros/macros.asm

uselib masm32,comctl32,ws2_32

.data

.code

start:

moveax, 123

movebx, -90

addeax, ebx

testeax, eax

jz zero

invoke MessageBox,0, chr$("Вeaxне 0!"), chr$("info"), 0

jmplexit

zero:

invokeMessageBox, 0, chr$("Вeax 0!"), chr$("info"), 0

lexit:

invokeExitProcess, 0

endstart

 

 

Лабораторная работа №4

.486

.model flat, stdcall

optioncasemap:none

include/masm32/include/windows.inc

include/masm32/include/user32.inc

include/masm32/include/kernel32.inc

includelib/masm32/lib/user32.lib

includelib/masm32/lib/kernel32.lib

include/masm32/macros/macros.asm

uselib masm32,comctl32,ws2_32

.data

msg_titledb "Title",0

A DB 1h

bufferdb 128 dup(?)

formatdb "%d",0

.code

start:

mov AL, A

.REPEAT

inc AL

.UNTIL AL==7

invokewsprintf, addr buffer, addr format, AL

invokeMessageBox, 0, addr buffer, addrmsg_title, MB_OK

invokeExitProcess, 0

endstart

 

 

Задание 2

.486

.model flat, stdcall

optioncasemap:none

include/masm32/include/windows.inc

include/masm32/include/user32.inc

include/masm32/include/kernel32.inc

includelib/masm32/lib/user32.lib

includelib/masm32/lib/kernel32.lib

include/masm32/macros/macros.asm

uselib masm32,comctl32,ws2_32

.data

msg_titledb "Title",0

A DB 1h

bufferdb 128 dup(?)

formatdb "%d",0

.code

start:

moveax, 1

movedx, 1

.WHILE edx==1

inceax

.IF eax==7

.BREAK

.ENDIF

.ENDW

invokewsprintf, addr buffer, addr format, AL

invokeMessageBox, 0, addr buffer, addrmsg_title, MB_OK

invokeExitProcess, 0

endstart

 

 

 


Date: 2015-12-11; view: 406


<== previous page | next page ==>
Reducing the environmental footprint | Лабораторная работа 5
doclecture.net - lectures - 2014-2017 year. Copyright infringement or personal data (0.006 sec.)