Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Romper Room / Re: Intel SPMD Program Compiler
« Last post by TimoVJL on Today at 02:55:33 AM »
converted to C99
Code: [Select]
#include <complex.h>
#include <stdio.h>

int main(void) {
int max_row = 22, max_column = 78, max_iteration = 20;
for (int row = 0; row < max_row; ++row) {
for (int column = 0; column < max_column; ++column) {
//_Fcomplex z = {};
float _Complex z = 0 + 0 * I;
//_Fcomplex  c = { (float)column * 2 / max_column - 1.5f , (float)row * 2 / max_row - 1.0f };
float _Complex c = ((float)column * 2 / max_column - 1.5f) + ((float)row * 2 / max_row - 1.0f) * I;
int iteration = 0;
while ((cabsf(z) < 2) && (++iteration < max_iteration))
{
//z = cpowf(z, { 2.0f, 0 });
z = cpowf(z, 2.0f + 0 * I);
//z = { real(z) + real(c) , imag(z) + imag(c) };
z = (crealf(z) + crealf(c)) + (cimagf(z) + cimagf(c)) * I;
}
printf("%c", iteration == max_iteration ? '#' : '.');
}
printf("\n");
}
}
and bit more
Code: [Select]
#include <complex.h>
#include <stdio.h>

int main(void) {
int max_row = 22, max_column = 78, max_iteration = 20;
for (int row = 0; row < max_row; ++row) {
for (int column = 0; column < max_column; ++column) {
float _Complex z = 0;
float _Complex c = ((float)column * 2 / max_column - 1.5f) + ((float)row * 2 / max_row - 1.0f) * I;
int iteration = 0;
while ((cabsf(z) < 2) && (++iteration < max_iteration))
z = z * z + c;
printf("%c", iteration == max_iteration ? '#' : '.');
}
printf("\n");
}
}
12
ObjAsm / DebugCenter colors
« Last post by HSE on Today at 02:06:53 AM »
Hi all!

Here some modifications to obtain a better personalization:
  • Debug.inc
Code: [Select]
;Debug coloring setup
;DBG_COLOR_BACKGROUND  equ   $RGB(255,255,255)
DBG_COLOR_BACKGROUND  equ   $RGB(000,000,048)
DBG_COLOR_TEXT        equ   $RGB(230,230,230)     ;for dark background
;DBG_COLOR_TEXT        equ   $RGB(000,000,000)     ;for bright background
DBG_COLOR_COMMENT     equ   00B7F7F5h;$RGB(208,208,208)

   *  *  *

DBG_COLOR_LINE equ   $RGB(150,150,255)

DBG_FONT_TEXT        textequ <Fixedsys>   
;DBG_FONT_TEXT        textequ <Courier New>   
  • DebugCenter_ChildTxt.inc
Code: [Select]
Method DbgMdiChildTxt.OnCreate, uses xsi, wParam:WPARAM, lParam:LPARAM
  SetObject xsi
  invoke CreateWindowEx, WS_EX_LEFT or WS_EX_CLIENTEDGE or WS_EX_ACCEPTFILES, \
                         offset szRichEdit20, NULL, EDTSTYLE, \
                         0, 0, 10, 10, [xsi].hWnd, RICHEDITID, hInstance, NULL
  mov [xsi].hEdit, xax
 
  invoke SendMessage, xax, EM_SETEVENTMASK, 0, ENM_SELCHANGE
  ;------------------------------------------------------------------
  invoke SendMessage, [xsi].hEdit, EM_SETBKGNDCOLOR, 0, DBG_COLOR_BACKGROUND
  ;------------------------------------------------------------------

  mov [xsi].pEdtIptor, $New(REdtIptor)
  OCall xax::REdtIptor.Init, xsi, [xsi].hEdit, offset szPropREdtIptor
  xor eax, eax
MethodEnd
  • DebugCenter_Main.inc
Code: [Select]
Method DebugCenter.OnCreate, uses xbx xsi, wParam:WPARAM, lParam:LPARAM

    *  *  *

1309:
  FillString LF.lfFaceName, <DBG_FONT_TEXT>
 
    *  *  *
MethodEnd

Method DebugCenter.OnCopyData, uses xbx xdi xsi, wParam:WPARAM, lParam:LPARAM

*  *  *
1180:
;m2z CFD.crTextColor
  mov CFD.crTextColor, DBG_COLOR_LINE
*  *  *
MethodEnd
    13
    Romper Room / Re: Intel SPMD Program Compiler
    « Last post by AW on Today at 01:56:06 AM »
    Poor man's Mandelbrot  :sad:

    Code: [Select]
    ..............................................................................
    ......................................................#.......................
    ..................................................########....................
    .................................................##########...................
    ....................................##.#....##################.###............
    ....................................####################################......
    ................................########################################......
    ...............................############################################...
    .............###.#####.#.......###########################################....
    .........#.#################..############################################....
    .....#.#..################################################################....
    ######################################################################........
    .....#.#..################################################################....
    .........#.#################..############################################....
    .............###.#####.#.......###########################################....
    ...............................############################################...
    ................................########################################......
    ....................................####################################......
    ....................................##.#....##################.###............
    .................................................##########...................
    ..................................................########....................
    ......................................................#.......................

    Code (MSVC, original here):

    Code: [Select]
    #include <complex.h>
    #include <stdio.h>

    int main() {
    int max_row = 22, max_column = 78, max_iteration = 20;
    for (int row = 0; row < max_row; ++row) {
    for (int column = 0; column < max_column; ++column) {
    _Fcomplex z = {};
    _Fcomplex  c = { (float)column * 2 / max_column - 1.5f , (float)row * 2 / max_row - 1.0f };
    int iteration = 0;
    while ((cabsf(z) < 2) && (++iteration < max_iteration))
    {
    z = cpowf(z, { 2.0f, 0 });
    z = { real(z) + real(c) , imag(z) + imag(c) };
    }
    printf("%c", iteration == max_iteration ? '#' : '.');
    }
    printf("\n");
    }
    }

    14
    UASM Assembler Development / Re: Unified Extensible Firmware Interface (UEFI) Example
    « Last post by johnsa on October 17, 2019, 10:44:46 PM »

    Hi,

    The includes, library examples and guide are now complete and available on the website. Please note this only works with UASM 2.50 which will be available soon as binary packages. In the meantime the 2.50 branch is available in Github.

    Please let me know if you have any reports or questions and happy UEFI coding in UASM! :) (I know I have been)

    John
    15
    The Soap Box / Re: ucrt
    « Last post by TimoVJL on October 17, 2019, 07:59:24 AM »
    It come with NetFramework 4.8 ?

    https://dotnet.microsoft.com/download/dotnet-framework/net48 runtime

    Offline installer, netfx_Full.mzz

    PS: check *_clr0400.dll

    EDIT: startup code for ucrtbase.dll
    Code: [Select]
    extern int*    __cdecl __p___argc (void);
    extern char*** __cdecl __p___argv (void);
    extern char*** __cdecl __p__environ (void);
    //extern wchar_t*** __cdecl __p___wargv(void);
    extern int _configure_narrow_argv(int);
    //extern int _configure_wide_argv(int);

    int main(int argc, char **argv);

    void __cdecl mainCRTStartup(void)
    {
    _configure_narrow_argv(1);
    int __argc = *__p___argc();
    char** __argv = *__p___argv();
    //char**__env = *__p__environ();
    exit(main(__argc, __argv));
    }
    16
    The Soap Box / Re: ucrt
    « Last post by Vortex on October 17, 2019, 07:38:06 AM »
    Hi Timo,

    Thanks. How can I get that Dll?
    17
    Game Development / Re: SWGPTG - 02 - Drawing Basic Shapes
    « Last post by caballero on October 17, 2019, 07:18:44 AM »
    To compensate the scam's thread, here it is a tiny game with source, one of the first in history. I believe that Mr Bill Gates did it some decades ago. TinyC source code, 8 kb :thumbsup:

    And a great song
    18
    The Soap Box / Re: GLOBAL WARMING IS A SCAM - David Icke | London Real
    « Last post by caballero on October 17, 2019, 07:09:52 AM »
    Please, excuse me

    DGT is the General Directorate of Traffic of Spain, an autonomous government agency under the Ministry of Interior, responsible for the implementation of the road policy on state-owned roads in Spain.

    The general director of the DGT, Pere Navarro, has just given an amazing conference. Regarding the electric car:
    "We made the mistake of selling a product that we did not have on the shelf, we have nowhere to plug it in and the price is very expensive. We are all wrong."

    Of course, it seems that it is ecological because it does not emit gases, but of course, first you have to create electricity. Where? In nuclear power plants? It will also be necessary to accumulate electricity in a huge car battery that must produce an unhealthy electromagnetic field, apart from the rare metals needed to manufacture them, whose extraction is super polluting. Extrapolate this to mass consumption worldwide.

    https://www.elmundo.es/motor/2019/10/15/5da5abbb21efa0cd798b4616.html


    Well, it's spectacular, isn't it? "We were wrong," says the good man. But I suppose they continue with the process of changing the car park for the electric car.
    19
    The Soap Box / Re: ucrt
    « Last post by TimoVJL on October 17, 2019, 06:26:26 AM »
    ucrtbase_clr0400.dll don't use those stubs/forwarders.
    20
    The Soap Box / Re: ucrt
    « Last post by Vortex on October 17, 2019, 04:59:52 AM »
    ucrtbase.dll is another effort of M$ trying to complicate things :

    Code: [Select]
    \PellesC\bin\podump.exe /IMPORTS ucrtbase.dll | findstr ".dll"

    Dump of ucrtbase.dll

            api-ms-win-core-string-l1-1-0.dll
            api-ms-win-core-errorhandling-l1-1-0.dll
            api-ms-win-core-file-l1-1-0.dll
            api-ms-win-core-timezone-l1-1-0.dll
            api-ms-win-core-namedpipe-l1-1-0.dll
            api-ms-win-core-handle-l1-1-0.dll
            api-ms-win-core-file-l2-1-0.dll
            api-ms-win-core-heap-l1-1-0.dll
            api-ms-win-core-libraryloader-l1-1-0.dll
            api-ms-win-core-synch-l1-1-0.dll
            api-ms-win-core-processthreads-l1-1-0.dll
            api-ms-win-core-processenvironment-l1-1-0.dll
            api-ms-win-core-localization-l1-2-0.dll
            api-ms-win-core-datetime-l1-1-0.dll
            api-ms-win-core-sysinfo-l1-1-0.dll
            api-ms-win-core-synch-l1-2-0.dll
            api-ms-win-core-console-l1-1-0.dll
            api-ms-win-core-debug-l1-1-0.dll
            api-ms-win-core-processthreads-l1-1-1.dll
            api-ms-win-core-file-l1-2-0.dll
            api-ms-win-core-profile-l1-1-0.dll
            api-ms-win-core-memory-l1-1-0.dll
            api-ms-win-core-util-l1-1-0.dll
            api-ms-win-core-rtlsupport-l1-1-0.dll
            api-ms-win-core-interlocked-l1-1-0.dll

    Code: [Select]
    \PellesC\bin\podump.exe /IMPORTS C:\WINDOWS\system32\msvcrt.dll | findstr ".dll"

    Dump of C:\WINDOWS\system32\msvcrt.dll

            KERNEL32.dll
            ntdll.dll
    Pages: 1 [2] 3 4 ... 10