Hello World!... in pure x86 opcodes

2

1

This is a Hello World challenge! Those plain ones! Yeah....

However, it's different this time.

Because here, you can't use C or C++ or Stuck or ArnoldC or whatever you want. You can only choose raw x86 opcodes from this list, or any other x86 opcode lists.

It is also assuming you have no Protected Mode or any other thing, and you are in 16bit or 32bit Real Mode with nothin' loaded for ya'.

To represent a register, you can use something like [ECX] or [AL].

If you have to halt or for some reason display a trailing newline (i thought that would only happen in high-level languages!), do it.

Every byte or register is represented as one byte instead of 2.

This is a code-golf question. Whoever can do it with the least bytes wins. This is not a duplicate, and you can't use Linux (int 0x80) or DOS (int 0x21). You can't use ELF/i686 code either. It has to be plain raw machine code.

Have fun!

An example that prints 'A' in 16bit real mode and advances the cursor in 10 bytes (if you want Hello World, you will have to repeat this a million times, and each time changing the letter, which is in AL, and this is not an answer):

B0 [AH] [AH] 0E B0 [AL] [AL] 41 CD 10

180Five

Posted 2017-01-24T08:15:05.657

Reputation: 37

Question was closed 2017-01-24T09:38:38.420

1This has no objective winning criteria. All programming contests here need one to decide who the winner is. It seems like you wanted [tag:code-golf] here. (I only noticed because my dupe hammer didn't work :)) – Blue – 2017-01-24T09:19:26.617

Assuming this is code golf, this is just a language-specific version of our general Hello, World! challenge. Any answer to this could simply be posted there instead. There's an x86 answer and an x86_64 answer as well. If you think these aren't satisfactory, you could always earn some reputation and then offer a bounty to encourage better answers in your language of interest.

– Martin Ender – 2017-01-24T09:41:40.883

Both x86 answers to the general question are OS specific. The challenge here is to write a program which relies only on the BIOS functions like INT 10h (a boot loader displaying "Hello world" without using any OS function). Not really code golf, hardly a programming puzzle, but I wouldn't call it a duplicate. – G B – 2017-01-24T09:51:08.677

@GB Nevertheless, that's a valid language choice for the general challenge. – Martin Ender – 2017-01-24T09:52:20.407

You have to only use those opcodes (also known as machine code) to make "Hello World!" as code-golf. Forgot to add that tag, sorry. – 180Five – 2017-01-24T11:17:04.280

Asserting "this is not a duplicate" doesn't make it true. By the standards of this site, it is a duplicate: any valid competitive answer to this question would be a valid competitive answer to the indicated question. – Peter Taylor – 2017-01-24T12:19:57.550

No answers