Getting started with crazy summer vacation Study Notes (3) -- the first program
Refer to Chapter 4 of Assembly Language
1. Process of writing a source program to execution
Step 1: Compile the Assembly source program
Step 2: Compile and connect the source program
Step 3: Execute
2. source program
Code:
assume cs:firstfirst segmentstart:mov ax,2add ax,axadd ax,axmov ax,4C00Hint 21Hfirst endsend start
Code explanation:
Assume, segment, ends, and end are all pseudo commands.
End
Experiment 1: View CPU memory and program with machine instructions and assembly instructions
The debug functions used include:
R command to view and change the CPU register content
D command to view the content in the memory
E command to rewrite the content in the memory
U command to translate machine commands in memory into assembly commands
T command to execute a machine command
Command a writes a machine instruction in memory in the format of assembly instruction
1. Download dosboxand debug.
content is as follows:
C. Use the ucommand to disassemble t1.exe and observe the source code obtained from the disassembly.
D. Use the T and P commands (use the p command in case of int commands) for single-step debugging and observe the results.
----------------------------------------------
Compile and connect under dosbox
I am not familiar with this part of content. I have made several mistakes.
I forgot ";" when I lost for the first time.
This
can install them through the Ubuntu Software Center (or the software source of your Linux release. However, please do not expect to find a game that is comparable to the latest and best Windows commercial games, but there are still some outstanding open-source games worth a try. If you want to play a traditional multiplayer FPS game, try nexuiz (now known as "classic nexuiz") or nexuiz derivatives xonotic. If you want to play games that are slow and more focused on strategy, battle for wesnoth
Yesterday, I saw someone asking about the Bubble sorting, and I wanted to write one. I haven't written a compilation for a long time. Recently I want to learn it well. I also made a lot of preparations and downloaded some compilers.
But after I write it out, I don't know how to compile it, because I used to learn dos assembly, which is different from the mainstream 32-bit. Later, although masm32 (with link16) was used to compile and link successfully and run in
This article is a summary of the past.The first element is the plot.RPG games are represented by the legend of xianjian Qixia. you can also use dosbox in XP. some old games are still very interesting to play, so I personally feel that the most vital part of RPG games is actually a plot. Other pictures are not something I can care about. it may be related to the limited capacity of human thinking (when you think about how to pass customs, more clues ma
Two days ago, I suddenly remembered two games that I used to like very much: Emperor and the colonial plan. This is a game under the old dos. Although I have never done customs clearance, however, I still think it is quite missing, so I searched the internet for a long time and finally got to the game and strategy. It is easy for the emperor to run in XP, but there is always a landscape in the colonial plan, no matter how debugging is done. Finally, according to some prompts, we launched a
Experiment conclusion:
(1) run the e command to run the memory unit0021:0 ~Change 8 bytes of data30 h, 31 H, 32 h, 33 H, 34 h, 35 h, 36 h, 37 h
Input command
Run one by one:
The blank content in the book is AX = 3130
Ax = 6465
BX = 3534
BX = 6c6a
SP = 00fe; the address of the modified memory unit is 2200: The content of 00fe is 6462.
SP = 00fc; the address of the modified memory unit is 2200: The content of 00fc is 6c6a
SP = 00fc; AX = 6c6a
SP = 0100; BX = 6462
SP = 00fe;
], 0433 H line9-10 is equivalent to mov [2], 0436 H
There are two reasons for using two commands instead of simply writing them in the above format. One of them is convenient for future circulation; the other is for further explanation in Chapter 5th. For the time being, use this method first.
Step 2: compile, connect, run, and debug the source program t2.asm.
(1) Compile and connect t2.asm to obtain the executable file t2.exe. Run t2.exe, observe the program running result, and verify whether
First, the learning processDownload TC2.0 and openThis is an integrated C environment package, including TC, DOSBox, and some compilation tools, so it's clear that I can't judge the functionality of a single program, nor can I tell which programs are necessary.So in order to figure out which files are used to resolve which features, I create a new folder C:\minic to hold the files that are known to solve the problem.There are two ways to prevent progr
Perian is a software that provides full Decoding for MAC systems. It has built-in support for QuickTime, so that you can use front row to play the vast majority of videos. Below is a list of supported video/audio format frequencies:
• Libavcodec, from the FFMPEG project, along with code from the old ffusion component:• MS-MPEG4 V1 v2• DivX• 3ivx• H.264• Flash video• Flash screen video• On2 VP3, VP6, Vp8• H263i• Huffyuv and ffvhuff• Indeo 2, 3 5• MPEG-1, 2 4 video (in supported formats)• Frap
. ktorrent: The BT download tool under KDE. I personally feel very useful!Official homepage: http://ktorrent.org/
14. mldonkey: The plug-in Linux. If you use it well, you will find it pleasant to be a Linux User. Kmldonkey must be installed in KDE.Official homepage: http://mldonkey.sourceforge.net/
15. kcontact and calendar processing software under KDE. I need it.Official homepage: http://kontact.kde.org/korganizer/
16. k3b and KDE are well-known CD installation software.Official homepage
addressThe maximum length of a segment is 2 16, and the offset address is 16 bits2.9 Address RegisterThe segment address is placed in register CS and the offset address is placed in the Register IPCs+ip can point to a specific memory unit.8086CPU Work Flow1 cs:ip point to read instruction to instruction Buffer2 ip+ instruction length, skip to next instruction3 Execute buffer instruction, skip to step 1Directives and content are indistinguishable in memory, but memory units pointed to by CS:IP a
How do Ubuntu users install PlayOnLinux 4.2.4
PlayOnLinux is a front-end program of wine to run Windows applications on Linux and Mac OS X. PlayOnLinux is a graphical front-end program written in Python. In addition, this program also supports the use of Dosbox to install Dos-based programs and games.
The latest available version PlayOnLinux 4.2.4 has been released recently. With the arrival of new support and feedback systems, it is easier to use com
Today, I use the assembly language using the Debug command, open win+r cmd, found that input debug does not work, in the Internet to find no more than 20 solutions, and later the debugging, environment variables changed a lot. Eventually... Or the wood has succeeded.Later I thought about it, searched the browser on the debug assembly, read a post only to know Win7 flagship CMD does not support the debug (a MMP I want to talk to Microsoft to listen to. )Http://bbs.fishc.com/thread-58642-1-1.html"
When setting up the environment, I was the first time on the Internet to check whether there is an integrated environment, but Masm+dosbox has not been fixed, a start, thought is my build problem, later only know is no MASM problem, before, I went to find a win XP SP2 virtual machine, This process also find the wrong image file, was stupid cry, actually configure the environment as long as these two on the line link: Https://pan.baidu.com/s/1vq6MZ86_S
However, more and more people are using Windows XP, But I believe many people are still using Windows 98. Many users are using two systems. However, since Windows was born, blue screen, black screen, illegal operations and other faults are always with us, and we have tried every means to solve these faults.
It takes too long to display the blue sky and white clouds.
Fault description: when the computer is started, the blue sky and white clouds are displayed in the Windows system. The display t
is caused by the Config. sys or Autoexec. bat file. Deselect the check mark for rows that do not contain Windows icons in the Config. sys and Autoexec. bat tabs one by one, and then try to turn off the computer.
Iii. check whether it is related to "Advanced Power Management"
In the system properties box, click the Device Manager tab, double-click Advanced Power Management in the system devices list, and cl
In init and inittabLinux, why does one have init? Those who have used windows9.x should know that there is a batch processing file autoexec. bat. Those who have used windowsNT/2000 systems should have seen systemservice tools in the control panel for the same purpose. However, in windows, these features are too weak (of course, the usage is simpler ). Init is the last step for Linux to start.
Init and inittab
In Linux, why does it need an init? Window
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.