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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:14:09+00:00 2026-06-17T08:14:09+00:00

B8 00 B8 8E E8 B4 00 CD 16 65 88 00 EF F2

  • 0
B8 00 B8 8E E8 B4 00 CD 16 65 88 00 EF F2

The program initially had 16 bytes, but I decided, to sacrifice 2 bytes in favor of unstable input position. Here is the previous version (0 0 position):

65 88 06 00 00

Then the possible candidate was:

EF F2 -> 
C3 ->
CF..CB..CC..CE

Those one-byters were also no-helpers.
My faint thought is to change (not use) the segment component. Remove 65 and use default data segment. Unfortunately it seems it doesn’t work.

What I’m doing wrong? Yesterday I decreased my module to 13 byte size, though it was unstable so far that every symbol appeared in a separate screen position.

  • 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-17T08:14:09+00:00Added an answer on June 17, 2026 at 8:14 am

    Well, it’s clearly 16-bit real mode x86 code, a .com file for DOS or other flat binary.

    $echo 'B8 00 B8 8E E8 B4 00 CD 16 65 88 00 C3' | udcli -x -16
    
    0000000000000000 b800b8           mov ax, 0xb800          
    0000000000000003 8ee8             mov gs, ax              
    0000000000000005 b400             mov ah, 0x0             
    0000000000000007 cd16             int 0x16                
    0000000000000009 658800           mov [gs:bx+si], al      
    000000000000000c c3               ret
    

    It supposes that bx and si have some acceptable values, so that 0xb800:bx+si points to the video memory region that’s used by the current text video mode. Well, it’s possible, but I wouldn’t recommend it.

    Anyway, it can be made at least 4 bytes shorter, if assumptions on register values are still allowed. If it can be assumed that bx and si have useful values (see above), then di probably too, so that 0xb800:di points to the video memory region that’s used by the current text video mode.

    00000000  B800B8            mov ax,0xb800
    00000003  8EC0              mov es,ax
    00000005  98                cbw
    00000006  CD16              int 0x16
    00000008  AA                stosb
    00000009  C3                ret
    

    First set ax to 0xb800 and store the it to es (the segment address of several BIOS text video modes).

    Then convert the byte al (0) to word ax, extending the sign bit of al to ax, resulting in ax = 0.

    Then read input from keyboard (and wait for input, if necessary) with BIOS keyboard interrupt int 16h (ah = 0). ASCII code in al, scan code in ah.

    Finally store the ASCII code to video memory (to [es:di]) with stosb to print the character on screen, and return to DOS (or whatever OS) with ret.

    Edit: Actually it is possible to drop the size to 12 bytes and still have a stable output address, with something like this:

    00000000  6800B8            push word 0xb800
    00000003  1F                pop ds
    00000004  31C0              xor ax,ax
    00000006  CD16              int 0x16
    00000008  A20000            mov [0x0],al
    0000000B  C3                ret
    

    Hope this helps.

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

Sidebar

Related Questions

I recently wrote a program that used a simple producer/consumer pattern. It initially had
I'm having some problems with my program in VS .NET 2003. I initially wrote
One of the analytics that I had to have on my program was How
I have a Java program using a basic Hibernate session factory. I had an
As the question says, for some reason my program is not flushing the input
This setting is enabled by default in Aptana Studio 3, but I had forgotten
I am trying to install OracleClient 11g and initially i had a issue regarding
I'm writing a program as an assignment for school and I though I had
I could use a little help. I got this program to work right then
Everything seemed so plain and simple until I had to actually program it. What

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.