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 6345863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:54:19+00:00 2026-05-24T20:54:19+00:00

Would any assembly gurus know the argument (register dl ) that signifies the first

  • 0

Would any assembly gurus know the argument (register dl) that signifies the first USB drive?

I’m working through a couple of NASM tutorials, and would like to get a physical boot (I can get a clean one with qemu).

This is the section of code that loads the “kernel” data from disk:

loadkernel:
    mov si, LMSG ;; 'Loading kernel',13,10,0
    call prints  ;; ex puts()

    mov dl, 0x00 ;; The disk to load from
    mov ah, 0x02 ;; Read operation
    mov al, 0x01 ;; Sectors to read
    mov ch, 0x00 ;; Track
    mov cl, 0x02 ;; Sector
    mov dh, 0x00 ;; Head
    mov bx, 0x2000 ;; Buffer end
    mov es, bx
    mov bx, 0x0000 ;; Buffer start

    int 0x13
    jc loadkernel

    mov ax, 0x2000
    mov ds, ax

    jmp 0x2000:0x00

If it makes any difference, I’m running a stock Dell Inspiron 15 BIOS.


Apparently, the correct value for me is 0x80.

The BIOS loads the hard drives and labels them starting at 0x80 according to this answer.

My particular BIOS decides to load the USB drive up as the first, for some reason, so I can boot from there.

  • 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-05-24T20:54:20+00:00Added an answer on May 24, 2026 at 8:54 pm

    The simple answer is that the correct value for dl is in dl.

    The happy answer is that the dl value with int 13h, ah=8 GET DRIVE PARAMETERS returns the geometry to use and allows the FAT12 floppy disk image code to run from any BIOS/version that can boot from a USB flash drive.

    See my post here: USB Booting Secrets

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

Sidebar

Related Questions

In bash, calling foo would display any output from that command on the stdout.
In his PDC talk, Anders said that the dynamic keyword would dispatch any function
I'm asking in generalities - why would any server not set and return headers
I would appreciate any help on this issue. Lets say I want to load
Am wondering if there would be any security flaw in this approach. I am
Under what circumstances (if any) would you allow an application to change its underlying
I was wondering if in Java I would get any odd behaviour if I
I don't understand how using a 'challenge token' would add any sort of prevention:
I've been researching memory mapped files for a project and would appreciate any thoughts
My code works (yeah!) which sends json to a server.. would appreciate any thoughts

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.