The MASM Forum

64 bit assembler => ASMC Development => Topic started by: nidud on June 20, 2018, 09:31:07 AM

Title: Asmc Command-Line Reference
Post by: nidud on June 20, 2018, 09:31:07 AM
Asmc Command-Line Reference (https://github.com/nidud/asmc/blob/master/doc/command/readme.md)

Assembles and links one or more assembly-language source files. The command-line options are case sensitive.

ASMC [[options]] filename [[ [[options]] filename]]

options

         The options listed in the following table.

/[0|1|..|10][p]Set CPU: 0=8086 (default), 1=80186, 2=80286, 3=80386, 4=80486, 5=Pentium,6=PPro,7=P2,8=P3,9=P4,10=x86-64. [p] allows privileged instructions.
/assert (http://masm32.com/board/index.php?topic=902.msg60709#msg60709)Generate .assert(code). Same as .assert:on.
/autostack[-auto] [[option win64:[NO]AUTO]] Calculate required stack space for arguments.
/binGenerate plain binary file.
/CsPush user registers before stack-frame is created in a proc.
/coffGenerate COFF format object file.
/CpPreserves case of all user identifiers.
/CuMaps all identifiers to upper case (default).
/cuiLink switch used with /pe -- subsystem:console (default).
/CxPreserves case in public and extern symbols.
/Dsymbol[[=value]]Defines a text macro with the given name. If value is missing, it is blank. Multiple tokens separated by spaces must be enclosed in quotation marks.
/enumberSet error limit number.
/elfGenerate 32-bit ELF object file.
/elf64Generate 64-bit ELF object file.
/EPGenerates a preprocessed source listing (sent to STDOUT). See /Sf.
/eqDon't display error messages.
/Fd[file]Write import definition file.
/FifileForce file to be included.
/Fl[[filename]]Generates an assembled code listing. See /Sf.
/FofilenameNames an object file.
/FwfilenameSet errors file name.
/FPiGenerates emulator fix-ups for floating-point arithmetic (mixed language only).
/FPi8780x87 instructions (default).
/fpcDisallow floating-point instructions.
/fpnSet FPU: 0=8087, 2=80287, 3=80387.
/GcSpecifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL.
/GdSpecifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C.
/GeEmit a conditional _chkstk() inside the prologue.
/guiLink switch used with /pe -- subsystem:windows.
/Gv (http://masm32.com/board/index.php?topic=6454.msg77006#msg77006)Specifies use of VECTORCALL-style function calling and naming conventions.
/GzSpecifies use of STDCALL-style function calling and naming conventions. Same as OPTION LANGUAGE:STDCALL.
/homeparams (http://masm32.com/board/index.php?topic=6454.msg77006#msg77006)[-home] [[option win64:[NO]SAVE]] Forces parameters passed in registers to be written to their locations on the stack upon function entry.
/IpathnameSets path for include file.
/m[t|s|c|m|l|h|f]Set memory model.
/mzGenerate DOS MZ binary file.
/ncnameSet class name of code segment.
/ndnameSet name of data segment.
/nmnameSet name of module.
/ntnameSet name of text segment.
/nolibIgnore INCLUDELIB directive.
/nologoSuppresses messages for successful assembly.
/omfGenerates object module file format (OMF) type of object module.
/peGenerate PE binary file, 32/64-bit.
/pf (http://masm32.com/board/index.php?topic=5969.msg68900#msg68900)Preserve Flags (Epilogue/Invoke).
/qSuppress copyright message.
/rRecurse subdirectories with use of wild args.
/SaTurns on listing of all available information.
/safeseh (https://github.com/nidud/asmc/blob/master/source/asmc/regress/src/safeseh/safeseh.asm)Marks the object as either containing no exception handlers or containing exception handlers that are all declared with SAFESEH.
/SfAdds first-pass listing to listing file.
/SgTurns on listing of assembly-generated code.
/SnTurns off symbol table when producing a listing.
/Sp[n]Set segment alignment.
/stackalign[-stac] [[option win64:[NO]ALIGN]] Align stack variables to 16-byte.
/swcSpecifies use of C-style .SWITCH convention (default).
/swnNo jump-table creation in .SWITCH.
/swpSpecifies use of Pascal-style .SWITCH convention (auto break).
/swrAllows use of register [E]AX or R11 in .SWITCH code.
/swtAllows use of jump-table creation in .SWITCH code (default).
/SxTurns on false conditionals in listing.
/wSame as /W0.
/WlevelSets the warning level, where level = 0, 1, 2, or 3.
/win64Generate 64-bit COFF object.
/ws (http://masm32.com/board/index.php?topic=5942.0)[CodePage]Store quoted strings as Unicode. See OPTION WSTRING.
/WXReturns an error code if warnings are generated.
/XIgnore INCLUDE environment path.
/zcwNo decoration for C symbols.
/ZdGenerates line-number information in object file.
/ZfMake all symbols public.
/zf[0|1][/color]Set FASTCALL type: MS/OW.
/ZgGenerate code to match Masm.
/Zi[0|1|2|3|5|8]Add symbolic debug info.
/zlcNo OMF records of data in code.
/zldNo OMF records of far call.
/zlfSuppress items in COFF: No file entry.
/zlpSuppress items in COFF: No static procs.
/zlsSuppress items in COFF: No section aux entry.
/ZmEnable MASM 5.10 compatibility.
/ZneDisable non Masm extensions.
/Zp[[alignment]]Packs structures on the specified byte boundary.
/ZsPerform syntax check only.
/zt<0|1|2>[/color]Set STDCALL decoration.
/Zv8Enable Masm v8+ PROC visibility.
/zzeNo export symbol decoration.
/zzsStore name of start address.

filename

         The name of the file.

Environment Variables

INCLUDESpecifies search path for include files.
ASMCSpecifies default command-line options.
TEMPSpecifies path for temporary files.

ASMC64

ASMC64 is similar to ML64 so it does not understand CPU or MODEL directives. The /win64 switch is silently ignored but the rest of the switches marked green will generate an error if used.
Title: Re: Asmc Command-Line Reference
Post by: Vortex on March 13, 2019, 06:20:03 AM
Hi nidud,

Regarding the directive file linkw.lnk :

Code: [Select]
# Win32 console application
system begin con_32
    option  quiet
    libpath %ASMCDIR%\lib
    library libc,kernel32,user32
    symt    _cstart
    format  windows pe ^
    runtime console=4.0
end

If I am not wrong, symt is the directive informing the linker about the entry point of an executable.

I can link an object module like the following :

Code: [Select]
\asmc-master\bin\linkw format windows pe runtime console option NORelocs symt _cstart file Hello.obj
If I remove the directive symt, I get the following message :

Code: [Select]
Warning! W1023: no starting address found, using 00401000
Reading the manul JWlink.chm supplied with the source code of Asmc :

Quote
Formats:  All
The SYMTRACE directive instructs JWlink to print a list of all modules that reference the specified symbols.  The format of this directive ( short form SYMT ) is

         SYMTRACE  symbol_name{,symbol_name}

where <symbol_name> is the name of a symbol.

The information is displayed in the map file ( see the MAP option ).

Example:

     jwlink system my_os op map file test lib math symt sin, cos

JWlink will list, in the map file, all modules that reference the symbols "sin" and "cos".

Also see the MODTRACE directive.

linkw does not list any symbol in my test above. What's the correct usage of the directive symt? Could you confirm that it's used to specify the entry point? Thanks.
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 13, 2019, 10:59:55 AM
What it does is to flag a symbol to keep track of references to so it's more like a forced inclusion of a module. In this case _cstart is an actual entry point (and calls main) but symt _strtok will give the same error.

The help info is somewhat right in that the modules added will also end up in the map file, but the extended listing explanation seems a bit strange.
Title: Re: Asmc Command-Line Reference
Post by: Vortex on March 16, 2019, 06:07:01 AM
Hi nidud,

Thanks. I found the run-time module defining the symbol _cstart.
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 16, 2019, 10:11:00 PM
There's currently 5 startup modules in lib32 (https://github.com/nidud/asmc/tree/master/source/libs/lib32/startup): Console and GUI (A/W) modules, and one for Watcom C. The names of the entry points differ based on compiler/linker used.
Code: [Select]
_mainCRTStartup:  - link    - main() - C
_cstart:   - linkw
_wmainCRTStartup: - link    - wmain() - C
_wcstart:         - linkw
_WinStart:   - link(w) - WinMain()  - stdcall
_wWinStart:       - link(w) - wWinMain() - stdcall
_cstart_:   - wlink   - main_() - watcall
Title: Re: Asmc Command-Line Reference
Post by: Vortex on March 17, 2019, 05:50:33 AM
Linking an object module with linkw :

Code: [Select]
linkw format windows pe option NORelocs option start=_cstart file Hello.obj
Title: Re: Asmc Command-Line Reference
Post by: LiaoMi on March 03, 2021, 05:02:04 AM
Hi nidud,

I am trying to compile the code (http://masm32.com/board/index.php?topic=9071.0) using acmc, my parameters look like
Code: [Select]
@echo - Assembling project...
%UASM%\asmc /c /coff /Cp -Zp8 /Cu /nologo /W2 -Zi0 -Zi1 -Zi2 -Zi3 -Zi5 -Zi8 /Zd -Zf /Fl"%appname%_%stamp%" %appname%.asm >> %appname%_%stamp%.txt

I use SDK from TouEnMasm, I get an error for a specific word - "name", where can I see the whole list of reserved words ?! Is the "name" on the reserved list ?! Is it possible to reassign reserved words dynamically ?!
Code: [Select]
C  name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8 PROTO :FOLDERID_ProgramFilesX64 ,:0x6d809377 ,:0x6af0 ,:0x444b ,:0x89 ,:0x57 ,:0xa3 ,:0x77 ,:0x3f ,:0x02 ,:0x20 ,:0x0e
                           C:\masm64\sdkrc100\um\knownfolders.inc(109) : error A2008: syntax error : name
                            C:\masm64\sdkrc100\um\knownfolders.inc(109): Included by
                             C:\masm64\sdkrc100\um\shlguid.inc(503): Included by
                              C:\masm64\sdkrc100\um\ShlObj.inc(85): Included by
                               security.asm(20): Main line code

Thank you!  :thup:
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 03, 2021, 07:38:00 AM
I am trying to compile the code (http://masm32.com/board/index.php?topic=9071.0)

I guess that is a Microsoft sample (https://docs.microsoft.com/en-us/windows/win32/secauthz/creating-a-security-descriptor-for-a-new-object-in-c--) -- Creating a Security Descriptor for a New Object in C++.
Code: [Select]
include windows.inc
include winreg.inc
include stdio.inc
include aclapi.inc
include tchar.inc

.code

main proc

    .new dwRes:DWORD, dwDisposition:DWORD
    .new pEveryoneSID:PSID = NULL
    .new pAdminSID:PSID = NULL
    .new pACL:PACL = NULL
    .new pSD:PSECURITY_DESCRIPTOR = NULL
    .new ea[2]:EXPLICIT_ACCESS
    .new SIDAuthWorld:SID_IDENTIFIER_AUTHORITY ;= SECURITY_WORLD_SID_AUTHORITY
    .new SIDAuthNT:SID_IDENTIFIER_AUTHORITY ;= SECURITY_NT_AUTHORITY
    .new sa:SECURITY_ATTRIBUTES
    .new lRes:LONG
    .new hkSub:HKEY = NULL

    mov dword ptr SIDAuthWorld,0
    mov SIDAuthWorld.Value[4],0
    mov SIDAuthWorld.Value[5],1
    mov dword ptr SIDAuthNT,0
    mov SIDAuthNT.Value[4],0
    mov SIDAuthNT.Value[5],5

    ;; Create a well-known SID for the Everyone group.
    .if !AllocateAndInitializeSid(&SIDAuthWorld, 1,
                     SECURITY_WORLD_RID,
                     0, 0, 0, 0, 0, 0, 0,
                     &pEveryoneSID)

        _tprintf("AllocateAndInitializeSid Error %u\n", GetLastError())
        jmp Cleanup
    .endif

    ;; Initialize an EXPLICIT_ACCESS structure for an ACE.
    ;; The ACE will allow Everyone read access to the key.
    ZeroMemory(&ea, 2 * sizeof(EXPLICIT_ACCESS))
    mov ea[0].grfAccessPermissions,KEY_READ
    mov ea[0].grfAccessMode,SET_ACCESS
    mov ea[0].grfInheritance,NO_INHERITANCE
    mov ea[0].Trustee.TrusteeForm,TRUSTEE_IS_SID
    mov ea[0].Trustee.TrusteeType,TRUSTEE_IS_WELL_KNOWN_GROUP
    mov ea[0].Trustee.ptstrName,pEveryoneSID

    ;; Create a SID for the BUILTIN\Administrators group.
    .if !AllocateAndInitializeSid(&SIDAuthNT, 2,
                     SECURITY_BUILTIN_DOMAIN_RID,
                     DOMAIN_ALIAS_RID_ADMINS,
                     0, 0, 0, 0, 0, 0,
                     &pAdminSID)

        _tprintf("AllocateAndInitializeSid Error %u\n", GetLastError())
        jmp Cleanup
    .endif

    ;; Initialize an EXPLICIT_ACCESS structure for an ACE.
    ;; The ACE will allow the Administrators group full access to
    ;; the key.
    mov ea[EXPLICIT_ACCESS].grfAccessPermissions,KEY_ALL_ACCESS
    mov ea[EXPLICIT_ACCESS].grfAccessMode,SET_ACCESS
    mov ea[EXPLICIT_ACCESS].grfInheritance,NO_INHERITANCE
    mov ea[EXPLICIT_ACCESS].Trustee.TrusteeForm,TRUSTEE_IS_SID
    mov ea[EXPLICIT_ACCESS].Trustee.TrusteeType,TRUSTEE_IS_GROUP
    mov ea[EXPLICIT_ACCESS].Trustee.ptstrName,pAdminSID

    ;; Create a new ACL that contains the new ACEs.
    mov dwRes,SetEntriesInAcl(2, &ea, NULL, &pACL)
    .if (dwRes != ERROR_SUCCESS)

        _tprintf("SetEntriesInAcl Error %u\n", GetLastError())
        jmp Cleanup
    .endif

    ;; Initialize a security descriptor.
    mov pSD,LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH)
    .if (pSD == NULL)

        _tprintf("LocalAlloc Error %u\n", GetLastError())
        jmp Cleanup
    .endif

    .if !InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)

        _tprintf("InitializeSecurityDescriptor Error %u\n",
                                GetLastError())
        jmp Cleanup
    .endif

    ;; Add the ACL to the security descriptor.
    .if !SetSecurityDescriptorDacl(pSD,
            TRUE,     ;; bDaclPresent flag
            pACL,
            FALSE)    ;; not a default DACL

        _tprintf("SetSecurityDescriptorDacl Error %u\n",
                GetLastError())
        jmp Cleanup
    .endif


    ;; Initialize a security attributes structure.
    mov sa.nLength,sizeof(SECURITY_ATTRIBUTES)
    mov sa.lpSecurityDescriptor,pSD
    mov sa.bInheritHandle,FALSE

    ;; Use the security attributes to set the security descriptor
    ;; when you create a key.
    mov lRes,RegCreateKeyEx(HKEY_CURRENT_USER, "mykey", 0, "", 0, KEY_READ or KEY_WRITE, &sa, &hkSub, &dwDisposition)
    _tprintf("RegCreateKeyEx result %u\n", lRes )

Cleanup:

    .if (pEveryoneSID)
        FreeSid(pEveryoneSID)
    .endif
    .if (pAdminSID)
        FreeSid(pAdminSID)
    .endif
    .if (pACL)
        LocalFree(pACL)
    .endif
    .if (pSD)
        LocalFree(pSD)
    .endif
    .if (hkSub)
        RegCloseKey(hkSub)
    .endif
    ret

main endp

    end _tstart

I added this to the test directory. Some adjustment (https://github.com/nidud/asmc/commit/95da651a0f389619ba35b738a41c90edaea6f89c) was needed in the include files to make it work using the -pe switch.

Quote
using acmc, my parameters look like
Code: [Select]
@echo - Assembling project...
%UASM%\asmc /c /coff /Cp -Zp8 /Cu /nologo /W2 -Zi0 -Zi1 -Zi2 -Zi3 -Zi5 -Zi8 /Zd -Zf /Fl"%appname%_%stamp%" %appname%.asm >> %appname%_%stamp%.txt

Well, you have to make choice there with regards to the debug info.
Note that -Zi includes Zi0, Zi1, Zi2, and Zd.

See Add Symbolic Debug Information (https://github.com/nidud/asmc/blob/master/doc/command/Zi.md) for more info.

Quote
I use SDK from TouEnMasm, I get an error for a specific word - "name", where can I see the whole list of reserved words ?! Is the "name" on the reserved list ?! Is it possible to reassign reserved words dynamically ?!
Code: [Select]
C  name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8 PROTO :FOLDERID_ProgramFilesX64 ,:0x6d809377 ,:0x6af0 ,:0x444b ,:0x89 ,:0x57 ,:0xa3 ,:0x77 ,:0x3f ,:0x02 ,:0x20 ,:0x0e
                           C:\masm64\sdkrc100\um\knownfolders.inc(109) : error A2008: syntax error : name
                            C:\masm64\sdkrc100\um\knownfolders.inc(109): Included by
                             C:\masm64\sdkrc100\um\shlguid.inc(503): Included by
                              C:\masm64\sdkrc100\um\ShlObj.inc(85): Included by
                               security.asm(20): Main line code

Not sure whats going on there (https://github.com/nidud/asmc/blob/master/include/knownfolders.inc#L57) but name is not a reserved word in Asmc.
See Renamed keywords (https://github.com/nidud/asmc/blob/master/doc/command/Znk.md).
Title: Re: Asmc Command-Line Reference
Post by: jj2007 on March 03, 2021, 10:13:46 AM
name is not a reserved word in Asmc.

Sure?

Code: [Select]
.486                                      ; create 32 bit code
.model flat, stdcall                      ; 32 bit memory model
option casemap :none                      ; case sensitive

.code
name db "Masm32:", 0

start:
mov eax, offset name
ret

end start

*** Assemble using AsmC /Znk ***
 Assembling: tmp_file.asm
tmp_file.asm(9) : error A2016: expression expected
Title: Re: Asmc Command-Line Reference
Post by: LiaoMi on March 05, 2021, 02:55:58 AM
Hi nidud,

thanks for the new ASMC example and comments!


Hi jj2007,

without /Znk your code builds fine, as it should be.

Quote
Disable non Masm keywords.
Command-line options /Znk

Renamed keywords
Asmc allows in addition to C the following keywords to be used as identifiers. In Masm compatible mode they will be renamed.

Masm      Asmc

name      .name
page      .page
subtitle  .subtitle
subttl    .subttl
title     .title
low       .low
high      .high
size      .size
length    .length
this      .this
mask      .mask
width     .width
type      typeof

https://docs.microsoft.com/en-us/cpp/assembler/masm/name-masm?view=msvc-160

Ignored.

Syntax
NAME

ml - macro assembler returns the same result
tmp_file.asm(9) : error A2016: expression expected

So this is an error in the translation of the SDK  :undecided:

In this case, I have another question, why is the UASM ignoring this definition. An attempt to redefine the definition was unsuccessful - OPTION RENAMEKEYWORD:<name>=new_name

https://www.japheth.de/JWasm/Manual.html#OPTRENAMEKEYWORD
Quote
3.11 Directive OPTION RENAMEKEYWORD
This option allows to rename a keyword, so it can be used under a different name. Syntax:
OPTION RENAMEKEYWORD:<current_name>=new_name
current_name is the current name of the keyword and must be enclosed in angle brackets. new_name must be a valid identifier. If a keyword is to be renamed, it should be done at the beginning of the source, and a keyword shouldn't be renamed multiple times. Since v2.11, a keyword may be renamed temporarily and multiple times.

Title: Re: Asmc Command-Line Reference
Post by: TouEnMasm on March 05, 2021, 04:00:00 AM
Hello,
I try to recompile the security sample http://masm32.com/board/index.php?topic=9071.msg100732#msg100732 (http://masm32.com/board/index.php?topic=9071.msg100732#msg100732).
It's work with those options /coff /Cp and with the translated sdk.

Now I try to make a debug version ,and I have added /Zi8 /Zd,I get big obj file but not a .pbb.
So what is the best option for windbg ??

Title: Re: Asmc Command-Line Reference
Post by: nidud on March 05, 2021, 04:30:41 AM
In this case, I have another question, why is the UASM ignoring this definition. An attempt to redefine the definition was unsuccessful - OPTION RENAMEKEYWORD:<name>=new_name

It's difficult to figure this out as there are loads of large includes files involved. In addition to a symbol-overload you have nested IFDEFs and so on.

The best approach is to try isolate the problem. Both C and name are reserved words in Masm so I guess this is macro arguments, and from the looks of it a GUID definition.
Title: Re: Asmc Command-Line Reference
Post by: LiaoMi on March 05, 2021, 04:36:35 AM
In this case, I have another question, why is the UASM ignoring this definition. An attempt to redefine the definition was unsuccessful - OPTION RENAMEKEYWORD:<name>=new_name

It's difficult to figure this out as there are loads of large includes files involved. In addition to a symbol-overload you have nested IFDEFs and so on.

The best approach is to try isolate the problem. Both C and name are reserved words in Masm so I guess this is macro arguments, and from the looks of it a GUID definition.

Thank you, that's right, the UASM also handles it correctly!  :thumbsup:
tmp_file.asm(9) : Error A2064: Expression expected: name
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 05, 2021, 04:43:04 AM
Now I try to make a debug version ,and I have added /Zi8 /Zd,I get big obj file but not a .pbb.
So what is the best option for windbg ??

The assembler do not produce any additional files other than the .OBJ file. They may grow rather big, around 500K for a windows.inc source.

There are some tests using windbg in the CV directory (https://github.com/nidud/asmc/tree/master/source/test/CV/windbg).

asmc64 -Zi8 main.asm
link /debug /subsystem:console main.obj
windbg main.exe
Title: Re: Asmc Command-Line Reference
Post by: jj2007 on March 05, 2021, 07:31:10 AM
Hi jj2007,

without /Znk your code builds fine, as it should be.

Naming a variable "name" fails with UAsm and all MASM versions. I am not sure whether making "name" accessible to n00bs and script kiddies is a good idea. Namespace pollution can become a serious problem :cool:
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 05, 2021, 07:55:05 AM
 :biggrin:

name, type, and size are the most common used words in programming so hogging them up as keywords are just, well, dumb.
Title: Re: Asmc Command-Line Reference
Post by: jj2007 on March 05, 2021, 08:00:50 AM
Here are some more useless keywords for your exclusion list:

Code: [Select]
.486                                      ; create 32 bit code
.model flat, stdcall                      ; 32 bit memory model
option casemap :none                      ; case sensitive

.code
name db "Masm32:", 0
type db "not a typo", 0
size db "big, really big", 0
for db "for, yeah!", 0
instr db "inthestring", 0
catstr db "the cat bites you", 0
handle db "handles everything", 0
pointer db "pointless", 0
dword db "has 32 bits", 0
xmm db "a register", 0
end db "my last variable", 0

start:
mov eax, offset name
ret

end start
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 05, 2021, 08:36:24 AM
Same with a b c d -- not very clever.

for is a typical programming keyword so no problem there.

The standard libraries are made by linguists and most of the function names are covered there, so I guess instr and catstr derives from strstr and strcat.

As for the data types I think they are very good, as BYTE, WORD. I would preferred the NASM style XWORD, YWORD, and ZWORD (the last two already implemented), as appose to the MM extension thought.

end however should probably be a dot word.
Title: Re: Asmc Command-Line Reference
Post by: jj2007 on March 05, 2021, 11:32:24 AM
For your inspiration, nidud - there is a lot of work to do :thumbsup:

Code: [Select]
.486
.model flat, stdcall
option casemap :none

.code
assume db "just a hypothesis", 0
and db "so on", 0
or db "what?", 0
not db "so obvious", 0
break db "let's have a break", 0
continue db "yes, go on!", 0
error db "a mistake", 0
width db "one metre", 0
high db "two metres", 0
mask db "you should wear one", 0
page db "DIN A4", 0
comment db "I hear", 0
local db "in my village", 0
near db "nearer, nearest", 0
public db "the opposite of private", 0
out db "in the woods", 0
record db "greetings from the Guiness book", 0
subtitle db "some movies have them", 0
union db "that's our strength", 0
fword db "don't use it", 0
short db "one metre and 50cm", 0
this db "is a surprise", 0
goto db "hell", 0
group db "several people", 0
uses db "there are many uses", 0
none db "zero, null, void", 0
word db "which one?", 0
even db "that's really odd", 0
odd db "even that one is odd", 0
sign db "put your signature here", 0
zero db "null", 0
NULL db "a useless person", 0
Var0 dd NULL
option db "not an option", 0
label db "it's just a name", 0
model db "should be beautiful", 0
flat db "apartment", 0
name db "Nidud", 0
type db "not a typo", 0
size db "big, really big", 0
for db "for, yeah!", 0
instr db "inthestring", 0
catstr db "the cat bites you", 0
pointer db "pointless", 0
dword db "has 32 bits", 0
sword db "a weapon", 0
xmm0 db "a register", 0
end db "my last variable", 0
handle db "we can handle that", 0
MyHandle HANDLE ? ; that type is not defined...
While db "I thought, ...", 0
Repeat db "yes, repeat that, please", 0
Until db "you get bored", 0
include db "the contrary of 'exclude'", 0
Else db "a female german name", 0

start: mov eax, offset name
ret
end start

Code: [Select]
*** Assemble using Asmc /nologo ***
 Assembling: tmp_file.asm
tmp_file.asm(6) : error A2008: syntax error : db
tmp_file.asm(7) : error A2008: syntax error : db
tmp_file.asm(8) : error A2008: syntax error : db
tmp_file.asm(9) : error A2008: syntax error : db
tmp_file.asm(19) : error A2008: syntax error : near
tmp_file.asm(20) : error A2008: syntax error : db
tmp_file.asm(21) : error A2008: syntax error : db
tmp_file.asm(22) : error A2008: syntax error : record
tmp_file.asm(24) : error A2008: syntax error : union
tmp_file.asm(25) : error A2008: syntax error : db "don't use it", 0
tmp_file.asm(26) : error A2008: syntax error : short
tmp_file.asm(28) : error A2170: directive must appear inside a macro
tmp_file.asm(29) : error A2008: syntax error : group
tmp_file.asm(32) : error A2008: syntax error : db "which one?", 0
tmp_file.asm(33) : error A2008: syntax error : db
tmp_file.asm(39) : error A2008: syntax error : db "not an option", 0
tmp_file.asm(40) : error A2008: syntax error : label
tmp_file.asm(42) : error A2008: syntax error : flat
tmp_file.asm(46) : error A2008: syntax error : 0
tmp_file.asm(47) : error A2008: syntax error : instr
tmp_file.asm(48) : error A2008: syntax error : catstr
tmp_file.asm(50) : error A2008: syntax error : db "has 32 bits", 0
tmp_file.asm(51) : error A2008: syntax error : db "a weapon", 0
tmp_file.asm(52) : error A2008: syntax error : xmm0
tmp_file.asm(53) : error A2008: syntax error : db "my last variable", 0
tmp_file.asm(55) : error A2008: syntax error : MyHandle
tmp_file.asm(56) : error A2026: constant expected
tmp_file.asm(56) : error A2008: syntax error : "I thought, ...", 0
tmp_file.asm(74) : fatal error A1008: unmatched macro nesting
Title: Re: Asmc Command-Line Reference
Post by: nidud on March 05, 2021, 11:45:41 AM
 :biggrin:

There's not gonna be any changes beyond whats already made.