初學者的彙編器IDE /模擬器 (Assembler IDE/Simulator for beginner)


問題描述

適合初學者的彙編 IDE/模擬器 (Assembler IDE/Simulator for beginner)

我想學習如何在 Assembler 中編程。我之前做過一些組裝(在我的 A‑Level 計算課程期間),但這絕對是一個簡化的“偽組裝器”。我借了我爸爸的舊 Z80 彙編器參考手冊,這似乎很有趣,所以如果可能的話,我想嘗試一下 Z80 彙編器。

但是,我沒有 Z80 處理器手,想在我的電腦上做(我有windows或linux,所以都很好)。我在互聯網上找到了各種彙編程序,但我對彙編成 hex 文件並不是特別感興趣,我只想能夠將它組裝成 PC 上某種模擬器可以運行的東西。最好這個模擬器會告訴我所有寄存器的內容,內存位置等,讓我逐步完成說明。我發現一些軟件暗示他們可能會這樣做——但他們要么拒絕編譯,要么似乎不能正常工作。有沒有人有任何建議?如果有很好的模擬器/IDE 可用於另一種類型的彙編器,那麼我可以嘗試使用它(假設有很好的在線參考手冊可用)。


參考解法

方法 1:

I've found a few bits of software that suggest they might do this ‑ but they either refuse to compile, or don't seem to work properly. Has anyone got any suggestions?

Write one. You're best off picking a nice, simple instruction set (Z80 should be perfect). I remember doing this as a first‑year undergraduate exercise ‑ I think we wrote the simulator in C++ and simulated 6800 assembly, but really any language/instruction set will do.

The idea of "learning assembly language" these days is to get the idea of how computers work at the lowest level, only a select few (compiler writers, etc.) have any real reason to actually be writing assembly code these days. Modern processors are stuffed full of features designed to be used by compilers to help optimise code for speed/concurrent execution/power consumption/etc., and trying to write assembly by hand for a modern processor would be a nightmare.

Don't fret about getting your application production‑ready unless you want to ‑ in all likelihood the bits of software you've found so far were written by people exactly like you who wanted to figure out how assembly works and wrote their own simulator, then realised how much work would be involved in getting it "production ready" so the general public could use it.

方法 2:

You might want to check out the open source 8085 simulator "GnuSim8085", it's specifically meant to be used for educational purposes, and it was in fact written by student while preparing for his exams. It runs on both, Linux and Windows.

方法 3:

MipSim is FREE

Main Features of MIPSim 2

  • Built‑in code editor with features like syntax highlighting and folding
  • Display register and memory values in different representations (signed integer, unsigned integer, hexadecimal and ASCII)
  • Set the block size (full‑word, half‑word, byte) of the memory cells for easier examination of the memory values
  • Change values of registers and memory cells with a single click even during simulation and debugging
  • Realtime user‑interface updating allows you to see how values of registers and memory cells change during execution
  • Built‑in debugger with step‑by‑step instruction execution, instruction skipping and breakpoint features
  • Tools for inserting ASCII, UNICODE strings and integer values to memory for testing of your code
  • Tools for checking duplicate or missing labels and instruction parameters
  • Save computer state (values of all registers and memory cells) so that next time you run the simulator you can continue from where you left!
  • Set the simulation speed ‑ low speeds are great to trace your code and to see how it behaves
  • Encode instructions ‑ produce machine code in either binary or hexadecimal representation
  • Catch assembly time and runtime errors
  • Easier debugging with descriptive error messages
  • Multi‑threaded design ‑ MIPSim doesn't get stuck (hopefully ;) even if the assembly code executed is erroneous or contains infinite loops
  • MIPSim API ‑ make your own programs that can read from and write to the registers and memory of MIPSim, great flexibility for powerful testing!

方法 4:

If Your are on windows 8085 Simulator is the best choice. 8085 Simulator by J‑tech Softwares

It user interface is excellent than any other simulator. Also this simulator provide live view of memory map very time(also while in the execution).

But this one does not support Windows 98 or lower for that you need to check other simulators like GNUSim8085.

方法 5:

WinApe is a good emulator of an Amstrad CPC. The Amstrad CPC was a Home Computer produced in the 80's. It used a Z80 as its CPU. Using the emulator you can display a lot of the internals while programming. It includes a debugger and a disassembler for Z80 code.

(by robintwDavid HicksnoneCarlo V. DangoJithin Josemdm)

參考文件

  1. Assembler IDE/Simulator for beginner (CC BY‑SA 2.5/3.0/4.0)

#assembly #simulator






相關問題

內聯彙編 - cdecl 和準備堆棧 (Inline assembly - cdecl and preparing the stack)

ASM 使用代碼查找偏移量 (ASM find offset with code)

顯示字符的 Ascii 值 (Displaying Ascii values of characters)

x86 彙編程序崩潰,可能忽略了簡單的錯誤 (x86 assembly procedure crashes, possibly overlooking simple error)

是否可以在 C++ 結構中編寫靜態程序集數據? (Is it possible to write static assembly data in C++ struct?)

將小於 %ecx 的 1 推入堆棧 (push 1 less than %ecx to stack)

emu8086 : ARR 不包含任何值 (emu8086 : ARR do not contain any value)

劊子手游戲,語法修復 x86 gcc 程序集和 C (hangman game, syntax fix x86 gcc assembly & C)

如何將內存中的 96 位加載到 XMM 寄存器中? (How to load 96 bits from memory into an XMM register?)

如何使用 Assembly 中的 printf? (How do you use printf from Assembly?)

摩托羅拉 68HC12 實時中斷寄存器 (Motorola 68HC12 Real Time Interrupt Registers)

我可以用 OR 操作代替 MOV 操作嗎? (Can I substitute a MOV operation with an OR operation?)







留言討論