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

  • Home
  • SEARCH
  • 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 6616395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:34:38+00:00 2026-05-25T20:34:38+00:00

I’m trying to use the debug tool in windows to for a simple program.

  • 0

I’m trying to use the debug tool in windows to for a simple program. I want to input a string of characters and then inspect the memory to see the characters saved.

Here’s the code I have:

mov  bx,200
mov  byte [bx],33   ;; Set maximum string length (32 + Ent)
mov  ah, 0Ah
int  21h

Every time I assemble the code and run it, it lets me input the string and then DEBUG automatically quits. This my first time ever using it so I’m not sure what the problem is.

Any help/tips would be greatly appreciated.

Thanks!

  • 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-25T20:34:39+00:00Added an answer on May 25, 2026 at 8:34 pm

    Function 0Ah expects the buffer address in DS:DX, your code only sets up BX, never DX.

    Here’s how I type the code in:

    C:\>debug
    -a 100
    13DB:0100 mov bx, 200
    13DB:0103 mov byte [bx], 33
    13DB:0106 mov ah, 0a
    13DB:0108 mov dx, bx
    13DB:010A int 21
    13DB:010C
    

    Here’s what I get:

    -u 100
    13DB:0100 BB0002        MOV     BX,0200
    13DB:0103 C60733        MOV     BYTE PTR [BX],33
    13DB:0106 B40A          MOV     AH,0A
    13DB:0108 89DA          MOV     DX,BX
    13DB:010A CD21          INT     21
    

    Here’s what’s in the registers:

    -r
    AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=0100   NV UP EI PL NZ NA PO NC
    13DB:0100 BB0002        MOV     BX,0200
    

    Next I just use the “proceed” command to execute the code instruction by instruction:

    AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=0100   NV UP EI PL NZ NA PO NC
    13DB:0100 BB0002        MOV     BX,0200
    -p
    
    AX=0000  BX=0200  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=0103   NV UP EI PL NZ NA PO NC
    13DB:0103 C60733        MOV     BYTE PTR [BX],33                   DS:0200=33
    -p
    
    AX=0000  BX=0200  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=0106   NV UP EI PL NZ NA PO NC
    13DB:0106 B40A          MOV     AH,0A
    -p
    
    AX=0A00  BX=0200  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=0108   NV UP EI PL NZ NA PO NC
    13DB:0108 89DA          MOV     DX,BX
    -p
    
    AX=0A00  BX=0200  CX=0000  DX=0200  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=010A   NV UP EI PL NZ NA PO NC
    13DB:010A CD21          INT     21
    -p
    

    Then type in “QWE” followed by enter:

    QWE
    AX=0A0D  BX=0200  CX=0000  DX=0200  SP=FFEE  BP=0000  SI=0000  DI=0000
    DS=13DB  ES=13DB  SS=13DB  CS=13DB  IP=010C   NV UP EI PL NZ NA PO NC
    13DB:010C 0000          ADD     [BX+SI],AL                         DS:0200=33
    -
    

    Done. And here it is in the memory:

    -d 200
    13DB:0200  33 03 51 57 45 0D 00 00-00 00 00 00 00 00 00 00   3.QWE...........
    13DB:0210  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
    13DB:0220  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I need to clean up various Word 'smart' characters in user input, including but
Basically, what I'm trying to create is a page of div tags, each has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace

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.