Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SPZ_13V_Мое.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
633.86 Кб
Скачать

Висновки

В результаті виконання даної курсової роботи було написано програму на мові С++ та з використанням ASSEMBLER. Вона містить системне меню, рядок стану, панель інструментів.

Виконується обчислення функції, що написана мовою програмування Assembler та під’єднана до основного проекту як динамічна бібліотека DLL.

Дані для обчислень в програмі вводяться в діалоговому вікні. Результат обчислень виводиться в діалоговому вікні. Програма виконує стандартні операції за файлами “Open”, “Save”.

Дана курсова робота поглибила навички з мов програмування С++ та ASSEMBLER, надала досвід з написання складних, практично доцільних програм, збільшила навички з оформлення робіт, а також вивчив структуру і принцип роботи Windows 98/XP.

Література

1.Семеренко В.П., Програмування мовами С та С++ в середовищі Windows.– Вінниця: ВДТУ, 2002 р. –128с.

2. Глушков С.В., Коваль А.В. Visual 2008. Руководство разработчика.–Харьков: Фолио, 2006. –727с.

3. Баженова І.Ю., Visual 2008 6.0 Уроки програмування.– Київ:Фоліо,1997. – 634с.

4. Джеффри Рихтер, Windows для профессионалов. Создание эффектив-ных Win32-пpилoжeний с учетом специфики 64-разрядной версии Windows.– СПб.: Питер, Русская Редакция, 2001 г. –752с.

5. Поляков А.К., Брусенцев В.С., Методы и алгоритмы компьютерной графики в примерах на Visual 2008.– СПб.: БХВ-Петербург, 2003 г. –560с.

6. Стенли Б. Язык программирования С++.–Москва: Sams, 2000 г. – 354с.

7. Герберт Шилдт. Полный справочник по С.–Київ:Вільямс, 2002г.– 365с.

  1. Бурдаев О. В., Иванов М. А., Тетерин И. И.– Ассемблер в задачах защиты информации.–Москва: КУДИЦ-Образ, 2004 г.– 320с.

  1. Крупник А. К., Изучаем Ассемблер.– СПб.: Питер, 2004 г. –256с.

  1. Секунов Н.Ю. Самоучитель Visual C++. – СПб.: БХВ-Петербург , 2002. – 736 с.

  1. Шеферд Джордж, Программирование на MicroSoft Visual C++/Пер. с англ, - М.: “Русская Редакція”, 2003.—928с.

Додатки Додаток а

// asmdll.cpp : Defines the initialization routines for the DLL.

//

#include "stdafx.h"

#include <afxdllx.h>

#ifdef _MANAGED

#error Please read instructions in asmdll.cpp to compile with /clr

// If you want to add /clr to your project you must do the following:

// 1. Remove the above include for afxdllx.h

// 2. Add a .cpp file to your project that does not have /clr thrown and has

// Precompiled headers disabled, with the following text:

// #include <afxwin.h>

// #include <afxdllx.h>

#endif

#ifdef _DEBUG

#define new DEBUG_NEW

#endif

static AFX_EXTENSION_MODULE asmdllDLL = { NULL, NULL };

#ifdef _MANAGED

#pragma managed(push, off)

#endif

extern "C" int APIENTRY

DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)

{

// Remove this if you use lpReserved

UNREFERENCED_PARAMETER(lpReserved);

if (dwReason == DLL_PROCESS_ATTACH)

{

TRACE0("asmdll.DLL Initializing!\n");

// Extension DLL one-time initialization

if (!AfxInitExtensionModule(asmdllDLL, hInstance))

return 0;

// Insert this DLL into the resource chain

// NOTE: If this Extension DLL is being implicitly linked to by

// an MFC Regular DLL (such as an ActiveX Control)

// instead of an MFC application, then you will want to

// remove this line from DllMain and put it in a separate

// function exported from this Extension DLL. The Regular DLL

// that uses this Extension DLL should then explicitly call that

// function to initialize this Extension DLL. Otherwise,

// the CDynLinkLibrary object will not be attached to the

// Regular DLL's resource chain, and serious problems will

// result.

new CDynLinkLibrary(asmdllDLL);

}

else if (dwReason == DLL_PROCESS_DETACH)

{

TRACE0("asmdll.DLL Terminating!\n");

// Terminate the library before destructors are called

AfxTermExtensionModule(asmdllDLL);

}

return 1; // ok

}

float calc (int x, int a, int b, int c)

{

float res=0;

int tmp=0;

_asm{

finit

cmp x,0

je l1

jg l2

jl l3

l1:

fild [x]

fimul x

fimul a

fiadd b

fiadd c

mov tmp,25

fidiv tmp

fst res

jmp end

l2:

fild [x]

fimul x

fimul a

fiadd b

fiadd c

mov tmp,4

fiadd tmp

fst res

jmp end

l3:

mov tmp,98

fild [tmp]

fst res

end:

}

return res;

}

#ifdef _MANAGED

#pragma managed(pop)

#endif

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]