Chapter 4 pmtest3 implementation of an operating system

Source: Internet
Author: User

1. First, use Vim in Ubuntu to write the file pmtest3.asm as described in the book, and then use the command

NASM pmtest3.asm-O pmtest3.com

2. Attach a floppy disk.

Sudo Mount-o loop pm. img/mnt/floppy

Note: PM. IMG uses bximage in bochs to generate the mkdir/mnt/Floppy directory.

3. Write the pmtest3.com file to the virtual floppy disk pm. IMG.

Sudo CP pm. img/mnt/floppy/

4. Detach a virtual floppy disk

Sudo umount/mnt/floppy

5. Run bochs and start a virtual floppy disk in freedos.

Bochs [enter]

[Enter] (Note: The default value is 6. Simulate debugging)

C (start debugging, and the virtual floppy disk in freedos will be started)

6. Run the file pmtest3.com in the virtual floppy disk.

B: \ pmtest3.com

Shows the execution result:

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.