Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7986183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:46:47+00:00 2026-06-04T11:46:47+00:00

I found 512 byte os contest during web surfing. everything is fitted in bootsector.

  • 0

I found 512 byte os contest during web surfing.

everything is fitted in bootsector.

after read some of those source files,

I found there is always cli instruction before start routine.
(in assembly)

use16
org 7c00h
jmp 0:start
start:
  cli
  do something here..(this section sometimes include int 10h)

the thing I wonder is

  1. why cli is necessary before start routine.

  2. after cli, sometimes, they use interrupt! like int 10h I wonder why they use interrupt after cli would it be normal?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:46:49+00:00Added an answer on June 4, 2026 at 11:46 am

    1) The only case where cli is necessary before (or within) a boot sector’s initialisation is if the boot sector might run on 8086. For later CPUs loading ss causes interrupts to be disabled (postponed) until after the next instruction, which is long enough to load sp and get a valid ss:sp for a potential IRQ handler to use.

    2) Software interrupts (e.g. int 0x10) aren’t IRQs and aren’t disabled by cli. It’s normal to do a sti soon after a cli to avoid messing up IRQs. When you’re trying to squeeze something in 512 bytes it’s normal to do silly things that no sane programmer would consider allowing (like leaving interrupts disabled) just to squeeze an extra byte of code in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I found some simple source code of a bootloader.The following is the simple
Found this is some example CSS I was reading and I'm having a hard
I've been using some code I've found on the net to query the GAC
I think I've found some gems in the iPhone OS (iOS 4). I found
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But
found this regex: insert every 10 characters: $text = preg_replace(|(.{10})|u, \${1}. , $text); can
Found a piece of code today, that I find a little smelly... TMyObject.LoadFromFile(const filename:
Found this rather strange bug in IE8; element.style.top is limited to 1342177 pixels. Even
Found two libraries Rebex ( www.rebex.net ) and QuikSoft ( www.quiksoft.com ) any comments
Found very strange behavior of MS Access database when running queries from c#. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.