flat assembler
Message board for the users of flat assembler.

Index > Examples and Tutorials > Tiniest Example Ever


Was this post useful to you?
Yes
46%
 46%  [ 7 ]
No
53%
 53%  [ 8 ]
Total Votes : 15

Author
Thread Post new topic Reply to topic
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
Response to nmake:
Quote:
And one last challenge to you: Make the tiniest piece of code you can produce, I mean the tiniest piece of code you can think of, that is extremely significant and useful, then post that as your next contribution. If you can succeed in that challenge, it's a small step for you and a huge step for mankind.
This example generates an int3 breakpoint exception. It is useful for debugging.
Code:
db 0CCh    
Hope it helps! Very Happy


Last edited by uart777 on 27 Feb 2013, 16:46; edited 3 times in total
Post 26 Feb 2013, 14:18
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Code:
int3    
Tinier source, same binary size.
Post 26 Feb 2013, 14:51
View user's profile Send private message Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
Oh, yeah? Smile
Code:
x    
(PS: Tinier source, but it assumes a macro is defined: macro x {int3})
Post 26 Feb 2013, 15:27
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6029
Location: Poland
MHajduk
So this
Code:
Ì    
is the shortest useful piece of code? Wink

Symbol Ì has a code equal to 0CCh (at least in my OS). The graphic form of it may depend on the font/encoding used, but you get the idea, for sure. Wink
Post 26 Feb 2013, 16:16
View user's profile Send private message Visit poster's website Reply with quote
uart777



Joined: 17 Jan 2012
Posts: 369
uart777
Ok, you win! Smile 00CCh=Unicode latin Ì.

I could argue that "db 0CCh" has a greater educational value, is an example of writing machine code, teaches the instruction size (one byte opcode) and works in any X86 assembler (even my generic one), but why waste time? Smile
Post 27 Feb 2013, 09:43
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Here:
Code:
    

A program that executes nothing. Smile
Post 27 Feb 2013, 18:05
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Post 27 Feb 2013, 23:17
View user's profile Send private message Reply with quote
jejus_slave



Joined: 04 Nov 2012
Posts: 4
jejus_slave
better than others.
Code:
Ë    
Post 20 Jun 2013, 16:07
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.