: K-Meleon Forum
K-Meleon development related discussions.
[quote=jcarlock] [quote=jcarlock] [QUOTE date="2013.04.01"] Hello! Not sure, because I do not speak English well completely. Before giving my doubts, I want to be sure of this. These converting C code to MASM K-Meleon? For desert, I'm no programmer but it seems very interesting topic [/QUOTE] [/quote] It looks like I need to learn a lot more than just the NASM language. This Phorum language seems easy enough, but forgive me, please, as I start to learn it IF I mistakenly post something improperly... Nathan Baker made a comment at the following link providing some useful information about NNTP and it requires some research, not only on my behalf, but others I suspect too, so I post the information here as it ends up very helpful. [code] [url]http://sourceforge.net/projects/nasmx/files/[/url] [url]http://groups.google.com/group/alt.lang.asm/browse_thread/thread/e57944a4667b8815[/url] [/code] The following code comes from a file named demo1.asm or demo1.nas and it comes from the NASMX compiler collection. I changed some of the spacing to 8-character count tabs instead of 2-character count spacings. I provide it for [code] ;// DEMO1.ASM ;// ;// Copyright (C)2005-2011 The NASMX Project ;// ;// This is a fully UNICODE aware, type-defined demo that demonstrates ;// using NASMX typedef system to help make your code portable between ;// 32 and 64-bit systems using either ASCII or UNICODE ;// ;// Contributors: ;// Bryant Keller ;// Rob Neff ;// Edited_By: ;// James W. Carlock (2013.03.13, Wednesday) ;// STILL_WORKING_ON_CONVERTING_PHORUM_TO_DISPLAY_USE_TABS ;// Demonstration of using a message-box inside MS-WINDOWS. ;// %include '\nasm\021007\demos\windem01.inc' entry demo1 \[section .text] ;// Define our function procedure expecting 2 arguments of ptrdiff_t size. ;// Google size_t and ptrdiff_t to understand why these typedefs were chosen. ;// If we wanted to make this function global we would use the PROTO macro ;// which would also allow us to define the procedure later in the source ;// instead of requiring it here before invoke'ing it in proc demo1 proc my_p, ptrdiff_t szContent, ptrdiff_t szTitle locals none ;// note that even though the formal parameter names are identical to the data section names ;// they are referenced differently as the following line shows. Make sure you don't forget ;// to include the leading dot when referencing procedure parameters and local variables. ;// The dot notation is used to distinguish between local and global vars. invoke MessageBox, NULL, ptrdiff_t [argv(.szContent)], ptrdiff_t [argv(.szTitle)], MB_OK endproc ;// return from procedure happens automatically here ;// the start of our program as defined with the ENTRY macro proc demo1, ptrdiff_t argcount, ptrdiff_t cmdline locals none invoke my_p, szContentTwo, szTitleTwo invoke MessageBox, NULL, szContent, szTitle, MB_OK invoke ExitProcess, NULL endproc \[section .data] szTitle: declare(NASMX_TCHAR) NASMX_TEXT('Demo1'), 0x0 szTitleTwo: declare(NASMX_TCHAR) NASMX_TEXT('Demo1 Procedure'), 0x0 szContent: declare(NASMX_TCHAR) NASMX_TEXT('Hello from the Application!'), 0x0 szContentTwo: declare(NASMX_TCHAR) NASMX_TEXT('Hello from the Procedure!'), 0x0 [/code] BATCH/CMD_FILE_TO_COMPILE_WITH_NASM [code] @echo off REM REM demo1.bat or demo1.cmd REM set file="DEMO1" if not exist %file%.asm goto errasm if exist %file%.obj del %file%.obj nasm.exe -f win32 %file%.asm -o %file%.obj -l %file%.lst if errorlevel 1 goto errasm GoLink.exe /entry _main DEMO1.obj kernel32.dll user32.dll if errorlevel 1 goto errlink goto TheEnd :errlink echo _ echo Link error pause goto TheEnd :errasm echo _ echo Assembly Error pause goto TheEnd :TheEnd echo _ [/code] Please, NOTE, that these files were originally downloaded with the NASMX compiler collection for Microsoft Windows. They built the compiler and added a bunch of Microsoft Windows MACROS to the ORIGINAL NASM compiler for Windows. And they use % directives instead of the C # directive stuff. Those that compile with C and later know this, but these details get provided to help those out that do not know much. I hope it helps. Please, NOTE, also, recently, while in Montana I witnessed DEAD people walking around and while I found it hard to believe, I researched the names of the individuals that died and because at least FOUR people wrote about the resurrection of Jesus, I believe in the truth and know the truth about life after death. People may call me crazy, but forget CRAZY. I tell you the truth. Doctors keep telling me, "You should be dead." But here I live, sitting in front of a computer posting the truth, that Jesus "lives" as I type these words, even though I possibly never witnessed "Jesus". I believe he lives, whether in a sleep or awake, the fact that more than four people wrote about seeing Jesus means something, and I now write about him too. May we all witness the love of "Jesus" and if not, may we all walk and work with the love that he showed and provide a true presentation of proper ways to act. Tears mean more than truth and honesty. Love means truth, honesty and a persisting to helping others. We do not need to see HIM to act properly and we hold no need to witness a miracle to know the truth, although it greatly helps. Life means, "Show the love, demonstrate the love, know the love." Again, cheers![/quote]
K-Meleon forum is powered by