I am trying to teach myself assembly programming with NASM. However I only have a Chromebook with ARM processor. I have xubuntu running on it with crunton. However how can I setup a x86 emulation environment to get myself started? I also want to be able to use insight debugger.
-
3You could also consider learning ARM assembler first. The ARM architecture is much more straightforward than the byzantine x86. – fuz Nov 05 '15 at 19:08
-
I strongly recommend arm first then x86 at some future date (if ever), you can emulate either on either, so that is not a barrier to entry. – old_timer Nov 05 '15 at 21:23
-
Hmm.. I am learning x86 because I am learning with the book "Assembly Language Step by Step". Don't know ARM is much simpler. – darklord Nov 05 '15 at 23:28
2 Answers
Try bochs or qemu.
If you're only on a chromebook probably without a lot of RAM, you probably just want to run a very minimal Linux system inside your emulated x86 environment. Not a full xubuntu GUI install inside the emulated x86 environment.
For learning x86, you should start with 32 or 64bit ASM, either for functions you call from C, or as a standalone program. (Either really standalone, where you don't link with the C standard runtime or library, and write your own _start
in asm, and make your own system calls, or just write main
in asm and end your program with a ret
from main
.)
bochs has a built-in debugger, but using it would be more appropriate for debugging the kernel, or boot-loader. IDK anything about the Insight debugger, but if it can remote-debug, running an ARM binary of it natively, connected to the target you want to debug, might make sense.
You could write x86 asm that you boot directly (instead of a Linux image), but then you'd only have BIOS calls available, and the CPU would start in 16bit real mode with segmented memory and all that crap that's basically useless to learn except for writing bootloaders.

- 328,167
- 45
- 605
- 847
-
Bochs sound a good choice. Hope I can use insight debugger with bochs remote debugging. – darklord Nov 05 '15 at 19:06
-
@darklord: I was thinking you'd have Insight connect to a user-space program inside bochs, over TCP or something. Like gdb or something. If you connect to bochs, you'd be debugging the whole system, including interrupts and kernel threads, not just the program you wrote. – Peter Cordes Nov 05 '15 at 19:10
QEMU has a user mode emulation feature which can be used to run x86 Linux programs on ARM Linux, or any other combination of supported architectures.

- 3,551
- 1
- 14
- 23