flat assembler
Message board for the users of flat assembler.

flat assembler > Examples and Tutorials > floor demo

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Walter



Joined: 26 Jan 2013
Posts: 133
avcaballero has placed the source for this floor demo
on his site (in addition to many more).

http://www.abreojosensamblador.net

I couldn't find include files that he uses (missing
resources as well). But the tutorial is obviously a
work in progress.

Looks like versions of most sources in
MASM, FASM, NASM and TinyC.

Very creative indeed!
Post 29 Apr 2013, 16:32
View user's profile Send private message Reply with quote
MIHIP



Joined: 14 Feb 2013
Posts: 130
Haha, it's look like cold :3
Code:
format pe gui 4.0

include 'win32ax.inc'  

XLEN = 640  
YLEN = 400  
ELAPSE = 20  

struct RGBQUAD  
  rgbBlue     db ?  
  rgbGreen    db ?  
  rgbRed      db ?  
  rgbReserved db ?  
ends  

struct BITMAPINFO  
  bmiHeader BITMAPINFOHEADER  
  bmiColors RGBQUAD  
ends  

section '.data' data readable writeable  

strClass db 'CeilFloor', 0  
strTitle db 'Ceil&Floor Demo - c abreojosensamblador.net', 0  
strError db 'Bonkers!  I hate it when that happens.', 0  

wc WNDCLASS 0, WindowProc, 0, 0, 0, 0, 0, 0, 0, strClass  
bmi BITMAPINFO <28h, 280h, 0FFFFFE70h, 1, 20h, 0, 0, 0, 0, 0, 0>, <0, 0, 0, 0>  
msg MSG  
ps PAINTSTRUCT  

dwValue1 dd 0  
dwValue2 dd 0  

hDC1 dd ?  
hDC2 dd ?  
hDC3 dd ?  

hBitmap1 dd ?  

hGdiObject1 dd ?  
hGdiObject2 dd ?  
hGdiObject3 dd ?  

ppvBits dd ?  

byValue1 db ?  
byValue2 db ?  
byValue3 db ?  
byValue4 db ?  

TableH db 0x320 dup ?  
Table1 db 0x5a0 dup ?  
Table2 db 0x5a0 dup ?  
Table3 db 0x5a0 dup ?  
Table4 db 0x5a0 dup ?  

section '.code' code readable executable  

start  
        invoke  GetModuleHandle, NULL  
        mov     wc.hInstance, eax  
        mov     wc.lpfnWndProc, WindowProc  
        mov     wc.lpszClassName, strClass  

        invoke  GetStockObject, NULL  
        mov     wc.hbrBackground, eax  

        stdcall CFProc0  
        invoke  ExitProcess, 0  


proc CFProc0 uses ebx esi edi  
        invoke  LoadIcon, NULL, IDI_APPLICATION  
        mov     wc.hIcon, eax  

        invoke  LoadCursor, NULL, IDC_ARROW  
        mov     wc.hCursor, eax  

        invoke  RegisterClass, wc  
        test    eax, eax  
        jz      CeilFloorError  

        invoke  CreateWindowEx, 0, strClass, strTitle, WS_VISIBLE or WS_SYSMENU or WS_HREDRAW, \ 
                                128, 128, 640, 400, 0, 0, wc.hInstance, 0  
        test    eax, eax  
        jz      CeilFloorError  

CFProc001  
        invoke  GetMessage, msg, NULL, 0, 0  
        cmp     eax, 1  
        jb      CeilFloorRet  
        jnz     CFProc001  

        invoke  TranslateMessage, msg  
        invoke  DispatchMessage, msg  

        jmp     CFProc001  

CeilFloorError  
        invoke  MessageBox, NULL, strError, strTitle, MB_ICONHAND  

CeilFloorRet  
        ret  
endp  


proc WindowProc uses ebx esi edi, hWnd, uMsg, wParam, lParam  
        mov     eax, uMsg  
        cmp     eax, WM_ERASEBKGND  
        jz      .OnEraseBkgnd  
        cmp     eax, WM_PAINT  
        jz      .OnPaint  
        cmp     eax, WM_DESTROY  
        jz      .OnDestroy  
        cmp     eax, WM_TIMER  
        jz      .OnTimer  
        cmp     eax, WM_CREATE  
        jz      .OnCreate  
        cmp     eax, WM_KEYFIRST  
        jz      .OnKeyFirst  

        invoke  DefWindowProc, hWnd, uMsg, wParam, lParam  
        jmp     WindowProcExit  

.OnKeyFirst  
        cmp     wParam, VK_ESCAPE  
        jnz     WindowProcRet  
        jmp     .OnDestroy  

.OnCreate  
        invoke  GetDC, hWnd  
        mov     hDC1, eax  
        invoke  CreateCompatibleDC, hDC1  
        mov     hDC2, eax  

        invoke  CreateDIBSection, hDC1, bmi, 0, ppvBits, 0, 0  
        mov     hGdiObject1, eax  

        invoke  SelectObject, hDC2, hGdiObject1  
        mov     hGdiObject3, eax  

        invoke  CreateCompatibleDC, hDC1  
        mov     hDC3, eax  

        invoke  CreateCompatibleBitmap, hDC1, XLEN, YLEN  
        mov     hBitmap1, eax  

        invoke  SelectObject, hDC3, hBitmap1  
        mov     hGdiObject2, eax  

        stdcall CFProc1  
        stdcall CFProc2  
        stdcall CFProc4, hWnd  

        invoke  ReleaseDC,  hWnd, hDC1  
        invoke  SetTimer, hWnd, 1, ELAPSE, NULL  
        jmp     WindowProcRet  

.OnTimer  
        invoke  InvalidateRect, hWnd, NULL, FALSE  
        jmp     WindowProcRet  

.OnEraseBkgnd  
        mov     eax, 1  
        jmp     WindowProcRet  

.OnPaint  
        invoke  BeginPaint, hWnd, ps  
        mov     hDC1, eax  
        stdcall CFProc3  
        invoke  BitBlt, hDC3, 0, 0, XLEN, YLEN, hDC2, 0, 0, SRCCOPY  
        invoke  BitBlt, hDC1, 0, 0, XLEN, YLEN, hDC3, 0, 0, SRCCOPY  
        invoke  EndPaint, hWnd, ps  
        jmp     WindowProcRet  

.OnDestroy  
        invoke  KillTimer, hWnd, 1  
        invoke  SelectObject, hDC3, hGdiObject2  
        invoke  DeleteObject, hBitmap1  
        invoke  DeleteDC, hDC3  
        invoke  SelectObject, hDC2, hGdiObject3  
        invoke  DeleteDC, hDC2  
        invoke  DeleteObject, hGdiObject1  
        invoke  DestroyWindow, hWnd  
        invoke  PostQuitMessage, 0  

WindowProcRet  
        xor     eax, eax  

WindowProcExit  
        ret  
endp  


proc CFProc1  
        mov     esi, 0  
        mov     ecx, 20h  

CFProc101  
        mov     eax, 20h  
        sub     eax, ecx  
        mov     byValue3 + esi, al  
        mov     byValue2 + esi, al  
        mov     byte byValue1 + esi, 28h  
        mov     byte byValue4 + esi, 0  
        add     esi, 4  
        loop    CFProc101  
        ret  
endp  


proc CFProc2  
  locals  
    dwVar1 dd ?  
  endl  
        mov     esi, TableH  
        mov     dwVar1, 2710h  
        mov     ecx, 0  
        fild    dwVar1  
        fld     st0  

CFProc201  
        mov     eax, 0CAh  
        sub     eax, ecx  
        add     eax, 2  
        mov     dwVar1, eax  
        fidiv   dwVar1  
        fstp    dword esi  
        wait  
        fld     st0  
        add     esi, 4  
        inc     ecx  
        cmp     ecx, 0C8h  
        jnz     CFProc201  
        ffree   st1  
        ffree   st0  
        fldpi  
        push    0B4h  
        fidiv   dword esp  
        pop     eax  
        fld     st0  
        mov     ecx, 0  

CFProc202  
        mov     ebx, ecx  
        shl     ebx, 2  
        push    ecx  
        fimul   dword esp  
        pop     eax  
        fsincos  
        fst     dword ebx + Table1  
        wait  
        push    140h  
        fidiv   dword esp  
        fstp    dword ebx + Table3  
        wait  
        fst     dword ebx + Table2  
        wait  
        fidiv   dword esp  
        fstp    dword ebx + Table4  
        wait  
        pop     eax  
        fld     st0  
        inc     ecx  
        cmp     ecx, 168h  
        jnz     CFProc202  
        ffree   st1  
        ffree   st0  
        ret  
endp  


proc CFProc3  
  locals  
    dwVar1  dd ?  
    dwVar2  dd ?  
    dwVar3  dd ?  
    dwVar4 dd ?  
    dwVar5 dd ?  
    dwVar6 dd ?  
    dwVar7 dd ?  
    dwVar8 dd ?  
    dwVar9 dd ?  
  endl  
        mov     eax, 500h  
        mov     dwVar1, eax  
        mov     eax, 0F9AFCh  
        mov     dwVar2, eax  
        mov     ecx, 0FFFFFEC0h  

CFProc301  
        mov     esi, dword bmi.bmiColors.rgbBlue  
        shl     esi, 2  
        push    ecx  
        fld     dword esi + Table4  
        fimul   dword esp  
        fld     dword esi + Table1  
        fsub    st0, st1  
        ffree   st1  
        fstp    dwVar3  
        wait  
        fld     dword esi + Table3  
        fimul   dword esp  
        fadd    dword esi + Table2  
        fstp    dwVar4  
        wait  
        pop     eax  
        mov     esi, ecx  
        shl     esi, 2  
        mov     eax, dwVar1  
        add     eax, esi  
        mov     dwVar5, eax  
        mov     eax, dwVar2  
        add     eax, esi  
        mov     dwVar6, eax  
        mov     dwVar9, 0FFFFFF9Ch  
        mov     ebx, 0  

CFProc302  
        mov     edi, ebx  
        shl     edi, 2  
        fld     dword edi + TableH  
        fmul    dwVar3  
        fiadd   dwValue1  
        fistp   dwVar7  
        wait  
        and     dwVar7, 1Fh  
        fld     dword edi + TableH  
        fmul    dwVar4  
        fiadd   dwValue2  
        fistp   dwVar8  
        wait  
        mov     edi, dwVar8  
        and     edi, 1Fh  
        shl     edi, 5  
        add     edi, dwVar7  
        shl     edi, 2  
        mov     eax, EdiTable + edi  
        movzx   esi, al  
        sub     esi, dwVar9  
        jge     CFProc303  
        xor     esi, esi  

CFProc303  
        movzx   edx, ah  
        sub     edx, dwVar9  
        jge     CFProc304  
        xor     edx, edx  

CFProc304  
        shl     edx, 8  
        shr     eax, 10h  
        sub     eax, dwVar9  
        jge     CFProc305  
        xor     eax, eax  

CFProc305  
        shl     eax, 10h  
        or      eax, edx  
        or      eax, esi  
        mov     edi, dword ppvBits  
        mov     esi, edi  
        add     edi, dwVar5  
        add     esi, dwVar6  
        mov     edi, eax  
        mov     edi+4, eax  
        mov     esi, eax  
        mov     esi+4, eax  
        add     dwVar5, 0A00h  
        sub     dwVar6, 0A00h  
        inc     dwVar9  
        inc     ebx  
        cmp     ebx, 0B4h  
        jnz     CFProc302  
        inc     ecx  
        cmp     ecx, 140h  
        jnz     CFProc301  
        add     dwValue2, 2  
        add     dwValue1, 2  
        mov     eax, dword bmi.bmiColors.rgbBlue  
        add     eax, 2  
        mov     ebx, 168h  
        xor     edx, edx  
        div     ebx  
        mov     dword bmi.bmiColors.rgbBlue, edx  
        ret  
endp  


proc CFProc4 uses ebx ecx edx esi edi, hWnd  
  locals  
    dwVar1 dd ?  
    dwVar2 dd ?  
    dwVar3 dd ?  
    X     dd ?  
    Y     dd ?  
  endl  
        invoke  GetSystemMetrics, SM_CYCAPTION  
        mov     dwVar1, eax  
        invoke  GetSystemMetrics, SM_CXFIXEDFRAME  
        mov     dwVar3, eax  
        shl     dwVar3, 1  
        invoke  GetSystemMetrics, SM_CYFIXEDFRAME  
        mov     dwVar2, eax  
        invoke  GetSystemMetrics, SM_CXSCREEN  
        mov     ecx, XLEN  
        add     ecx, dwVar3  
        sub     eax, ecx  
        shr     eax, 1  
        mov     X, eax  
        invoke  GetSystemMetrics, SM_CYSCREEN  
        mov     ecx, YLEN  
        add     ecx, dwVar1  
        add     ecx, dwVar2  
        sub     eax, ecx  
        mov     ecx, 3  
        sub     edx, edx  
        div     ecx  
        mov     Y, eax  
        mov     ebx, XLEN  
        add     ebx, dwVar3  ; cx  
        mov     eax, YLEN  
        add     eax, dwVar1  
        add     eax, dwVar2  ; cy  
        invoke  SetWindowPos, hWnd, HWND_TOP, X, Y, ebx, eax, SWP_NOZORDER  
        ret  
endp  

EdiTable  

dd 0x0006A6A06, 0x0006F6F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90 
dd 0x0006F6F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x00091006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00010006F, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x000606F90, 0x000606F60, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F 
dd 0x00090106F, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F 
dd 0x000606F90, 0x000606F90, 0x000606F91, 0x000606F90, 0x00090006F, 0x000606F91, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F91, 0x000606F90, 0x00090006F, 0x000606F91, 0x000606F90
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90 
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90 
dd 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90 
dd 0x000900010, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90 
dd 0x000606F90, 0x0006F6F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90
dd 0x0006F6F90, 0x0006A6A06, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F91, 0x000606F90, 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90
dd 0x0006A6A06, 0x000000000

.end start    
Laughing , wow:
Code:
format pe gui 4.0

include 'win32ax.inc'  

XLEN = 640  
YLEN = 400  
ELAPSE = 20  

struct RGBQUAD  
  rgbBlue     db ?  
  rgbGreen    db ?  
  rgbRed      db ?  
  rgbReserved db ?  
ends  

struct BITMAPINFO  
  bmiHeader BITMAPINFOHEADER  
  bmiColors RGBQUAD  
ends  

section '.data' data readable writeable  

strClass db 'CeilFloor', 0  
strTitle db 'Ceil&Floor Demo - c abreojosensamblador.net', 0  
strError db 'Bonkers!  I hate it when that happens.', 0  

wc WNDCLASS 0, WindowProc, 0, 0, 0, 0, 0, 0, 0, strClass  
bmi BITMAPINFO <28h, 281h, 0FFFFFE70h, 1, 20h, 0, 0, 0, 0, 0, 0>, <0, 0, 0, 0>
msg MSG  
ps PAINTSTRUCT  

dwValue1 dd 0  
dwValue2 dd 0  

hDC1 dd ?  
hDC2 dd ?  
hDC3 dd ?  

hBitmap1 dd ?  

hGdiObject1 dd ?  
hGdiObject2 dd ?  
hGdiObject3 dd ?  

ppvBits dd ?  

byValue1 db ?  
byValue2 db ?  
byValue3 db ?  
byValue4 db ?  

TableH db 0x329 dup ?
Table1 db 0x5a0 dup ?  
Table2 db 0x5a0 dup ?  
Table3 db 0x5a0 dup ?  
Table4 db 0x5a0 dup ?  

section '.code' code readable executable  

start  
        invoke  GetModuleHandle, NULL  
        mov     wc.hInstance, eax  
        mov     wc.lpfnWndProc, WindowProc  
        mov     wc.lpszClassName, strClass  

        invoke  GetStockObject, NULL  
        mov     wc.hbrBackground, eax  

        stdcall CFProc0  
        invoke  ExitProcess, 0  


proc CFProc0 uses ebx esi edi  
        invoke  LoadIcon, NULL, IDI_APPLICATION  
        mov     wc.hIcon, eax  

        invoke  LoadCursor, NULL, IDC_ARROW  
        mov     wc.hCursor, eax  

        invoke  RegisterClass, wc  
        test    eax, eax  
        jz      CeilFloorError  

        invoke  CreateWindowEx, 0, strClass, strTitle, WS_VISIBLE or WS_SYSMENU or WS_HREDRAW, \ 
                                640, 128, 640, 400, 0, 0, wc.hInstance, 0
        test    eax, eax  
        jz      CeilFloorError  

CFProc001  
        invoke  GetMessage, msg, NULL, 0, 0  
        cmp     eax, 1  
        jb      CeilFloorRet  
        jnz     CFProc001  

        invoke  TranslateMessage, msg  
        invoke  DispatchMessage, msg  

        jmp     CFProc001  

CeilFloorError  
        invoke  MessageBox, NULL, strError, strTitle, MB_ICONHAND  

CeilFloorRet  
        ret  
endp  


proc WindowProc uses ebx esi edi, hWnd, uMsg, wParam, lParam  
        mov     eax, uMsg  
        cmp     eax, WM_ERASEBKGND  
        jz      .OnEraseBkgnd  
        cmp     eax, WM_PAINT  
        jz      .OnPaint  
        cmp     eax, WM_DESTROY  
        jz      .OnDestroy  
        cmp     eax, WM_TIMER  
        jz      .OnTimer  
        cmp     eax, WM_CREATE  
        jz      .OnCreate  
        cmp     eax, WM_KEYFIRST  
        jz      .OnKeyFirst  

        invoke  DefWindowProc, hWnd, uMsg, wParam, lParam  
        jmp     WindowProcExit  

.OnKeyFirst  
        cmp     wParam, VK_ESCAPE  
        jnz     WindowProcRet  
        jmp     .OnDestroy  

.OnCreate  
        invoke  GetDC, hWnd  
        mov     hDC1, eax  
        invoke  CreateCompatibleDC, hDC1  
        mov     hDC2, eax  

        invoke  CreateDIBSection, hDC1, bmi, 0, ppvBits, 0, 0  
        mov     hGdiObject1, eax  

        invoke  SelectObject, hDC2, hGdiObject1  
        mov     hGdiObject3, eax  

        invoke  CreateCompatibleDC, hDC1  
        mov     hDC3, eax  

        invoke  CreateCompatibleBitmap, hDC1, XLEN, YLEN  
        mov     hBitmap1, eax  

        invoke  SelectObject, hDC3, hBitmap1  
        mov     hGdiObject2, eax  

        stdcall CFProc1  
        stdcall CFProc2  
        stdcall CFProc4, hWnd  

        invoke  ReleaseDC,  hWnd, hDC1  
        invoke  SetTimer, hWnd, 1, ELAPSE, NULL  
        jmp     WindowProcRet  

.OnTimer  
        invoke  InvalidateRect, hWnd, NULL, FALSE  
        jmp     WindowProcRet  

.OnEraseBkgnd  
        mov     eax, 1  
        jmp     WindowProcRet  

.OnPaint  
        invoke  BeginPaint, hWnd, ps  
        mov     hDC1, eax  
        stdcall CFProc3  
        invoke  BitBlt, hDC3, 0, 0, XLEN, YLEN, hDC2, 0, 0, SRCCOPY  
        invoke  BitBlt, hDC1, 0, 0, XLEN, YLEN, hDC3, 0, 0, SRCCOPY  
        invoke  EndPaint, hWnd, ps  
        jmp     WindowProcRet  

.OnDestroy  
        invoke  KillTimer, hWnd, 1  
        invoke  SelectObject, hDC3, hGdiObject2  
        invoke  DeleteObject, hBitmap1  
        invoke  DeleteDC, hDC3  
        invoke  SelectObject, hDC2, hGdiObject3  
        invoke  DeleteDC, hDC2  
        invoke  DeleteObject, hGdiObject1  
        invoke  DestroyWindow, hWnd  
        invoke  PostQuitMessage, 0  

WindowProcRet  
        xor     eax, eax  

WindowProcExit  
        ret  
endp  


proc CFProc1  
        mov     esi, 0  
        mov     ecx, 1h

CFProc101  
        mov     eax, 20h  
        sub     eax, ecx  
        mov     byValue3 + esi, al  
        mov     byValue2 + esi, al  
        mov     byte byValue1 + esi, 28h  
        mov     byte byValue4 + esi, 0  
        add     esi, 4  
        loop    CFProc101  
        ret  
endp  


proc CFProc2  
  locals  
    dwVar1 dd ?  
  endl  
        mov     esi, TableH  
        mov     dwVar1, 2710h  
        mov     ecx, 0  
        fild    dwVar1  
        fld     st0  

CFProc201  
        mov     eax, 0CAh  
        sub     eax, ecx  
        add     eax, 2  
        mov     dwVar1, eax  
        fidiv   dwVar1  
        fstp    dword esi  
        wait  
        fld     st0  
        add     esi, 4  
        inc     ecx  
        cmp     ecx, 0C8h  
        jnz     CFProc201  
        ffree   st1  
        ffree   st0  
        fldpi  
        push    0B4h  
        fidiv   dword esp  
        pop     eax  
        fld     st0  
        mov     ecx, 0  

CFProc202  
        mov     ebx, ecx  
        shl     ebx, 2  
        push    ecx  
        fimul   dword esp  
        pop     eax  
        fsincos  
        fst     dword ebx + Table1  
        wait  
        push    140h  
        fidiv   dword esp  
        fstp    dword ebx + Table3  
        wait  
        fst     dword ebx + Table2  
        wait  
        fidiv   dword esp  
        fstp    dword ebx + Table4  
        wait  
        pop     eax  
        fld     st0  
        inc     ecx  
        cmp     ecx, 168h  
        jnz     CFProc202  
        ffree   st1  
        ffree   st0  
        ret  
endp  


proc CFProc3  
  locals  
    dwVar1  dd ?  
    dwVar2  dd ?  
    dwVar3  dd ?  
    dwVar4 dd ?  
    dwVar5 dd ?  
    dwVar6 dd ?  
    dwVar7 dd ?  
    dwVar8 dd ?  
    dwVar9 dd ?  
  endl  
        mov     eax, 500h  
        mov     dwVar1, eax  
        mov     eax, 0F9AFCh  
        mov     dwVar2, eax  
        mov     ecx, 0FFFFFEC0h  

CFProc301  
        mov     esi, dword bmi.bmiColors.rgbBlue  
        shl     esi, 2  
        push    ecx  
        fld     dword esi + Table4  
        fimul   dword esp  
        fld     dword esi + Table1  
        fsub    st0, st1  
        ffree   st1  
        fstp    dwVar3  
        wait  
        fld     dword esi + Table3  
        fimul   dword esp  
        fadd    dword esi + Table2  
        fstp    dwVar4  
        wait  
        pop     eax  
        mov     esi, ecx  
        shl     esi, 2  
        mov     eax, dwVar1  
        add     eax, esi  
        mov     dwVar5, eax  
        mov     eax, dwVar2  
        add     eax, esi  
        mov     dwVar6, eax  
        mov     dwVar9, 0FFFFFF9Ch  
        mov     ebx, 0  

CFProc302  
        mov     edi, ebx  
        shl     edi, 2  
        fld     dword edi + TableH  
        fmul    dwVar3  
        fiadd   dwValue1  
        fistp   dwVar7  
        wait  
        and     dwVar7, 1Fh  
        fld     dword edi + TableH  
        fmul    dwVar4  
        fiadd   dwValue2  
        fistp   dwVar8  
        wait  
        mov     edi, dwVar8  
        and     edi, 1Fh  
        shl     edi, 5  
        add     edi, dwVar7  
        shl     edi, 2  
        mov     eax, EdiTable + edi  
        movzx   esi, al  
        sub     esi, dwVar9  
        jge     CFProc303  
        xor     esi, esi  

CFProc303  
        movzx   edx, ah  
        sub     edx, dwVar9  
        jge     CFProc304  
        xor     edx, edx  

CFProc304  
        shl     edx, 8  
        shr     eax, 10h  
        sub     eax, dwVar9  
        jge     CFProc305  
        xor     eax, eax  

CFProc305  
        shl     eax, 10h  
        or      eax, edx  
        or      eax, esi  
        mov     edi, dword ppvBits  
        mov     esi, edi  
        add     edi, dwVar5  
        add     esi, dwVar6  
        mov     edi, eax  
        mov     edi+4, eax  
        mov     esi, eax  
        mov     esi+4, eax  
        add     dwVar5, 0A00h  
        sub     dwVar6, 0A00h  
        inc     dwVar9  
        inc     ebx  
        cmp     ebx, 0B4h  
        jnz     CFProc302  
        inc     ecx  
        cmp     ecx, 140h  
        jnz     CFProc301  
        add     dwValue2, 2  
        add     dwValue1, 2  
        mov     eax, dword bmi.bmiColors.rgbBlue  
        add     eax, 2  
        mov     ebx, 168h  
        xor     edx, edx  
        div     ebx  
        mov     dword bmi.bmiColors.rgbBlue, edx  
        ret  
endp  


proc CFProc4 uses ebx ecx edx esi edi, hWnd  
  locals  
    dwVar1 dd ?  
    dwVar2 dd ?  
    dwVar3 dd ?  
    X     dd ?  
    Y     dd ?  
  endl  
        invoke  GetSystemMetrics, SM_CYCAPTION  
        mov     dwVar1, eax  
        invoke  GetSystemMetrics, SM_CXFIXEDFRAME  
        mov     dwVar3, eax  
        shl     dwVar3, 1  
        invoke  GetSystemMetrics, SM_CYFIXEDFRAME  
        mov     dwVar2, eax  
        invoke  GetSystemMetrics, SM_CXSCREEN  
        mov     ecx, XLEN  
        add     ecx, dwVar3  
        sub     eax, ecx  
        shr     eax, 1  
        mov     X, eax  
        invoke  GetSystemMetrics, SM_CYSCREEN  
        mov     ecx, YLEN  
        add     ecx, dwVar1  
        add     ecx, dwVar2  
        sub     eax, ecx  
        mov     ecx, 3  
        sub     edx, edx  
        div     ecx  
        mov     Y, eax  
        mov     ebx, XLEN  
        add     ebx, dwVar3  ; cx  
        mov     eax, YLEN  
        add     eax, dwVar1  
        add     eax, dwVar2  ; cy  
        invoke  SetWindowPos, hWnd, HWND_TOP, X, Y, ebx, eax, SWP_NOZORDER  
        ret  
endp  

EdiTable  

dd 0x0006A6A06, 0x0006F6F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90 
dd 0x0006F6F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x00091006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00010006F, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x000606F90, 0x000606F60, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F 
dd 0x00090106F, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F 
dd 0x000606F90, 0x000606F90, 0x000606F91, 0x000606F90, 0x00090006F, 0x000606F91, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F91, 0x000606F90, 0x00090006F, 0x000606F91, 0x000606F90
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90 
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90 
dd 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F 
dd 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x0006F006F, 0x0006F006F, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90 
dd 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x0006F006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90 
dd 0x000900010, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90, 0x000900010, 0x000900010, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000900010 
dd 0x000900010, 0x000900010, 0x000606F90, 0x000900010, 0x000900010, 0x000900010, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90, 0x000900010, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90 
dd 0x000606F90, 0x0006F6F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90
dd 0x0006F6F90, 0x0006A6A06, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F91, 0x000606F90, 0x000606F91, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90
dd 0x0006A6A06, 0x000000000

.end start    
and that
Code:
format pe gui 4.0

include 'win32ax.inc'  

XLEN = 640  
YLEN = 400  
ELAPSE = 20  

struct RGBQUAD  
  rgbBlue     db ?  
  rgbGreen    db ?  
  rgbRed      db ?  
  rgbReserved db ?  
ends  

struct BITMAPINFO  
  bmiHeader BITMAPINFOHEADER  
  bmiColors RGBQUAD  
ends  

section '.data' data readable writeable  

strClass db 'CeilFloor', 0  
strTitle db 'Ceil&Floor Demo - c abreojosensamblador.net', 0  
strError db 'Bonkers!  I hate it when that happens.', 0  

wc WNDCLASS 0, WindowProc, 0, 0, 0, 0, 0, 0, 0, strClass  
bmi BITMAPINFO <28h, 289h, 0FFFFFE70h, 1, 20h, 0, 0, 0, 0, 0, 0>, <0, 0, 0, 0>
msg MSG  
ps PAINTSTRUCT  

dwValue1 dd 0  
dwValue2 dd 0  

hDC1 dd ?  
hDC2 dd ?  
hDC3 dd ?  

hBitmap1 dd ?  

hGdiObject1 dd ?  
hGdiObject2 dd ?  
hGdiObject3 dd ?  

ppvBits dd ?  

byValue1 db ?  
byValue2 db ?  
byValue3 db ?  
byValue4 db ?  

TableH db 0x329 dup ?
Table1 db 0x5a0 dup ?  
Table2 db 0x5a0 dup ?  
Table3 db 0x5a0 dup ?  
Table4 db 0x5a0 dup ?  

section '.code' code readable executable  

start  
        invoke  GetModuleHandle, NULL  
        mov     wc.hInstance, eax  
        mov     wc.lpfnWndProc, WindowProc  
        mov     wc.lpszClassName, strClass  

        invoke  GetStockObject, NULL  
        mov     wc.hbrBackground, eax  

        stdcall CFProc0  
        invoke  ExitProcess, 0  


proc CFProc0 uses ebx esi edi  
        invoke  LoadIcon, NULL, IDI_APPLICATION  
        mov     wc.hIcon, eax  

        invoke  LoadCursor, NULL, IDC_ARROW  
        mov     wc.hCursor, eax  

        invoke  RegisterClass, wc  
        test    eax, eax  
        jz      CeilFloorError  

        invoke  CreateWindowEx, 0, strClass, strTitle, WS_VISIBLE or WS_SYSMENU or WS_HREDRAW, \ 
                                640, 128, 640, 400, 0, 0, wc.hInstance, 0
        test    eax, eax  
        jz      CeilFloorError  

CFProc001  
        invoke  GetMessage, msg, NULL, 0, 0  
        cmp     eax, 1  
        jb      CeilFloorRet  
        jnz     CFProc001  

        invoke  TranslateMessage, msg  
        invoke  DispatchMessage, msg  

        jmp     CFProc001  

CeilFloorError  
        invoke  MessageBox, NULL, strError, strTitle, MB_ICONHAND  

CeilFloorRet  
        ret  
endp  


proc WindowProc uses ebx esi edi, hWnd, uMsg, wParam, lParam  
        mov     eax, uMsg  
        cmp     eax, WM_ERASEBKGND  
        jz      .OnEraseBkgnd  
        cmp     eax, WM_PAINT  
        jz      .OnPaint  
        cmp     eax, WM_DESTROY  
        jz      .OnDestroy  
        cmp     eax, WM_TIMER  
        jz      .OnTimer  
        cmp     eax, WM_CREATE  
        jz      .OnCreate  
        cmp     eax, WM_KEYFIRST  
        jz      .OnKeyFirst  

        invoke  DefWindowProc, hWnd, uMsg, wParam, lParam  
        jmp     WindowProcExit  

.OnKeyFirst  
        cmp     wParam, VK_ESCAPE  
        jnz     WindowProcRet  
        jmp     .OnDestroy  

.OnCreate  
        invoke  GetDC, hWnd  
        mov     hDC1, eax  
        invoke  CreateCompatibleDC, hDC1  
        mov     hDC2, eax  

        invoke  CreateDIBSection, hDC1, bmi, 0, ppvBits, 0, 0  
        mov     hGdiObject1, eax  

        invoke  SelectObject, hDC2, hGdiObject1  
        mov     hGdiObject3, eax  

        invoke  CreateCompatibleDC, hDC1  
        mov     hDC3, eax  

        invoke  CreateCompatibleBitmap, hDC1, XLEN, YLEN  
        mov     hBitmap1, eax  

        invoke  SelectObject, hDC3, hBitmap1  
        mov     hGdiObject2, eax  

        stdcall CFProc1  
        stdcall CFProc2  
        stdcall CFProc4, hWnd  

        invoke  ReleaseDC,  hWnd, hDC1  
        invoke  SetTimer, hWnd, 1, ELAPSE, NULL  
        jmp     WindowProcRet  

.OnTimer  
        invoke  InvalidateRect, hWnd, NULL, FALSE  
        jmp     WindowProcRet  

.OnEraseBkgnd  
        mov     eax, 1  
        jmp     WindowProcRet  

.OnPaint  
        invoke  BeginPaint, hWnd, ps  
        mov     hDC1, eax  
        stdcall CFProc3  
        invoke  BitBlt, hDC3, 0, 0, XLEN, YLEN, hDC2, 0, 0, SRCCOPY  
        invoke  BitBlt, hDC1, 0, 0, XLEN, YLEN, hDC3, 0, 0, SRCCOPY  
        invoke  EndPaint, hWnd, ps  
        jmp     WindowProcRet  

.OnDestroy  
        invoke  KillTimer, hWnd, 1  
        invoke  SelectObject, hDC3, hGdiObject2  
        invoke  DeleteObject, hBitmap1  
        invoke  DeleteDC, hDC3  
        invoke  SelectObject, hDC2, hGdiObject3  
        invoke  DeleteDC, hDC2  
        invoke  DeleteObject, hGdiObject1  
        invoke  DestroyWindow, hWnd  
        invoke  PostQuitMessage, 0  

WindowProcRet  
        xor     eax, eax  

WindowProcExit  
        ret  
endp  


proc CFProc1  
        mov     esi, 0  
        mov     ecx, 1h

CFProc101  
        mov     eax, 20h  
        sub     eax, ecx  
        mov     byValue3 + esi, al  
        mov     byValue2 + esi, al  
        mov     byte byValue1 + esi, 28h  
        mov     byte byValue4 + esi, 0  
        add     esi, 4  
        loop    CFProc101  
        ret  
endp  


proc CFProc2  
  locals  
    dwVar1 dd ?  
  endl  
        mov     esi, TableH  
        mov     dwVar1, 2710h  
        mov     ecx, 0  
        fild    dwVar1  
        fld     st0  

CFProc201  
        mov     eax, 0CAh  
        sub     eax, ecx  
        add     eax, 2  
        mov     dwVar1, eax  
        fidiv   dwVar1  
        fstp    dword esi  
        wait  
        fld     st0  
        add     esi, 4  
        inc     ecx  
        cmp     ecx, 0C8h  
        jnz     CFProc201  
        ffree   st1  
        ffree   st0  
        fldpi  
        push    0B4h  
        fidiv   dword esp  
        pop     eax  
        fld     st0  
        mov     ecx, 0  

CFProc202  
        mov     ebx, ecx  
        shl     ebx, 2  
        push    ecx  
        fimul   dword esp  
        pop     eax  
        fsincos  
        fst     dword ebx + Table1  
        wait  
        push    140h  
        fidiv   dword esp  
        fstp    dword ebx + Table3  
        wait  
        fst     dword ebx + Table2  
        wait  
        fidiv   dword esp  
        fstp    dword ebx + Table4  
        wait  
        pop     eax  
        fld     st0  
        inc     ecx  
        cmp     ecx, 168h  
        jnz     CFProc202  
        ffree   st1  
        ffree   st0  
        ret  
endp  


proc CFProc3  
  locals  
    dwVar1  dd ?  
    dwVar2  dd ?  
    dwVar3  dd ?  
    dwVar4 dd ?  
    dwVar5 dd ?  
    dwVar6 dd ?  
    dwVar7 dd ?  
    dwVar8 dd ?  
    dwVar9 dd ?  
  endl  
        mov     eax, 500h  
        mov     dwVar1, eax  
        mov     eax, 0F9AFCh  
        mov     dwVar2, eax  
        mov     ecx, 0FFFFFEC0h  

CFProc301  
        mov     esi, dword bmi.bmiColors.rgbBlue  
        shl     esi, 2  
        push    ecx  
        fld     dword esi + Table4  
        fimul   dword esp  
        fld     dword esi + Table1  
        fsub    st0, st1  
        ffree   st1  
        fstp    dwVar3  
        wait  
        fld     dword esi + Table3  
        fimul   dword esp  
        fadd    dword esi + Table2  
        fstp    dwVar4  
        wait  
        pop     eax  
        mov     esi, ecx  
        shl     esi, 2  
        mov     eax, dwVar1  
        add     eax, esi  
        mov     dwVar5, eax  
        mov     eax, dwVar2  
        add     eax, esi  
        mov     dwVar6, eax  
        mov     dwVar9, 0FFFFFF9Ch  
        mov     ebx, 0  

CFProc302  
        mov     edi, ebx  
        shl     edi, 2  
        fld     dword edi + TableH  
        fmul    dwVar3  
        fiadd   dwValue1  
        fistp   dwVar7  
        wait  
        and     dwVar7, 1Fh  
        fld     dword edi + TableH  
        fmul    dwVar4  
        fiadd   dwValue2  
        fistp   dwVar8  
        wait  
        mov     edi, dwVar8  
        and     edi, 1Fh  
        shl     edi, 5  
        add     edi, dwVar7  
        shl     edi, 2  
        mov     eax, EdiTable + edi  
        movzx   esi, al  
        sub     esi, dwVar9  
        jge     CFProc303  
        xor     esi, esi  

CFProc303  
        movzx   edx, ah  
        sub     edx, dwVar9  
        jge     CFProc304  
        xor     edx, edx  

CFProc304  
        shl     edx, 8  
        shr     eax, 10h  
        sub     eax, dwVar9  
        jge     CFProc305  
        xor     eax, eax  

CFProc305  
        shl     eax, 10h  
        or      eax, edx  
        or      eax, esi  
        mov     edi, dword ppvBits  
        mov     esi, edi  
        add     edi, dwVar5  
        add     esi, dwVar6  
        mov     edi, eax  
        mov     edi+4, eax  
        mov     esi, eax  
        mov     esi+4, eax  
        add     dwVar5, 0A00h  
        sub     dwVar6, 0A00h  
        inc     dwVar9  
        inc     ebx  
        cmp     ebx, 0B4h  
        jnz     CFProc302  
        inc     ecx  
        cmp     ecx, 140h  
        jnz     CFProc301  
        add     dwValue2, 2  
        add     dwValue1, 2  
        mov     eax, dword bmi.bmiColors.rgbBlue  
        add     eax, 2  
        mov     ebx, 168h  
        xor     edx, edx  
        div     ebx  
        mov     dword bmi.bmiColors.rgbBlue, edx  
        ret  
endp  


proc CFProc4 uses ebx ecx edx esi edi, hWnd  
  locals  
    dwVar1 dd ?  
    dwVar2 dd ?  
    dwVar3 dd ?  
    X     dd ?  
    Y     dd ?  
  endl  
        invoke  GetSystemMetrics, SM_CYCAPTION  
        mov     dwVar1, eax  
        invoke  GetSystemMetrics, SM_CXFIXEDFRAME  
        mov     dwVar3, eax  
        shl     dwVar3, 1  
        invoke  GetSystemMetrics, SM_CYFIXEDFRAME  
        mov     dwVar2, eax  
        invoke  GetSystemMetrics, SM_CXSCREEN  
        mov     ecx, XLEN  
        add     ecx, dwVar3  
        sub     eax, ecx  
        shr     eax, 1  
        mov     X, eax  
        invoke  GetSystemMetrics, SM_CYSCREEN  
        mov     ecx, YLEN  
        add     ecx, dwVar1  
        add     ecx, dwVar2  
        sub     eax, ecx  
        mov     ecx, 3  
        sub     edx, edx  
        div     ecx  
        mov     Y, eax  
        mov     ebx, XLEN  
        add     ebx, dwVar3  ; cx  
        mov     eax, YLEN  
        add     eax, dwVar1  
        add     eax, dwVar2  ; cy  
        invoke  SetWindowPos, hWnd, HWND_TOP, X, Y, ebx, eax, SWP_NOZORDER  
        ret  
endp  

EdiTable  

dd 0x0006A6A06, 0x0006F6F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90 
dd 0x0006F6F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x0006F6F90, 0x000606F90
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00090006F, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x00091006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x00090006F, 0x00090006F, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00010006F, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x000606F90
dd 0x00090006F, 0x000606F90, 0x000606F60, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x00090006F
dd 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x000606F90, 0x000606F90, 0x000606F90 
dd 0x000606F90, 0x00000906F, 0x000606F90, 0x000606F90, 0x000606F90, 0x00090006F, 0x00090006F, 0x00090006F     
Post 02 Jun 2013, 06:39
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16702
Location: In your JS exploiting you and your system
MIHIP: Please explain what the code does. Why three code sections that all look very similar? Did you change something?
Post 02 Jun 2013, 07:28
View user's profile Send private message Visit poster's website Reply with quote
MIHIP



Joined: 14 Feb 2013
Posts: 130
revolution wrote:
MIHIP: Please explain what the code does. Why three code sections that all look very similar? Did you change something?

Now program look like blue, and slowly =)
Post 03 Jun 2013, 07:32
View user's profile Send private message Visit poster's website Reply with quote
Sasha



Joined: 17 Nov 2011
Posts: 93
Are you serious ?
Quote:

Code:
.OnEraseBkgnd   
        mov     eax, 1   
        jmp     WindowProcRet
    


Code:
WindowProcRet   
        xor     eax, eax 

WindowProcExit   
        ret  
    


Btw, the great example of doing such things without OpenGL or DX. I'm working on something in common.
Post 03 Jun 2013, 18:12
View user's profile Send private message Reply with quote
avcaballero



Joined: 02 Feb 2004
Posts: 175
Location: Madrid - Spain
Today, a set of fractals and chaotic systems. Some of them are 64 bits, other 32.

I have been thinking, if you are so fond of unassembling programs, maybe I should not release my codes, it would be an insult to your aptitudes, much less my notes, etc. Isn't it?

Regards


Description:
Download
Filename: TinyC.zip
Filesize: 30.31 KB
Downloaded: 935 Time(s)


_________________
Siempre aprendiendo
Post 23 Jun 2013, 20:29
View user's profile Send private message Visit poster's website Reply with quote
questlima



Joined: 27 Aug 2014
Posts: 37
OMG that's very awesome i am impressed, no offense but this is an Examples and Tutorials thread without the source its kinda useless but thanks to all who posted the source btw so its kinda possible to make a game with Assembly YES Laughing Laughing

_________________
Linux command are not what you intended to
learn but your were forced to learn it, without it
you will be like a sitting duck on your beautiful newly installed Linux desktop:)


Last edited by questlima on 29 Aug 2014, 08:02; edited 1 time in total
Post 29 Aug 2014, 07:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16702
Location: In your JS exploiting you and your system
questlima wrote:
... so its kinda possible to make a game with Assembly YES Smile
No. It is definitely possible.
Post 29 Aug 2014, 07:56
View user's profile Send private message Visit poster's website Reply with quote
questlima



Joined: 27 Aug 2014
Posts: 37
revolution wrote:
questlima wrote:
... so its kinda possible to make a game with Assembly YES Smile
No. It is definitely possible.


i don't quit get it *NO. It is definitely possible* is that no or yes Laughing anyway i think it is possible but it will be kinda challenging, 3D games written in pure ASM will be much faster than shoemaker's F1 Laughing

_________________
Linux command are not what you intended to
learn but your were forced to learn it, without it
you will be like a sitting duck on your beautiful newly installed Linux desktop:)
Post 29 Aug 2014, 08:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16702
Location: In your JS exploiting you and your system
You asked if it was kinda possible. I said it was definitely possible.
Post 29 Aug 2014, 08:27
View user's profile Send private message Visit poster's website Reply with quote
questlima



Joined: 27 Aug 2014
Posts: 37
revolution wrote:
You asked if it was kinda possible. I said it was definitely possible.


That's good news Very Happy thanks

_________________
Linux command are not what you intended to
learn but your were forced to learn it, without it
you will be like a sitting duck on your beautiful newly installed Linux desktop:)
Post 29 Aug 2014, 08:38
View user's profile Send private message Reply with quote
80286



Joined: 01 May 2015
Posts: 15
Hello there!

TODAY I started with FASM to become familiar with 64bit-Assembler
(about 30 years after my first steps in 6502/6510-assembler, about 25 years after my first steps in 8086Assembler and about 20 years after my last line of assemblercode).

I tried all the examples of FASM (Win32 on XP; more will follow) and some others from this forum. Actually I found this CeilFloor.ASM that assembles to a cool demo Smile

Now I am wondering who is the author - due to my limited english I can't really follow the discussion. May I say "Thanks for the cool stuff!" or do I have to delete the source to prevent conflicts with law ?
Post 02 May 2015, 11:15
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16702
Location: In your JS exploiting you and your system
80286 wrote:
Now I am wondering who is the author
If the author is not stated in the source then I guess it is anonymous.
80286 wrote:
... do I have to delete the source to prevent conflicts with law ?
That would depend upon which country you are in, but in general, no you won't have to delete anything. If in doubt you might want to ask a lawyer though.
Post 02 May 2015, 11:27
View user's profile Send private message Visit poster's website Reply with quote
avcaballero



Joined: 02 Feb 2004
Posts: 175
Location: Madrid - Spain
It is a lot of fun. I am the author or I should be. I have coded the program and one of the forum user (Walter) cracked it and extracted the source code, putting special care of not including my name in it. Fortunately the moderators of the forum not only reproved that, but thank him, even have removed "stupid" posts Smile

Never mind, you can use it, I have coded it to my own learn and in the hope that can be useful to anyone, in fact I have published it and many other demos as a tutorial in my site. I must say that google has decided that those programs are souspicius of viruses Smile because it is not usual to program such a kind of programs, in such kind of way, i suppose. This is interesting, because only rude people can dare to look Smile

Don't you believe that it is fun it is now considered as anonymous? Never mind, all for you.

Won't disturb anymore, sorry, sorry.
Post 10 Jun 2015, 11:25
View user's profile Send private message Visit poster's website Reply with quote
80286



Joined: 01 May 2015
Posts: 15
avcaballero wrote:
I am the author [ ... ] you can use it


Thank you for clearing that.
It's really a cool demo coded in assembler Smile
Post 10 Jun 2015, 13:52
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

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