Assembly Language

Post on 21-Jan-2016

34 views 2 download

description

Assembly Language. Introduction Installation of MASM Installation of TextPad. Install MASM6.15. INSTALLATION. 1.Click SETUP -follow the instruction 2.Click folder TextPad – click TextPad4 -follow the instruction. - PowerPoint PPT Presentation

transcript

ASSEMBLY LANGUAGE

INTRODUCTIONINSTALLATION OF MASMINSTALLATION OF TEXTPAD

INSTALL MASM6.15

INSTALLATION

1.Click SETUP

-follow the instruction

2.Click folder TextPad – click TextPad4

-follow the instruction

TASK 1 : TO CONFIGURE TEXTPAD AND TO ENABLE IT RUN A PROGRAM

- OPEN TEXTPAD- MENU CONFIGURE - PREFERENCES

STEP 1- TOOL – ADD - DOS COMMAND

1. Write - make32.bat $BaseName2. OK3. Apply4. Rename = Build32-bit MASM5. OK

STEP 2- TOOL – ADD - DOS COMMAND

1. Write - $BaseName

2. OK

3. Apply

4. Rename = Run ASM Prog

5. uncheck =Capture Output

6. OK

STEP 3- TOOL – ADD - DOS COMMAND

1. Write - C:\Masm615\runCV.bat $BaseName

2. OK

3. Apply

4. Rename = Debug 32-bit MASM

5. OK

TASK 2 : TO COPY MASM FILES INTO DESIRED PLACE/FOLDERS

Step 1

• From • F:\MASM6.15ForStudents\TextPad

• Copy MASM6.syn• Paste to

• C:\Program Files\TextPad 4\System

TASK 3 :TO COPY MAKE32 FILES INTO DESIRED PLACE/FOLDERS

Step 2

• From • C:\Masm615

• Copy Make32• Paste to folder of your source file

• Eg : F:\MASM SOURCE FILES

TASK 4 : TO MAKE TEXTPAD ENABLE TO DIFFERENTIATE THE PROGRAM CONTENTSSTEP 1

STEP 2

STEP 3

STEP 4

** if the MASM6.syn file did not yet copy to System, this function is not available.

STEP 5

TO BUILD A PROGRAM

TITLE ADD AND SUBTRACT (ADD1.ASM)

; THIS PROGRAM ADDS AND SUBTRACTS 32-BIT INTEGERS.; LAST UPDATE: 2/1/02

INCLUDE IRVINE32.INC

.CODEMAIN PROC

MOV EAX,10000H ; EAX = 10000HADD EAX,40000H ; EAX = 50000HSUB EAX,20000H ; EAX = 30000HCALL DUMPREGS

EXITMAIN ENDPEND MAIN

COMMAND RESULTS

TO RUN A PROGRAM

OUTPUT EAX = IS A REGISTER THAT CARRIES ANSWER FOR THE PROGRAM

ASSEMBLY-LINK-EXECUTE CYCLE