NOTICE: My xv6 runs in QEMU simulator.
The folder xv6_all_files contains all the original code and all the executable file of xv6-rev7(release version 7) system.
editor.c file contains the main code of my simple editor.
The simple editor can simply highlight the C language. Its effect is demostrated below.
This editor can mostly undo 20 steps sequently. It depends on the variable MAX_ROLLBACK_STEP. If you want more undo step, just extend this variable. There is a small bug with undo delete command. Unfortunately, it still has not been resolved though I have paid a lot of time on it. I suspect that I triggered a unfound system bug. Who knows? But don't worry about that. This small bug just limit our ability to undo the delete operation and I have forbidden this function. The other function wouldn't be affected. So you can use this editor safely. I have mark the code which with bug in the editor.c.
Furthermore, press help instruction for more operating detail. All the operations are here.
sudo apt-get install -y build-essential gdb
sudo apt-get install gcc-multilib
sudo apt-get install qemu
git clone git://github.com/mit-pdos/xv6-public.git
tips: rev7 version is more stable and reliable.
cd xv6-public-master
git checkout -b xv6-rev7 xv6-rev7
QEMU = qemu-system-x86_64
make
make qemu-nox
We should know the fact that how make instruction compiles xv6 system is depending on Makefile. So we should add something properly to Makefile file.