X01.wos. 5: Add function, x01.wos. 5 add function

Source: Internet
Author: User

X01.wos. 5: Add function, x01.wos. 5 add function

Preparations
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.
Usage
1. Enter the src folder, double-click cmd. bat, and enter the following commands in the command line window:
Cd apilib
Make
Cd ../app
Make
Cd ../

Make

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:

Some improvements

1. Add the api028.s file with the following content:

[Format "WCOFF"]
[Sorted set "i486p"]
[Bits 32]
[File "api028.nas"]


Global _ api_setlang


[Section. text]
_ Api_setlang:; void api_setlang (int mode );
Mov edx, 28
Mov eax, [esp + 4]
Int 0x40
Ret

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.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.