当前位置:网站首页>Assembly language integrated development environment learning notes

Assembly language integrated development environment learning notes

2022-06-09 01:10:00 irrationality

0 Preface

Be careful : The file name cannot have spaces , After modification, you need to re create dos app The project can only run

This paper is suitable for 8086CPU Set of instructions .

For important professional basic courses , assembly language , It is necessary to do experiments , However, due to the defects of assembly language itself , Modern computers cannot run assembly language programs directly , therefore , Most teachers ask us

  • Using virtual machines :VMware/VirtualBox–> install XP System
  • Or install DOSBox

Preparation for these tasks , It is necessary for beginners , Can help you further understand edit --> compile --> link --> perform The process of , Here I give you DOSBox How to use : Use DOSBox Experiment with assembly language

however , If you keep editing assembly language this way , It is undoubtedly inefficient , therefore , We need to be like high-level languages , Use assembly language IDE To conduct assembly language experiments .

1 Software installation and configuration

1.1 Software download

We need two software :

  • DOSBox
    This software , I have already given it in the previous link , But how to use it , Will change , You just need to install this software , The installation path should not be in Chinese .
  • RadASM
    Baidu search RadASM Chinese version , Download and install a software , Be careful : The installation path should not be in Chinese , Otherwise there may be problems

During installation , There may be this , Suggest Check all , There is nothing else to note .
 Insert picture description here

1.2 software configuration

1.2.1 To configure RadASM

  1. Open the installation directory of the software , Open the following file in Notepad
     Insert picture description here
  2. Then we find [DOS APP]
     Insert picture description here
  3. Be careful 4, Here I have modified it , What you need to change is 0,0, and ,5 Middle part , Set it to DOSBox.exe The absolute path of
     Insert picture description here
    open DOSBox Installation position of , Paste it , Be careful to add \DOSBox.exe
  4. Then save , close
  5. Baidu downloads one dubug.exe, Put it in the following directory , Be careful , The directory shown here is the installation location of the software
     Insert picture description here
    find masm32, open
     Insert picture description here
    find bin Catalog , open
    And then debug.exe Copy the past
     Insert picture description here

1.2.2 To configure DOSBox

  1.  open DOSBox Installation position , Open the following file , Open in Notepad   
    
     Insert picture description here
  2.  Drag to the bottom , find  **\[autoexec\]**  
    
     Insert picture description here
  3.  Write two lines below , I've written it here 
    
mount x [ As we just mentioned bin The absolute path to the directory ]
set PATH = %PATH%;x:\;

bin The absolute path of the directory is as follows :
 Insert picture description here
Just now we entered bin Catalogue , Just copy it .
4. preservation , sign out

2 Write an assembly language experiment

2.1 Use a comfortable environment

  1. open RadASM Software
     Insert picture description here
  2. Set font size
     Insert picture description here
     Insert picture description here
    arrow 1, refer to Edit the size of the code , This is the most recommended modification , Modify it to the appropriate size , Like the arrow 2 Shown

arrow 3 If it is different from mine , Change it to mine , Otherwise, Chinese garbled code may appear .

2.2 Build an assembly project

  1.  file –> New project   
    
     Insert picture description here
  2.  The first step is to set up   
    
     Insert picture description here
    choice Dos APP, Set the project name and location
  3.  Keep clicking next , Until you click finish , There is no need to modify   
    
     Insert picture description here
  4.  Open the assembly language source program , On the far right   
    
     Insert picture description here
  5.  Enter sample code , I found this code directly on the Internet , This is just for testing   
    
     Insert picture description here
    What's shown here , That is, we just Change the font size , The default may be small , Need to change .
;Hello World
.MODEL SMALL
.DATA
     STRING  DB  'Hello World!',13,10,'$'
.STACK
.CODE
.STARTUP
     LEA  DX,STRING
     MOV  AH,9
     INT  21H
.EXIT
     END

again Hello World ha-ha

  1. function
    Here I'll take you through the original process

We have finished the process The build process , obtain .asm file , Next is compile , obtain .obj file
 Insert picture description here
And then there was link , obtain .exe file , And then there was perform , It doesn't matter what the build is for , This is the function given by the software , It is roughly regarded as execution .exe File can .

in fact , We just need Ctrl+F5 Or click Build and execute You can run the edited program , Other steps can be done with one click ( As you know VS Compilers are like that )

Then you will get the following
 Insert picture description here

  1. Next is debugging
    Here are two recommended methods

3 resources

Enclosed RadASM and debug.exe file

link :https://pan.baidu.com/s/1BsGo3eaUjVFSVw1OQ04X0A
Extraction code :hr2h
Copy this content after opening baidu network disk mobile phone App, It is more convenient to operate

4.1 8086CPU Simulator

Please search Baidu directly 【8086CPU Simulator 】, This software can be called 8086 Assembly language learning tool , It is much easier to use than other tools .

Be sure to pay attention to , It has been verified by my use ,8086 Simulator syntax detection is very loose , It is very different from the real machine , therefore , Writing this software is not recommended , You made a mistake. Maybe you don't know ! The program will correctly guess your intentions ……

4.2 32 position x86 Assembly language learning tools

There are more popular now 32 position x86 assembly language , Software is commonly used VS, I'll give you how to use it : Use VS 2017 Study 32 position x86 The method of assembly language .
【 Some of the pictures are from baidu】

原网站

版权声明
本文为[irrationality]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090109227564.html