flat assembler
Message board for the users of flat assembler.

Index > Heap > Test.

Goto page Previous  1, 2, 3 ... 6, 7, 8, 9, 10, 11  Next
Author
Thread Post new topic Reply to topic
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
0ยบ1

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 08 Aug 2007, 13:51
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Code:
Me.
 ,__,
|/  \|
|`,` |)
 \'_/
    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 08 Aug 2007, 13:57
View user's profile Send private message Reply with quote
JTG



Joined: 09 Aug 2007
Posts: 3
Location: Ukraine, Kiev
JTG
Типа ТЕСТ! Smile
Image
Post 09 Aug 2007, 10:02
View user's profile Send private message ICQ Number Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Microsoft Jokes

There was a pilot flying a small single engine charter plane, with a couple of very important executives on board. He was coming into Seattle airport through thick fog with
less than 10m visibility when his instruments went out. So he began circling around looking for landmark. After an hour or so, he starts running pretty low on fuel and the
passengers are getting very nervous. Finally, a small opening in the fog appears and he sees a tall building with one guy working alone on the fifth floor. The pilot banks the
plane around, rolls down the window and shouts to the guy "Hey, where am I? To this, the solitary office worker replies "You're in a plane." The pilot rolls up the
window, executes a 275 degree turn and proceeds to execute a perfect blind landing on the runway of the airport 5 miles away. Just as the plane stops, so does the engine
as the fuel has run out.

The passengers are amazed and one asks how he did it. "Simple" replies the pilot, "I asked the guy in that building a simple question. The answer he gave me was 100
percent correct but absolutely useless, therefore that must be Microsoft's support office and from there the airport is just a while away."


Q: What's the difference between Microsoft Windoze and a computer virus?
A: The virus does less damage, takes up less disk space, and is easier to get rid of!!

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 09 Aug 2007, 10:16
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Java
Code:
import java.math.*;
class F {
  public static void main(String[] args) {
    System.out.println(new BigInteger(2).pow(1024));
  }
}
    


Perl
Code:
using bigint;
print 2**1024, "\n";
    


Python
Code:
print 2**1024
    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 21 Aug 2007, 11:16
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
play animal guessing game in Perl:
Code:
use strict;
sub yes {
        print shift;
        my $ans = <STDIN>;
        return $ans =~ /^[yY]/;
}

sub animal {
        my $tree = { cargo=>'bird', left=>'', right=>'' };    
        # loop until the user quits
        while (1) {
                last unless yes "\nAre you thinking of an animal? ";
        
                # walk the tree
                while($tree->{left}) {
                    if (yes "$tree->{cargo} ? " ) { $tree = $tree->{right}; }
                    else { $tree = $tree->{left}; }
                }
        
                # make a guess
                my $guess = $tree->{cargo};
                if (yes "Is it a $guess? ") {
                    print "I rule!";
                    next;
                }
        
                # get new information
                print "What is the animal's name? ";
                my $animal = <STDIN>;
                chomp($animal);
                print "What question would distinguish a $animal from a $guess? ";
                my $question = <STDIN>;
                chomp($question);
        
                # add new information to the tree
                $tree->{cargo} = $question;
                if (yes "If the animal were $animal the answer would be? ") {
                    $tree->{left} = { cargo=>$guess, left=>'', right=>'' };
                    $tree->{right} = { cargo=>$animal, left=>'', right=>'' };
                }
                else {
                    $tree->{left} = { cargo=>$animal, left=>'', right=>'' };
                    $tree->{right} = { cargo=>$guess, left=>'', right=>'' };
                }
                
        }
}
animal;
    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 21 Aug 2007, 13:23
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
paint black gradient:
Code:
#include <windows.h>

void paint_gradient(HDC hdc)
{
// Red, Green & Blue color component of gradient.
        float r = 0;
        float g = 0;
        float b = 0;

// Screen width & height.
        int w = GetSystemMetrics(SM_CXSCREEN);
        int h = GetSystemMetrics(SM_CYSCREEN);

// Change in color component for each pixel.
        float d = 128.0f / h;

// x and y for line.
        int x = 0;
        int y = 1;

        while (y <= h)
        {
                HPEN hpen = CreatePen(PS_SOLID, 1, RGB((int)r, (int)g, (int)b));
                SelectObject(hdc, hpen);
                MoveToEx(hdc, x, y, NULL);
                x = w;
                LineTo(hdc, x, y);
                DeleteObject(hpen);
                ++y;
                x = 0;
                r += d;
                g += d;
                b += d;
        }
}

LRESULT CALLBACK window_proc(HWND hwnd, UINT umsg, WPARAM wpar, LPARAM lpar)
{
        switch (umsg)
        {
                case WM_PAINT:
                {
                        PAINTSTRUCT ps;
                        HDC hdc = BeginPaint(hwnd, &ps);
                        paint_gradient(hdc);
                        EndPaint(hwnd, &ps);
                }
                break;
                
                case WM_KEYDOWN:
                        SendMessage(hwnd, WM_CLOSE, 0, 0);
                break;
                
                case WM_DESTROY:
                        PostQuitMessage(0);
                break;
                
                default:
                        return DefWindowProc(hwnd, umsg, wpar, lpar);
        }
        return 0L;
}

int WINAPI WinMain(HINSTANCE h, HINSTANCE i, LPSTR cmd, int show)
{
        WNDCLASSEX wcx;
        MSG msg;
        HWND hwnd;

        wcx.cbSize = sizeof(wcx);
        wcx.style = CS_HREDRAW | CS_VREDRAW;
        wcx.lpfnWndProc = window_proc;
        wcx.cbClsExtra = 0;
        wcx.cbWndExtra = 0;     
        wcx.hInstance = h;
        wcx.hIcon = wcx.hIconSm = LoadIcon(0, IDI_APPLICATION);
        wcx.hCursor = LoadCursor(0, IDC_ARROW);
        wcx.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
        wcx.lpszMenuName = NULL;
        wcx.lpszClassName = "BLACK";
        
        RegisterClassEx(&wcx);
        hwnd = CreateWindowEx(0, "BLACK", "BLACK", WS_POPUP,
                CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
                0, 0, h, NULL);
        ShowWindow(hwnd, SW_MAXIMIZE);
        
        while (GetMessage(&msg, 0, 0, 0) > 0)
        {
                TranslateMessage(&msg);
                DispatchMessage(&msg);
        }

        return (int)msg.wParam;
}
    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 24 Aug 2007, 05:25
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
A♥ A♦ A♣ A♠
Post 24 Aug 2007, 06:10
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
☺ ☻
Post 24 Aug 2007, 10:03
View user's profile Send private message Reply with quote
resoftw



Joined: 26 Dec 2005
Posts: 12
Location: .id
resoftw
Image Loading my post, pleas wait...

_________________
Image Loading my signature, please wait...
^_^
Post 01 Sep 2007, 07:16
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
very nice resoftw!
I for once started waiting for your post and signature to Load (DUMB ME!).

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 01 Sep 2007, 08:41
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Oranges
Apples
Post 19 Sep 2007, 06:01
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4225
Location: 2018
edfed
Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image

_________________
Smile fool iem.design
Post 05 Dec 2007, 00:20
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
Life is a waste of time, time is a waste of life, so get wasted all of the time and have the time of your life.
- Michelle Mastrolacasa

I'd rather have a bottle in front of me, than a frontal lobotomy.
- Tom Waits

Beer is proof that God loves us and wants us to be happy.
- Benjamin Franklin

If you ever reach total enlightenment while drinking beer, I bet it makes beer shoot out your nose.
- Jack Handy
Post 10 Dec 2007, 00:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
hey vid! nice cleanup job! Smile
i just noticed that there are only two threads now. thanks for saving my posts Wink

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 10 Dec 2007, 12:20
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
vid
That wasn't me, it was tomasz. Thanks was forwarded to him Smile
Post 10 Dec 2007, 12:22
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Code:
                         THE PENTIUM FDIV BUG

Q:  What does FDIV mean?
A:  It's an instruction mnemonic- Fundamentally Defective Instruction Vector.

Q:  Sorry, I didn't get that, please decode again. What does FDIV mean?
A:  Functionally Destructive Instigator of Violent results.

Q:  Sorry, I didn't get that, please recompute. What does FDIV mean?
A:  Flaming Dumb Intel Violation.

Q:  What is the significance of the FDIV error for the general public?
A:  Therapy; millions more people are going to have to go to their 
    psychiatrists when they discover they're not at x * 1/x with themselves.

Q:  How many Pentium designers does it take to screw in a light bulb?
A:  1.99904274017, but that's close enough for non-technical people.

Q:  What do you get when you cross a Pentium PC with a  research grant?
A:  A mad scientist.

Q:  Please calculate 80486 - 80586. What's the answer?
A:  (a) Infinity, and positive too.
A:  (b) 80286.

Q:  What's another name for the "Intel Inside" sticker they put on Pentiums?
A:  Warning label.

Q:  What do you call a series of FDIV instructions on a Pentium?
A:  Successive approximations.

Q:  What did Intel say to people complaining about Pentiums' FDIV?
A:  "Go forth and multiply, and take the quantum leap."

Q:  What is the difference between here and infinity?
A:  Not all that much, really. It won't affect anybody anyway.

Q:  Complete the following word analogy:  Add is to Subtract as Multiply
    is to
        1)  Divide
        2)  ROUND
        3)  RANDOM
        4)  On a Pentium, all of the above
A:  Number 4. (or nearly as dammit).

Q:  What algorithm did Intel use in the Pentium's floating point divider?
A:  "Life is like a box of chocolates." (Source: F. Gump of Intel)

Q:  Why didn't Intel call the Pentium the 586?
A:  Because they added 486 and 100 on the first Pentium and got
    585.999983605.

Q:  According to Intel, the Pentium conforms to the IEEE standards
    754 and 854 for floating point arithmetic.  If you fly in aircraft
    designed using a Pentium, what is the correct pronunciation of "IEEE"
A:  Aaaaaaaiiiiiiiiieeeeeeeeeeeee!

TOP TEN NEW INTEL SLOGANS FOR THE PENTIUM
--------------------------------------------------------------------------
  9.9999973251   It's a FLAW, Dammit, not a Bug
  8.9999163362   It's Close Enough, We Say So
  7.9999414610   Nearly 300 Correct Opcodes
  6.9999831538   You Don't Need to Know What's Inside
  5.9999835137   Redefining the PC--and Mathematics As Well
  4.9999999021   We Fixed It, Really
  3.9998245917   Division Considered Harmful
  2.9991523619   Why Do You Think They Call It *Floating* Point?
  1.9999103517   We're Looking for a Few Good Flaws
  0.9999999998   The Errata Inside

   Oh, and by the way -
   Did you know, it was meant to be "Intel" but bit 5 got inverted accidentally
   so it's "iNTEL".
   Why not the full name? Well, look at it this way.  iNTEL LIGENCE
   had too many significant places....                      -------

    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 22 Dec 2007, 13:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16994
Location: In your JS exploiting you and your system
revolution
This thread should be moved into Heap. There is some good stuff here, it would be sad to have it lost after the auto-deletion has had it's wicked way with it.
Post 22 Dec 2007, 13:19
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
OK, I'll trust you that there is info worth to be saved Smile
Post 22 Dec 2007, 18:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16994
Location: In your JS exploiting you and your system
revolution
.
Post 22 Dec 2007, 23:03
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 6, 7, 8, 9, 10, 11  Next

< 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 can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.