X01.wos. 5: Add function, x01.wos. 5 add function
1. Ensure that it is win xp. If it is win 8, to run nasm, follow the prompts to agree to install the component.
2. Make sure that src and z_tools are in the same directory, and nasm is included in the z_tools folder.
3.bmp. nasm must be compiled by nasm.exe in the format of-f win32. For more information, see app/makefile.
4. The app/haribote. rule file has been slightly modified.
1. Enter the src folder, double-click cmd. bat, and enter the following commands in the command line window:
2. After the operating system is started, shift + F2 can open a new terminal and enter exit to close the terminal.
3. Enter winhi and type boot. s respectively in the terminal to get the initial experience. As follows:
4. Enter tview boot. s in the terminal to browse the file, gview 1.bmp to view the image, and press q or Q to close it. As follows:
5. The ball entered in the terminal is a small game. The space key emits a bullet. The 4 and 6 numeric keys move around and Press X to close the game. As follows:
1. Add the api028.s file with the following content:
[Sorted set "i486p"]
Global _ api_setlang
_ Api_setlang:; void api_setlang (int mode );
Mov edx, 28
Mov eax, [esp + 4]
2. Of course, apilib/makefile must be modified accordingly. There is only one change, that is, add api028.obj to ApiObjs.
3. Modify app/api. h and add only one place, that is, the declaration of api_setlang: void api_setlang (int mode );
4. Modify app/calc. c and add the following code at the beginning of HariMain:
Int oldmode = api_getlang ();
Api_setlang (0 );
Add the following code in the penultimate line:
Api_setlang (oldmode );
5. Re-compile, OK! Calc can now be free from Japanese characters.
The above is also a general step to add your own features.
Download link: OS source code
Also: the code can be obtained from x01.Lab. Download. The above is the link in CSDN. Because the blog garden sometimes cannot display images, I also made a copy in CSDN.