当前位置:网站首页>Qtspim manual - Chinese Translation
Qtspim manual - Chinese Translation
2022-04-23 03:54:00 【Douglas van punk】
QtSpim manual
QtSpim Is a self-contained Simulator , It will run MIPS32 Assembler and display processor registers and memory . QtSpim The assembly language used for reading and execution is MIPS A program written by a computer .QtSpim Do not execute binary ( The compiled ) Program . To simplify programming ,QtSpim Provides a simple debugger and a small group of operating system services . QtSpim Achieved most of MIPS32 Assembler extension instruction set .( It omits floating-point comparison and rounding modes and memory system page tables .MIPS There are several variants of the architecture , These variants are different in every way ( for example ,MIPS64 Architecture support 64 Bit integer and address ), It means QtSpim Not for all MIPS The processor runs the program .
QtSpim introduction
When QtSpim Startup time , It opens a window , It contains the following windows .( The functions in the window are Microsoft Windows It looks like in Linux or Mac OSX It's a little different in the world , But all menus and buttons are in the same place , And work the same way ).
QtSpim The main window of has three parts :
-
The narrow pane on the left can display integer or floating-point registers . Select the register set by clicking the tab at the top of the pane .
-
The wide pane on the right can display text segments ( Contains instructions ) And data segment . Select between text and data by clicking the tab at the top of the pane .
-
The small pane at the bottom is QtSpim Where to write its message .
All panes are dockable , This means that you can grab the pane through the top bar of the pane and drag it out QtSpim Main window , To be placed in other parts of the screen . QtSpim Another file named “ Console ” The window of , This window displays the output of the program .
Loader
Your program should be stored in a file . Assembly code files usually have extensions “.s”, Such as file1.s As shown in . To load a file , Please go to 【 file 】 menu , And then choose 【Load File Load the file 】. The screen will change as the file is loaded , To display the instructions and data in the program . Another very useful command on the filer is 【Reinitialize and Load File Reinitialize and load files 】. It first clears all changes made by the program , Including all instructions to delete it , Then reload the latest file . This command works well when debugging the program , Because you can change the program and quickly test it on your new computer , Without shutting down and restarting QtSpim.
Run the program
To start the running program after loading the program , Please go to 【Simulator Simulator 】 menu , And then click 【Run/Continue function / continue 】. The program will run until it is completed or an error occurs . Either way , You will see the program on MIPS Changes made to registers and memory , And the output written by the program will be displayed in “ Console ” Window . If your program doesn't work properly , You can do the following . The simplest way is to step between instructions , This allows you to view the changes made by each instruction one at a time . This command is also located in 【Simulator Simulator 】 Menu , be known as 【Single Step Step by step 】.
however , Sometimes you need to run the program for a while to make an error , And the single step execution speed is too slow .QtSpim Allows you to set breakpoints at specific instructions , This stops... Before the instruction is executed QtSpim. therefore , If you think the problem is in a specific function in the program , Please set a breakpoint at the first instruction in the function , Every time the function is called QtSpim Will stop . Right click the command you want to stop , And then choose 【Set Breakpoint To set breakpoints 】 To set breakpoints , You can set breakpoints . After the breakpoint operation is completed , You can select 【Clear Breakpoint clear breakpoints 】 To delete it .
If you want to stop the program while it is running , Please go to 【Simulator Simulator 】 menu , And then click 【Pause Pause 】. This command will stop the program , Let you look around , And continue as needed . If you don't want to continue running , Please click on the 【Stop stop it 】. When QtSpim When it stops , Whether it's due to an error in the program 、 The breakpoint 、 single click “ Pause ” Or after a single step , You can click 【Run/Continue function / continue 】 To continue running the program ( You can also click 【Single Step Step by step 】 Continue to step into ). If you click 【Stop stop it 】 instead of 【Pause Pause 】, Then click 【Run/Continue function / continue 】 The program will be restarted from the beginning , Instead of continuing from where it stopped .( This is roughly the same as the operation of the music player ; You can pause and restart songs , But if you stop the music , You need to play from the beginning .
Display options
The other three menus - 【Registers, Text Segment, and Data Segment register , Text and data segments 】 - control QtSpim Display of . for example ,【Registers register 】 Menu control QtSpim How to display the contents of the register , In binary 、 With 8 Cardinal number ( octal )、 With 10 Cardinal number ( Decimal system ) Or to 16 Cardinal number ( Hexadecimal ). It is often convenient to switch between these representations to understand the data . These menus also allow you to turn off the display of various parts of the machine , This helps reduce clutter on the screen , And let you focus on the really important part of the program or data .
Change registers and memory
You can right-click a register or memory location and select 【Change Register Contents or Change Memory Contents “ Change register contents ” or “ Change memory contents ”】 To change the contents of a register or memory location .
Set up
【Simulator Simulator 】 The menu contains “ Set up ” command , This command will open a dialog , As shown below :
The dialog box has two tabs . first , As shown above , Changed the QtSpim The visual aspect of , For example, font . The second one looks like this :
It changed QtSpim How it works :
-
【Bare machine Bare pager 】 send QtSpim Simulated bare MIPS processor .
-
【Accept pseudo instructions Accept pseudo instructions 】 send QtSpim Can accept MIPS Assembly instructions that are not actually executed , This makes programming easier .
-
【Enable delayed branches Enable deferred branching 】 It can lead to QtSpim Execute the instruction immediately after the branch instruction before transmitting control , And calculate the new address according to the address of the next instruction PC.
-
【Enable delayed loads Enable lazy loading 】 It can lead to QtSpim Delay the value of an instruction loaded from memory after loading the instruction .
-
【Enable mapped IO Enable mapping IO】 The memory map... Will be opened IO.
Marked as 【Simple Machine“ Simple machines ”】 The button enables the most commonly used options for most people (【Accept pseudo instructions Accept pseudo instructions 】). Marked as 【Bare machine Bare pager 】 The button opens with the actual MIPS processor ( Bare pager 、 Delay branch 、 Delay loading ) Corresponding instructions .
版权声明
本文为[Douglas van punk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230353210867.html
边栏推荐
- Design and implementation of redis (5): master-slave replication strategy and optimization
- Leetcode punch in diary day 01
- Basic introduction to spot gold
- Zotero6. Version 0 quicklook cannot be used / Chinese garbled code will not be displayed
- Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
- mui. Plusready does not take effect
- RuntimeError: output with shape [4, 1, 512, 512] doesn‘t match the broadcast shape[4, 4, 512, 512]
- [AI vision · quick review of NLP natural language processing papers today, issue 30] Thu, 14 APR 2022
- Who will answer the question?
- Websites frequented by old programmers (continuously updated)
猜你喜欢
Cuda11 is installed perfectly in win10 X + pytorch 1.9 (blood flowing into the river) cuda. is_ Available() becomes true!
Paddlepaddle model to onnx
Paddlepaddle does not support arm64 architecture.
MySQL zip installation tutorial
Installation and configuration of clion under win10
【测绘程序设计】坐标方位角推算神器(C#版)
Wechat applet cloud database value assignment to array error
Common net HP UNIX system FTP server listfiles returns null solution.
[AI vision · quick review of robot papers today, issue 29] Mon, 14 Feb 2022
Hard core chip removal
随机推荐
列表、元组、字典和集合的区别
Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
Wechat payment iframe sub page has no response
Laboratory safety examination
Install PaddlePaddle on ARM
ROS series (IV): ROS communication mechanism series (6): parameter server operation
Abstract classes, interfaces and common keywords
【BIM入门实战】Revit建筑墙体:构造、包络、叠层图文详解
Vs Studio modifie le langage C scanf et d'autres erreurs
What is software acceptance testing? What are the benefits of acceptance testing conducted by third-party software testing institutions?
The art of concurrent programming (6): explain the principle of reentrantlock in detail
现货黄金基本介绍
Leetcode punch in diary day 01
Design and implementation of redis (6): how redis achieves high availability
How Zotero quotes in word jump to references / hyperlink
MySQL is completely uninstalled and MySQL service is cleaned up
Overview of knowledge map (II)
Notes sur l'apprentissage profond (Ⅱ) - - Principe et mise en oeuvre de la fonction d'activation
Definition, understanding and calculation of significant figures in numerical analysis
標識符、關鍵字、數據類型