flat assembler
Message board for the users of flat assembler.

Index > Heap > Test.

Goto page Previous  1, 2, 3 ... 9, 10, 11
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16997
Location: In your JS exploiting you and your system
revolution
I would expect it to be a hardware problem. Usually a flipped bit due to alpha decay (or is it beta decay? I forget which). Another possibility is that custom drivers can create ugly situations like this when not properly debugged before being put into service.

If those machines are under your control then run a program like prime95 to test the stability of the manufactured hardware. That will help you to eliminate a possible cause of the problem.
Post 28 Dec 2007, 07:23
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386
> If those machines are under your control

NO. Public Internet Terminals and Information panels.

> then run

... away just after capturing the photo Laughing

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 28 Dec 2007, 07:28
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV
0.1 thanks for that gradient C source. Now I can use gradient backgraound in my own dialogbox.
Code:
format PE GUI 4.0
entry start

include 'win32a.inc'

section '.code' code readable executable

start:
     invoke  GetModuleHandle,0
   invoke  DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
     invoke  ExitProcess,0

proc DialogProc hWnd,wMsg,wParam,lParam
local ps:PAINTSTRUCT
local hdc:DWORD
     push    ebx esi edi
 cmp     [wMsg],WM_COMMAND
   je      .wmcommand
  cmp     [wMsg],WM_PAINT
     je      .wmpaint
    cmp     [wMsg],WM_CLOSE
     je      .wmclose
    jmp     .processed
    .wmpaint:
     lea     ebx,[ps]
    invoke  BeginPaint,[hWnd],ebx
       mov     [hdc],eax
   stdcall paint_gradient,[hWnd],[hdc],4
       invoke  SetTextColor,[hdc],00ffffffh
        invoke  SetBkMode,[hdc],TRANSPARENT
 invoke  lstrlen,sz_text
     invoke  TextOut,[hdc],100,35,sz_text,eax
    invoke  EndPaint,[hWnd],ebx
 jmp     .processed
    .wmcommand:
    .wmclose:
      invoke  EndDialog,[hWnd],0
    .processed:
   xor     eax,eax
    .finish:
 pop     edi esi ebx
 ret
endp

proc paint_gradient hWnd,hdc,color_mask ;color_mask = 1 - 7
local rect:RECT
local w:DWORD
local h:DWORD
local y:DWORD
local hpen:DWORD
        push    ebx esi edi
 lea     eax,[rect]
  invoke  GetClientRect,[hWnd],eax
    mov     eax,[rect.right]
    sub     eax,[rect.left]
     mov     [w],eax
     mov     eax,[rect.bottom]
   sub     eax,[rect.top]
      mov     [h],eax
     mov     [y],0
    .new_line:
 mov     eax,255*4
   mul     [y]
 div     [h]
 and     eax,255
     sub     eax,127
     jnc     .positive
   neg     eax
    .positive:
   add     eax,127
     mov     ecx,4
       xor     edx,edx
    .next_color:
     test    [color_mask],ecx
    jz      .skip_color
 or      edx,eax
    .skip_color:
     shl     eax,8
       shr     ecx,1
       jnz     .next_color
    .no_blue:
    invoke  CreatePen,PS_SOLID,1,edx
    mov     [hpen],eax
  invoke  SelectObject,[hdc],[hpen]
   mov     edi,[w]
     sub     edi,[y]
     mov     ebx,[h]
     sub     ebx,[y]
     invoke  MoveToEx,[hdc],[y],[y],NULL
 invoke  LineTo,[hdc],edi,[y]
        invoke  LineTo,[hdc],edi,ebx
        invoke  LineTo,[hdc],[y],ebx
        invoke  LineTo,[hdc],[y],[y]
        invoke  DeleteObject,[hpen]
 inc     [y]
 mov     eax,[y]
     shl     eax,1
       cmp     eax,[h]
     jb      .new_line
   pop     edi esi ebx
 ret
endp

section '.rsrc' resource data readable
directory RT_DIALOG,dialogs
resource dialogs,37,LANG_ENGLISH,diag

dialog diag,'WM_PAINT test',10,10,250,100,\
       WS_CAPTION or WS_POPUP or WS_SYSMENU or DS_MODALFRAME
    dialogitem 'BUTTON','E&xit',IDCANCEL,100,70,50,13,\
       WS_VISIBLE or WS_TABSTOP
enddialog

section '.idata' import data readable writeable

library kernel32,'kernel32.dll',\
  user32,'user32.dll',\
    gdi32,'gdi32.dll'             ; for CreatePen

include 'api/kernel32.inc'
include 'api/user32.inc'
include 'api/gdi32.inc'

section '.data' data readable writeable

sz_text db 'Backgroung using WM_PAINT',0
    

_________________
6213186413*2^605+1 divides Fermat F(600) and 121531*2^30260+1 divides Fermat F(30256)
Post 28 Dec 2007, 10:33
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Great ATV!
I had also converted my example from C to asm but you did it without using floating point instructions! Smile

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 28 Dec 2007, 10:39
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6032
Location: Poland
MHajduk
0.1 wrote:
MHajduk wrote:
0.1 wrote:
Well! You can ask the person to turn on their cam!
This should tell the truth!
Simple question: what if he/she hasn't any camera?

Simple answer: stop chatting if you really care for the other person's appearance!
I'm afraid that you misunderstood my (general) question.

BTW, if it was a general remark, then I agree (with exception when people are looking for partner Wink). But if it was an advice for me, then you missed: I don't care about "other person's appearance" while chatting, because... I don't chat at all. Smile
Post 29 Dec 2007, 16:01
View user's profile Send private message Visit poster's website Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Computers are female
The top six reasons computers must be female:

6. As soon as you have one, a better one is just around the corner.

5. No one but the creator understands the internal logic.

4. Even your smallest mistakes are immediately committed to memory for future reference.

3. The native language used to communicate with other computers is incomprehensible to everyone else.

2. The message "Bad Command or File Name" is about as informative as

"If you don't know why I'm mad at you, then I'm certainly not going to tell you".

AND THE NUMBER ONE REASON COMPUTERS ARE FEMALE:

As soon as you make a commitment to one, you find yourself spending half of your paycheck on accessories for it.

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 01 Jan 2008, 06:23
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
[quopte]because... I don't chat at all[/quote]
MHajduk! You must be talking to yourself all the time then Wink
Post 01 Jan 2008, 06:26
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
His and her road trips
HIS and HERS Road Trip

HERS:

Pulls off at wrong exit.

opens window

asks directions of a knowledgeable police officer

Arrives at destination presently.

HIS:

Pulls off at wrong exit absolutely positive it's the correct one.

Drives five miles into wilderness, still thinks he's right.

Drives an extra 5 miles just in case.

Finally rolls down window just to get fresh air

Pulls up to a 7 -11

Gets three hot-dogs, a large slurpee, and beef jerky

Asks person behind counter how to get back onto the highway.

Gets back into car.

Laughs at the idea of looking at a map as he pulls away from the 7-11.

Drives down a dirt road with no street lights insisting this is the way back because guy from 7-11 said it was.

Almost hits a deer

Curses the night

Curses you

Curses the large slurpee

Drives and fiddles with radio.

Yells at you for suggesting the map again

Admits he didn't want to go to Thanksgiving at your sister's anyway.

He hates your sister.

Ever since she called him a pernicious weasel

He had to look up pernicious.

Couldn't find a dictionary.

Finally found a dictionary

Couldn't spell pernicious.

Seethes at the memory of it all

But she is laughing inside...

And of course you're still lost.

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 01 Jan 2008, 06:28
View user's profile Send private message Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
Seeking to humorously discriminate gender differences in proceeding systematically in step by step fashion, 0.1 wrote:
...[a female] asks directions of a knowledgeable police officer
1. Are we to infer then, that the policeman is female? ("knowledgeable"), else, if male:
2. How does one know for certain that an officer of the law is familiar with the surrounding neighborhood? For example, if he/she were new to the occupation, or a recent transfer to the area....

In ShangHai, a few years ago, I was lost, and asked four different policemen the simplest question: Which way to the central train station? (DuiBuQi, HuaCheZhan Zai Nar?) Each successive policeman pointed with his finger, without speaking, in a different direction. The first pointed to the north, the second to the east, the third to the south, and the final policeman pointed, of course, WEST. So, guess where I ended up. Yup. Right where I started.
Happy New Year.
Can anyone explain, for I do not know the answer, why does the Solar New Year commence ten days after the Winter solstice? Yup, still lost...
Confused
Post 01 Jan 2008, 11:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16997
Location: In your JS exploiting you and your system
revolution
tom tobias wrote:
In ShangHai, a few years ago, I was lost, and asked four different policemen the simplest question: Which way to the central train station? (DuiBuQi, HuaCheZhan Zai Nar?) Each successive policeman pointed with his finger, without speaking, in a different direction. The first pointed to the north, the second to the east, the third to the south, and the final policeman pointed, of course, WEST. So, guess where I ended up. Yup. Right where I started.
Maybe you were standing right on top of it and they were pointing to the nearest stairway!
tom tobias wrote:
Can anyone explain, for I do not know the answer, why does the Solar New Year commence ten days after the Winter solstice? Yup, still lost.. Confused
That is an easy answer. It is arbitrary and someone in the long dim past decided the new year should be around this time. I think you'll find the Roman empire had a lot to do with it. They kept changing the date until someone finally said "stop, we'll keep with this one."
Post 01 Jan 2008, 12:29
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6032
Location: Poland
MHajduk
0.1 wrote:
Computers are female
then, logically, women should be the best programmers as those, who know women's nature the best. Wink
tom tobias wrote:
Can anyone explain, for I do not know the answer, why does the Solar New Year commence ten days after the Winter solstice?
Yes, our calendar is inherited from Romans. Roman year started when new consules were elected. Initially it was March 1 but since 153 B.C.E it started at January 1. Smile
Post 01 Jan 2008, 13:36
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP
Post 14 Jun 2008, 17:26
View user's profile Send private message Visit poster's website Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
"To define Recursion we first need to define Recursion"
Post 15 Jun 2008, 16:26
View user's profile Send private message Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
rCX wrote:
"To define Recursion we first need to define Recursion"
Please correct my error, if I am mistaken.
I believe that you meant to write:

TO DEFINE RECURSION, one would first need to define "define".
Post 15 Jun 2008, 16:55
View user's profile Send private message Reply with quote
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
for Tom. Smile


Description:
Filesize: 49.35 KB
Viewed: 5537 Time(s)

fasm.png



_________________
Attitude!
Post 25 Jun 2010, 07:29
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 9, 10, 11

< 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.